33 global $db, $langs, $conf;
35 $langs->load(
"eventorganization");
41 if ($with_project>0) {
42 $withProjectUrl =
"&withproject=1";
45 $head[$h][0] = DOL_URL_ROOT.
'/eventorganization/conferenceorbooth_card.php?id='.$object->id.$withProjectUrl;
46 $head[$h][1] = $langs->trans(
"Card");
47 $head[$h][2] =
'card';
50 if (!empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) {
51 $head[$h][0] = DOL_URL_ROOT.
'/eventorganization/conferenceorbooth_contact.php?id='.$object->id.$withProjectUrl;
52 $head[$h][1] = $langs->trans(
"ContactsAddresses");
53 $head[$h][2] =
'contact';
85 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
86 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
87 $upload_dir = $conf->eventorganization->dir_output.
"/conferenceorbooth/".
dol_sanitizeFileName($object->ref);
88 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
89 $nbLinks =
Link::count($db, $object->element, $object->id);
90 $head[$h][0] =
dol_buildpath(
"/eventorganization/conferenceorbooth_document.php", 1).
'?id='.$object->id.$withProjectUrl;
91 $head[$h][1] = $langs->trans(
'Documents');
92 if (($nbFiles + $nbLinks) > 0) {
93 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
95 $head[$h][2] =
'document';
122 global $db, $langs, $conf;
124 $langs->load(
"eventorganization");
129 $head[$h][0] =
dol_buildpath(
"/eventorganization/conferenceorbooth_list.php", 1).
'?projectid='.$object->id;
130 $head[$h][1] = $langs->trans(
"ConferenceOrBooth");
131 $head[$h][2] =
'conferenceorbooth';
134 $nbConferenceOrBooth= 0;
135 require_once DOL_DOCUMENT_ROOT.
'/core/lib/memory.lib.php';
136 $cachekey =
'count_conferenceorbooth_project_'.$object->id;
138 if (!is_null($dataretrieved)) {
139 $nbAttendees = $dataretrieved;
141 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
143 $result = $conforbooth->fetchAll(
'',
'', 0, 0, array(
't.fk_project'=>$object->id));
144 if (!is_array($result) && $result<0) {
147 $nbConferenceOrBooth = count($result);
151 if ($nbConferenceOrBooth > 0) {
152 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbConferenceOrBooth.
'</span>';
156 $head[$h][0] =
dol_buildpath(
"/eventorganization/conferenceorboothattendee_list.php", 1).
'?fk_project='.$object->id.
'&withproject=1';
157 $head[$h][1] = $langs->trans(
"Attendees");
158 $head[$h][2] =
'attendees';
161 require_once DOL_DOCUMENT_ROOT.
'/core/lib/memory.lib.php';
162 $cachekey =
'count_attendees_conferenceorbooth_project_'.$object->id;
164 if (!is_null($dataretrieved)) {
165 $nbAttendees = $dataretrieved;
167 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
169 $result = $attendees->fetchAll(
'',
'', 0, 0, array(
't.fk_project'=>$object->id));
170 if (!is_array($result) && $result<0) {
173 $nbAttendees = count($result);
177 if ($nbAttendees > 0) {
178 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbAttendees.
'</span>';
197 global $db, $langs, $conf;
199 $langs->load(
"eventorganization");
204 $head[$h][0] = DOL_URL_ROOT.
"/eventorganization/conferenceorboothattendee_card.php?id=".((int) $object->id).($object->fk_actioncomm > 0 ?
'&conforboothid='.((int) $object->fk_actioncomm) :
'').($object->fk_project > 0 ?
'&withproject=1&fk_project='.((int) $object->fk_project) :
'');
205 $head[$h][1] = $langs->trans(
"Card");
206 $head[$h][2] =
'card';
Class for ConferenceOrBoothAttendee.
Class for ConferenceOrBooth.
static count($dbs, $objecttype, $objectid)
Return nb of links.
conferenceorboothPrepareHead($object, $with_project=0)
Prepare array of tabs for ConferenceOrBooth.
conferenceorboothProjectPrepareHead($object)
Prepare array of tabs for ConferenceOrBooth Project tab.
conferenceorboothAttendeePrepareHead($object)
Prepare array of tabs for ConferenceOrBoothAttendees.
dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
dol_setcache($memoryid, $data, $expire=0)
Save data into a memory area shared by all users, all sessions on server.
dol_getcache($memoryid)
Read a memory area shared by all users, all sessions on server.