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';
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';
121 global $db, $langs, $conf;
123 $langs->load(
"eventorganization");
128 $head[$h][0] = DOL_URL_ROOT .
'/eventorganization/conferenceorbooth_list.php?projectid=' . $object->id;
129 $head[$h][1] = $langs->trans(
"ConferenceOrBooth");
130 $head[$h][2] =
'conferenceorbooth';
133 $nbConferenceOrBooth= 0;
134 require_once DOL_DOCUMENT_ROOT.
'/core/lib/memory.lib.php';
135 $cachekey =
'count_conferenceorbooth_project_'.$object->id;
137 if (!is_null($dataretrieved)) {
138 $nbAttendees = $dataretrieved;
140 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorbooth.class.php';
142 $result = $conforbooth->fetchAll(
'',
'', 0, 0, array(
't.fk_project'=>$object->id));
143 if (!is_array($result) && $result<0) {
146 $nbConferenceOrBooth = count($result);
150 if ($nbConferenceOrBooth > 0) {
151 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbConferenceOrBooth.
'</span>';
155 $head[$h][0] =
dol_buildpath(
"/eventorganization/conferenceorboothattendee_list.php", 1).
'?fk_project='.$object->id.
'&withproject=1';
156 $head[$h][1] = $langs->trans(
"Attendees");
157 $head[$h][2] =
'attendees';
160 require_once DOL_DOCUMENT_ROOT.
'/core/lib/memory.lib.php';
161 $cachekey =
'count_attendees_conferenceorbooth_project_'.$object->id;
163 if (!is_null($dataretrieved)) {
164 $nbAttendees = $dataretrieved;
166 require_once DOL_DOCUMENT_ROOT.
'/eventorganization/class/conferenceorboothattendee.class.php';
168 $result = $attendees->fetchAll(
'',
'', 0, 0, array(
't.fk_project'=>$object->id));
169 if (!is_array($result) && $result<0) {
172 $nbAttendees = count($result);
176 if ($nbAttendees > 0) {
177 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbAttendees.
'</span>';
196 global $db, $langs, $conf;
198 $langs->load(
"eventorganization");
203 $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) :
'');
204 $head[$h][1] = $langs->trans(
"Card");
205 $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.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
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).
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
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.