35  global $db, $langs, $conf;
 
   37  $langs->load(
"eventorganization");
 
   43  if ($with_project > 0) {
 
   44    $withProjectUrl = 
"&withproject=1";
 
   47  $head[$h][0] = DOL_URL_ROOT . 
'/eventorganization/conferenceorbooth_card.php?id=' . 
$object->id . $withProjectUrl;
 
   48  $head[$h][1] = $langs->trans(
"Card");
 
   49  $head[$h][2] = 
'card';
 
   53    $head[$h][0] = DOL_URL_ROOT . 
'/eventorganization/conferenceorbooth_contact.php?id=' . 
$object->id . $withProjectUrl;
 
   54    $head[$h][1] = $langs->trans(
"ContactsAddresses");
 
   55    $head[$h][2] = 
'contact';
 
   87  require_once DOL_DOCUMENT_ROOT . 
'/core/lib/files.lib.php';
 
   88  require_once DOL_DOCUMENT_ROOT . 
'/core/class/link.class.php';
 
   90  $nbFiles = count(
dol_dir_list($upload_dir, 
'files', 0, 
'', 
'(\.meta|_preview.*\.png)$'));
 
   92  $head[$h][0] = DOL_URL_ROOT . 
'/eventorganization/conferenceorbooth_document.php?id=' . 
$object->id . $withProjectUrl;
 
   93  $head[$h][1] = $langs->trans(
'Documents');
 
   94  if (($nbFiles + $nbLinks) > 0) {
 
   95    $head[$h][1] .= 
'<span class="badge marginleftonlyshort">' . ($nbFiles + $nbLinks) . 
'</span>';
 
   97  $head[$h][2] = 
'document';
 
 
  123  global $db, $langs, $conf;
 
  125  $langs->load(
"eventorganization");
 
  130  $head[$h][0] = DOL_URL_ROOT . 
'/eventorganization/conferenceorbooth_list.php?projectid=' . 
$object->id;
 
  131  $head[$h][1] = $langs->trans(
"ConferenceOrBooth");
 
  132  $head[$h][2] = 
'conferenceorbooth';
 
  135  $nbConferenceOrBooth = 0;
 
  136  require_once DOL_DOCUMENT_ROOT . 
'/core/lib/memory.lib.php';
 
  137  $cachekey = 
'count_conferenceorbooth_project_' . 
$object->id;
 
  139  if (!is_null($dataretrieved)) {
 
  140    $nbAttendees = $dataretrieved;
 
  142    require_once DOL_DOCUMENT_ROOT . 
'/eventorganization/class/conferenceorbooth.class.php';
 
  144    $result = $conforbooth->fetchAll(
'', 
'', 0, 0, 
'(t.fk_project:=:' . ((
int) 
$object->id) . 
')');
 
  145    if (!is_array($result) && $result < 0) {
 
  148      $nbConferenceOrBooth = count($result);
 
  152  if ($nbConferenceOrBooth > 0) {
 
  153    $head[$h][1] .= 
'<span class="badge marginleftonlyshort">' . $nbConferenceOrBooth . 
'</span>';
 
  157  $head[$h][0] = DOL_URL_ROOT . 
'/eventorganization/conferenceorboothattendee_list.php?fk_project=' . 
$object->id . 
'&withproject=1';
 
  158  $head[$h][1] = $langs->trans(
"Attendees");
 
  159  $head[$h][2] = 
'attendees';
 
  162  require_once DOL_DOCUMENT_ROOT . 
'/core/lib/memory.lib.php';
 
  163  $cachekey = 
'count_attendees_conferenceorbooth_project_' . 
$object->id;
 
  165  if (!is_null($dataretrieved)) {
 
  166    $nbAttendees = $dataretrieved;
 
  168    require_once DOL_DOCUMENT_ROOT . 
'/eventorganization/class/conferenceorboothattendee.class.php';
 
  170    $result = $attendees->fetchAll(
'', 
'', 0, 0, 
'(t.fk_project:=:' . ((
int) 
$object->id) . 
')');
 
  171    if (!is_array($result) && $result < 0) {
 
  174      $nbAttendees = count($result);
 
  178  if ($nbAttendees > 0) {
 
  179    $head[$h][1] .= 
'<span class="badge marginleftonlyshort">' . $nbAttendees . 
'</span>';
 
 
  198  global $db, $langs, $conf;
 
  200  $langs->load(
"eventorganization");
 
  205  $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) : 
'');
 
  206  $head[$h][1] = $langs->trans(
"Card");
 
  207  $head[$h][2] = 
'card';
 
 
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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($utf8_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_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.