26 require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
38 public $module =
'eventorganization';
43 public $element =
'conferenceorboothattendee';
48 public $table_element =
'eventorganization_conferenceorboothattendee';
54 public $ismultientitymanaged = 0;
59 public $isextrafieldmanaged = 1;
64 public $picto =
'contact';
68 const STATUS_DRAFT = 0;
69 const STATUS_VALIDATED = 1;
70 const STATUS_CANCELED = 9;
103 public $fields = array(
104 'rowid' => array(
'type'=>
'integer',
'label'=>
'TechnicalID',
'enabled'=>
'1',
'position'=>1,
'notnull'=>1,
'visible'=>0,
'noteditable'=>
'1',
'index'=>1,
'css'=>
'left',
'comment'=>
"Id"),
105 'ref' => array(
'type'=>
'varchar(128)',
'label'=>
'Ref',
'enabled'=>
'1',
'position'=>10,
'notnull'=>1,
'visible'=>2,
'index'=>1,
'comment'=>
"Reference of object"),
106 'fk_actioncomm' => array(
'type'=>
'integer:ActionComm:comm/action/class/actioncomm.class.php:1',
'label'=>
'ConferenceOrBooth',
'enabled'=>
'1',
'position'=>55,
'notnull'=>0,
'visible'=>0,
'index'=>1,
'picto'=>
'agenda'),
107 'fk_project' => array(
'type'=>
'integer:Project:projet/class/project.class.php:1',
'label'=>
'Project',
'enabled'=>
'$conf->project->enabled',
'position'=>20,
'notnull'=>1,
'visible'=>0,
'index'=>1,
'picto'=>
'project',
'css'=>
'tdoverflowmax150 maxwidth500'),
108 'email' => array(
'type'=>
'mail',
'label'=>
'EmailAttendee',
'enabled'=>
'1',
'position'=>30,
'notnull'=>1,
'visible'=>1,
'index'=>1,
'autofocusoncreate'=>1,
'searchall'=>1),
109 'firstname' => array(
'type'=>
'varchar(100)',
'label'=>
'Firstname',
'enabled'=>
'1',
'position'=>31,
'notnull'=>0,
'visible'=>1,
'index'=>1,
'searchall'=>1),
110 'lastname' => array(
'type'=>
'varchar(100)',
'label'=>
'Lastname',
'enabled'=>
'1',
'position'=>32,
'notnull'=>0,
'visible'=>1,
'index'=>1,
'searchall'=>1),
111 'fk_soc' => array(
'type'=>
'integer:Societe:societe/class/societe.class.php:1:status = 1 AND entity IN (__SHARED_ENTITIES__)',
'label'=>
'ThirdParty',
'enabled'=>
'$conf->societe->enabled',
'position'=>40,
'notnull'=>-1,
'visible'=>1,
'index'=>1,
'help'=>
"OrganizationEventLinkToThirdParty",
'picto'=>
'company',
'css'=>
'tdoverflowmax150 maxwidth500'),
112 'date_subscription' => array(
'type'=>
'datetime',
'label'=>
'DateOfRegistration',
'enabled'=>
'1',
'position'=>56,
'notnull'=>1,
'visible'=>1,
'showoncombobox'=>
'1',),
113 'fk_invoice' => array(
'type'=>
'integer:Facture:compta/facture/class/facture.class.php',
'label'=>
'Invoice',
'enabled'=>
'$conf->facture->enabled',
'position'=>57,
'notnull'=>0,
'visible'=>-1,
'index'=>0,
'picto'=>
'bill',
'css'=>
'tdoverflowmax150 maxwidth500'),
114 'amount' => array(
'type'=>
'price',
'label'=>
'AmountPaid',
'enabled'=>
'1',
'position'=>57,
'notnull'=>0,
'visible'=>1,
'default'=>
'null',
'isameasure'=>
'1',
'help'=>
"AmountOfSubscriptionPaid",),
115 'note_public' => array(
'type'=>
'html',
'label'=>
'NotePublic',
'enabled'=>
'1',
'position'=>61,
'notnull'=>0,
'visible'=>3,),
116 'note_private' => array(
'type'=>
'html',
'label'=>
'NotePrivate',
'enabled'=>
'1',
'position'=>62,
'notnull'=>0,
'visible'=>3,),
117 'date_creation' => array(
'type'=>
'datetime',
'label'=>
'DateCreation',
'enabled'=>
'1',
'position'=>500,
'notnull'=>1,
'visible'=>-2,),
118 'tms' => array(
'type'=>
'timestamp',
'label'=>
'DateModification',
'enabled'=>
'1',
'position'=>501,
'notnull'=>0,
'visible'=>-2,),
119 'fk_user_creat' => array(
'type'=>
'integer:User:user/class/user.class.php',
'label'=>
'UserAuthor',
'enabled'=>
'1',
'position'=>510,
'notnull'=>-1,
'visible'=>-2),
120 'fk_user_modif' => array(
'type'=>
'integer:User:user/class/user.class.php',
'label'=>
'UserModif',
'enabled'=>
'1',
'position'=>511,
'notnull'=>-1,
'visible'=>-2,),
121 'last_main_doc' => array(
'type'=>
'varchar(255)',
'label'=>
'LastMainDoc',
'enabled'=>
'1',
'position'=>600,
'notnull'=>0,
'visible'=>0,),
122 'import_key' => array(
'type'=>
'varchar(14)',
'label'=>
'ImportId',
'enabled'=>
'1',
'position'=>1000,
'notnull'=>-1,
'visible'=>-2,),
123 'model_pdf' => array(
'type'=>
'varchar(255)',
'label'=>
'Model pdf',
'enabled'=>
'1',
'position'=>1010,
'notnull'=>-1,
'visible'=>0,),
124 'status' => array(
'type'=>
'smallint',
'label'=>
'Status',
'enabled'=>
'1',
'position'=>1000,
'default'=>0,
'notnull'=>1,
'visible'=>1,
'index'=>1,
'arrayofkeyval'=>array(
'0'=>
'Draft',
'1'=>
'Validated',
'9'=>
'Canceled'),),
129 public $fk_actioncomm;
133 public $date_subscription;
137 public $note_private;
138 public $date_creation;
140 public $fk_user_creat;
141 public $fk_user_modif;
142 public $last_main_doc;
192 global $conf, $langs;
196 if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields[
'rowid'])) {
197 $this->fields[
'rowid'][
'visible'] = 0;
199 if (empty($conf->multicompany->enabled) && isset($this->fields[
'entity'])) {
200 $this->fields[
'entity'][
'enabled'] = 0;
203 if (!empty($conf->global->EVENTORGANIZATION_FILTERATTENDEES_CAT)) {
204 $this->fields[
'fk_soc'][
'type'] .=
' AND rowid IN (SELECT DISTINCT c.fk_soc FROM '.MAIN_DB_PREFIX.
'categorie_societe as c WHERE c.fk_categorie='.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_CAT.
')';
206 if (isset($conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE)
207 && $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE !==
''
208 && $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE !==
'-1') {
209 $this->fields[
'fk_soc'][
'type'] .=
' AND client = '.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE;
219 foreach ($this->fields as $key => $val) {
220 if (isset($val[
'enabled']) && empty($val[
'enabled'])) {
221 unset($this->fields[$key]);
226 if (is_object($langs)) {
227 foreach ($this->fields as $key => $val) {
228 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
229 foreach ($val[
'arrayofkeyval'] as $key2 => $val2) {
230 $this->fields[$key][
'arrayofkeyval'][$key2] = $langs->trans($val2);
248 if (!isValidEMail($this->email)) {
249 $langs->load(
"errors");
250 $this->errors[] = $langs->trans(
"ErrorBadEMail", $this->email);
256 $result = $this->
fetch($result);
258 $this->
ref = $this->id;
259 $result = $this->
update($user);
274 global $langs, $extrafields;
279 $object =
new self($this->db);
284 $result = $object->fetchCommon($fromid);
285 if ($result > 0 && !empty($object->table_element_line)) {
286 $object->fetchLines();
295 unset($object->fk_user_creat);
296 unset($object->import_key);
299 if (property_exists($object,
'ref')) {
300 $object->ref = empty($this->fields[
'ref'][
'default']) ?
"(PROV)" : $this->fields[
'ref'][
'default'];
302 if (property_exists($object,
'label')) {
303 $object->label = empty($this->fields[
'label'][
'default']) ? $langs->trans(
"CopyOf").
" ".$object->label : $this->fields[
'label'][
'default'];
305 if (property_exists($object,
'status')) {
306 $object->status = self::STATUS_DRAFT;
308 if (property_exists($object,
'date_creation')) {
309 $object->date_creation =
dol_now();
311 if (property_exists($object,
'date_modification')) {
312 $object->date_modification =
null;
316 if (is_array($object->array_options) && count($object->array_options) > 0) {
317 $extrafields->fetch_name_optionals_label($this->table_element);
318 foreach ($object->array_options as $key => $option) {
319 $shortkey = preg_replace(
'/options_/',
'', $key);
320 if (!empty($extrafields->attributes[$this->table_element][
'unique'][$shortkey])) {
323 unset($object->array_options[$key]);
329 $object->context[
'createfromclone'] =
'createfromclone';
330 $result = $object->createCommon($user);
333 $this->error = $object->error;
334 $this->errors = $object->errors;
336 $object->ref = $object->id;
337 $result = $object->update($user);
349 if (property_exists($this,
'fk_soc') && $this->fk_soc == $object->socid) {
356 unset($object->context[
'createfromclone']);
363 $this->
db->rollback();
375 public function fetch($id, $ref =
null)
378 if ($result > 0 && !empty($this->table_element_line)) {
391 $this->lines = array();
409 public function fetchAll($sortorder =
'', $sortfield =
'', $limit = 0, $offset = 0, array $filter = array(), $filtermode =
'AND')
419 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
420 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"actioncomm as a on a.id = t.fk_actioncomm";
421 if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
422 $sql .=
' WHERE t.entity IN ('.getEntity($this->table_element).
')';
424 $sql .=
' WHERE 1 = 1';
428 if (count($filter) > 0) {
429 foreach ($filter as $key => $value) {
430 if ($key ==
't.rowid' || $key ==
't.fk_soc' || $key ==
't.fk_project' || $key ==
't.fk_actioncomm') {
431 $sqlwhere[] = $key.
'='.((int) $value);
432 } elseif (in_array($this->fields[$key][
'type'], array(
'date',
'datetime',
'timestamp'))) {
433 $sqlwhere[] = $key.
" = '".$this->
db->idate($value).
"'";
434 } elseif ($key ==
'customsql') {
435 $sqlwhere[] = $value;
436 } elseif (strpos($value,
'%') ===
false) {
437 $sqlwhere[] = $key.
' IN ('.$this->
db->sanitize($this->
db->escape($value)).
')';
439 $sqlwhere[] = $key.
" LIKE '%".$this->
db->escape($value).
"%'";
443 if (count($sqlwhere) > 0) {
444 $sql .=
' AND ('.implode(
' '.$this->
db->escape($filtermode).
' ', $sqlwhere).
')';
447 if (!empty($sortfield)) {
448 $sql .= $this->
db->order($sortfield, $sortorder);
450 if (!empty($limit)) {
451 $sql .= $this->
db->plimit($limit, $offset);
458 while ($i < ($limit ? min($limit, $num) : $num)) {
459 $obj = $this->
db->fetch_object(
$resql);
461 $record =
new self($this->db);
462 $record->setVarsFromFetchObj($obj);
464 $records[$record->id] = $record;
472 $this->errors[] =
'Error '.$this->db->lasterror();
473 dol_syslog(__METHOD__.
' '.join(
',', $this->errors), LOG_ERR);
498 public function delete(
User $user, $notrigger =
false)
514 if ($this->status < 0) {
515 $this->error =
'ErrorDeleteLineNotAllowedByObjectStatus';
532 global $conf, $langs;
534 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
539 if ($this->status == self::STATUS_VALIDATED) {
540 dol_syslog(get_class($this).
"::validate action abandonned: already validated", LOG_WARNING);
557 if (!$error && (preg_match(
'/^[\(]?PROV/i', $this->
ref) || empty($this->
ref))) {
562 $this->newref = $num;
566 $sql =
"UPDATE ".MAIN_DB_PREFIX.$this->table_element;
567 $sql .=
" SET ref = '".$this->db->escape($num).
"',";
568 $sql .=
" status = ".self::STATUS_VALIDATED;
569 if (!empty($this->fields[
'date_validation'])) {
570 $sql .=
", date_validation = '".$this->db->idate($now).
"'";
572 if (!empty($this->fields[
'fk_user_valid'])) {
573 $sql .=
", fk_user_valid = ".$user->id;
575 $sql .=
" WHERE rowid = ".((int) $this->
id);
577 dol_syslog(get_class($this).
"::validate()", LOG_DEBUG);
581 $this->error = $this->
db->lasterror();
585 if (!$error && !$notrigger) {
587 $result = $this->
call_trigger(
'CONFERENCEORBOOTHATTENDEE_VALIDATE', $user);
596 $this->oldref = $this->ref;
599 if (preg_match(
'/^[\(]?PROV/i', $this->
ref)) {
601 $sql =
'UPDATE '.MAIN_DB_PREFIX.
"ecm_files set filename = CONCAT('".$this->
db->escape($this->newref).
"', SUBSTR(filename, ".(strlen($this->
ref) + 1).
")), filepath = 'conferenceorboothattendee/".$this->
db->escape($this->newref).
"'";
602 $sql .=
" WHERE filename LIKE '".$this->db->escape($this->
ref).
"%' AND filepath = 'conferenceorboothattendee/".$this->
db->escape($this->
ref).
"' and entity = ".$conf->entity;
605 $error++; $this->error = $this->
db->lasterror();
611 $dirsource = $conf->eventorganization->dir_output.
'/conferenceorboothattendee/'.$oldref;
612 $dirdest = $conf->eventorganization->dir_output.
'/conferenceorboothattendee/'.$newref;
613 if (!$error && file_exists($dirsource)) {
614 dol_syslog(get_class($this).
"::validate() rename dir ".$dirsource.
" into ".$dirdest);
616 if (@rename($dirsource, $dirdest)) {
619 $listoffiles =
dol_dir_list($conf->eventorganization->dir_output.
'/conferenceorboothattendee/'.$newref,
'files', 1,
'^'.preg_quote($oldref,
'/'));
620 foreach ($listoffiles as $fileentry) {
621 $dirsource = $fileentry[
'name'];
622 $dirdest = preg_replace(
'/^'.preg_quote($oldref,
'/').
'/', $newref, $dirsource);
623 $dirsource = $fileentry[
'path'].
'/'.$dirsource;
624 $dirdest = $fileentry[
'path'].
'/'.$dirdest;
625 @rename($dirsource, $dirdest);
635 $this->status = self::STATUS_VALIDATED;
642 $this->
db->rollback();
656 include_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
658 if (empty($this->fk_project) && !empty($this->fk_projet)) {
661 if (empty($this->fk_project)) {
666 $result = $project->fetch($this->fk_project);
668 $this->projet = $project;
669 $this->project = $project;
683 if ($this->status <= self::STATUS_DRAFT) {
694 return $this->
setStatusCommon($user, self::STATUS_DRAFT, $notrigger,
'CONFERENCEORBOOTHATTENDEE_UNVALIDATE');
704 public function cancel($user, $notrigger = 0)
707 if ($this->status != self::STATUS_VALIDATED) {
718 return $this->
setStatusCommon($user, self::STATUS_CANCELED, $notrigger,
'CONFERENCEORBOOTHATTENDEE_CANCEL');
728 public function reopen($user, $notrigger = 0)
731 if ($this->status != self::STATUS_CANCELED) {
742 return $this->
setStatusCommon($user, self::STATUS_VALIDATED, $notrigger,
'CONFERENCEORBOOTHATTENDEE_REOPEN');
755 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
757 global $conf, $langs, $hookmanager;
759 if (!empty($conf->dol_no_mouse_hover)) {
765 $label =
img_picto(
'', $this->picto).
' <u>'.$langs->trans(
"ConferenceOrBoothAttendee").
'</u>';
766 if (isset($this->status)) {
767 $label .=
' '.$this->getLibStatut(5);
770 $label .=
'<b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
771 $label .=
'<br><b>'.$langs->trans(
'DateOfRegistration').
':</b> '.
dol_print_date($this->date_subscription,
'dayhour');
772 $label .=
'<br><b>'.$langs->trans(
'AmountPaid').
':</b> '.$this->amount;
774 $url = DOL_URL_ROOT.
'/eventorganization/conferenceorboothattendee_card.php?id='.$this->id;
776 if ($option !=
'nolink') {
778 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
779 if ($save_lastsearch_value == -1 && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
780 $add_save_lastsearch_values = 1;
782 if ($add_save_lastsearch_values) {
783 $url .=
'&save_lastsearch_values=1';
786 if ($option ==
'conforboothid') {
787 $url .=
'&conforboothid='.((int) $this->fk_actioncomm);
790 if ($option ==
'projectid') {
791 $url .=
'&fk_project='.((int) $this->fk_project).
'&withproject=1';
794 if ($option ==
'conforboothidproject') {
795 $url .=
'&conforboothid='.((int) $this->fk_actioncomm).
'&withproject=1';
800 if (empty($notooltip)) {
801 if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
802 $label = $langs->trans(
"ShowConferenceOrBoothAttendee");
803 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
805 $linkclose .=
' title="'.dol_escape_htmltag($label, 1).
'"';
806 $linkclose .=
' class="classfortooltip'.($morecss ?
' '.$morecss :
'').
'"';
808 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
811 if ($option ==
'nolink') {
812 $linkstart =
'<span';
814 $linkstart =
'<a href="'.$url.
'"';
816 $linkstart .= $linkclose.
'>';
817 if ($option ==
'nolink') {
818 $linkend =
'</span>';
823 $result .= $linkstart;
825 if (empty($this->showphoto_on_popup)) {
827 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
831 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
833 list($class, $module) = explode(
'@', $this->picto);
836 $filename = $filearray[0][
'name'];
837 if (!empty($filename)) {
838 $pospoint = strpos($filearray[0][
'name'],
'.');
840 $pathtophoto = $class.
'/'.$this->
ref.
'/thumbs/'.substr($filename, 0, $pospoint).
'_mini'.substr($filename, $pospoint);
841 if (empty($conf->global->{strtoupper($module.
'_'.$class).
'_FORMATLISTPHOTOSASUSERS'})) {
842 $result .=
'<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$module.
'" alt="No photo" border="0" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart='.$module.
'&entity='.$conf->entity.
'&file='.urlencode($pathtophoto).
'"></div></div>';
844 $result .=
'<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart='.$module.
'&entity='.$conf->entity.
'&file='.urlencode($pathtophoto).
'"></div>';
849 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
854 if ($withpicto != 2) {
855 $result .= $this->ref;
861 global $action, $hookmanager;
862 $hookmanager->initHooks(array(
'conferenceorboothattendeedao'));
863 $parameters = array(
'id'=>$this->
id,
'getnomurl' => &$result);
864 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
866 $result = $hookmanager->resPrint;
868 $result .= $hookmanager->resPrint;
882 return $this->LibStatut($this->status, $mode);
893 return $this->LibStatut($this->status, $mode);
909 if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
911 $this->labelStatus[self::STATUS_DRAFT] = $langs->trans(
'Draft');
912 $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans(
'Validated');
913 $this->labelStatus[self::STATUS_CANCELED] = $langs->trans(
'Disabled');
914 $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans(
'Draft');
915 $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans(
'Validated');
916 $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans(
'Disabled');
919 $statusType =
'status'.$status;
921 if ($status == self::STATUS_CANCELED) {
922 $statusType =
'status6';
925 if ($status == self::STATUS_VALIDATED && $this->date_subscription && $this->amount) {
926 $statusType =
'status4';
927 $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans(
'Validated').
' - '.$langs->trans(
"Paid");
930 return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status],
'', $statusType, $mode);
941 $sql =
'SELECT rowid, date_creation as datec, tms as datem,';
942 $sql .=
' fk_user_creat, fk_user_modif';
943 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
944 $sql .=
' WHERE t.rowid = '.((int) $id);
945 $result = $this->
db->query($sql);
947 if ($this->
db->num_rows($result)) {
948 $obj = $this->
db->fetch_object($result);
949 $this->
id = $obj->rowid;
951 $this->user_creation_id = $obj->fk_user_creat;
952 $this->user_modification_id = $obj->fk_user_modif;
953 $this->date_creation = $this->
db->jdate($obj->datec);
954 $this->date_modification = empty($obj->datem) ?
'' : $this->
db->jdate($obj->datem);
957 $this->
db->free($result);
971 $this->initAsSpecimenCommon();
981 global $langs, $conf;
982 $langs->load(
"eventorganization@eventorganization");
984 if (empty($conf->global->EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_ADDON)) {
985 $conf->global->EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_ADDON =
'mod_conferenceorboothattendee_standard';
988 if (!empty($conf->global->EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_ADDON)) {
991 $file = $conf->global->EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_ADDON.
".php";
992 $classname = $conf->global->EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_ADDON;
995 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
996 foreach ($dirmodels as $reldir) {
997 $dir =
dol_buildpath($reldir.
"core/modules/eventorganization/");
1000 $mybool |= @include_once $dir.$file;
1003 if ($mybool ===
false) {
1008 if (class_exists($classname)) {
1009 $obj =
new $classname();
1010 $numref = $obj->getNextValue($this);
1012 if ($numref !=
'' && $numref !=
'-1') {
1015 $this->error = $obj->error;
1020 print $langs->trans(
"Error").
" ".$langs->trans(
"ClassNotFound").
' '.$classname;
1024 print $langs->trans(
"ErrorNumberingModuleNotSetup", $this->element);
1040 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams =
null)
1042 global $conf, $langs;
1045 $includedocgeneration = 0;
1047 $langs->load(
"eventorganization@eventorganization");
1050 $modele =
'standard_conferenceorboothattendee';
1052 if (!empty($this->model_pdf)) {
1053 $modele = $this->model_pdf;
1054 } elseif (!empty($conf->global->CONFERENCEORBOOTHATTENDEE_ADDON_PDF)) {
1055 $modele = $conf->global->CONFERENCEORBOOTHATTENDEE_ADDON_PDF;
1059 $modelpath =
"core/modules/eventorganization/doc/";
1061 if ($includedocgeneration && !empty($modele)) {
1062 $result = $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
1077 global $conf, $langs;
1093 $this->
db->commit();
1109 'eventorganization_conferenceorboothattendee'
1117 require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobjectline.class.php';
1130 public $isextrafieldmanaged = 0;