23 require
'../../main.inc.php';
24 require_once DOL_DOCUMENT_ROOT.
'/core/lib/hrm.lib.php';
25 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
26 require_once DOL_DOCUMENT_ROOT.
'/hrm/class/establishment.class.php';
29 $langs->loadLangs(array(
'admin',
'hrm'));
34 $action =
GETPOST(
'action',
'aZ09');
35 $cancel =
GETPOST(
'cancel',
'aZ09');
36 $backtopage =
GETPOST(
'backtopage',
'alpha');
38 if (
GETPOST(
'actioncode',
'array')) {
39 $actioncode =
GETPOST(
'actioncode',
'array', 3);
40 if (!count($actioncode)) $actioncode =
'0';
42 $actioncode =
GETPOST(
"actioncode",
"alpha", 3) ?
GETPOST(
"actioncode",
"alpha", 3) : (
GETPOST(
"actioncode") ==
'0' ?
'0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ?
'' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
44 $search_agenda_label =
GETPOST(
'search_agenda_label');
46 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
47 $sortfield =
GETPOST(
"sortfield",
'alpha');
48 $sortorder =
GETPOST(
"sortorder",
'alpha');
50 if (empty($page) || $page == -1) { $page = 0; }
51 $offset = $limit * $page;
52 $pageprev = $page - 1;
53 $pagenext = $page + 1;
54 if (!$sortfield) $sortfield =
'a.datep,a.id';
55 if (!$sortorder) $sortorder =
'DESC,DESC';
60 $diroutputmassaction = $conf->hrm->dir_output.
'/temp/massgeneration/'.$user->id;
61 $hookmanager->initHooks(array(
'hrmagenda',
'globalcard'));
63 $extrafields->fetch_name_optionals_label($object->table_element);
66 include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
67 if ($id > 0 || !empty($ref)) $upload_dir = $conf->hrm->multidir_output[$object->entity].
"/".$object->id;
74 $permissiontoadd = $user->rights->hrm->write;
81 $parameters = array(
'id'=>$id);
82 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
83 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
88 if (
GETPOST(
'cancel',
'alpha') && !empty($backtopage))
90 header(
"Location: ".$backtopage);
95 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha'))
98 $search_agenda_label =
'';
108 $form =
new Form($db);
112 $title = $langs->trans(
"Agenda");
117 if (!empty($conf->notification->enabled)) $langs->load(
"mails");
125 $linkback =
'<a href="'.dol_buildpath(
'/hrm/hrm/myobject_list.php', 1).
'?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
127 $morehtmlref =
'<div class="refidno">';
165 $morehtmlref .=
'</div>';
168 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
170 print '<div class="fichecenter">';
171 print '<div class="underbanner clearboth"></div>';
173 $object->info($object->id);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_object_info($object, $usetable=0)
Show informations on an object TODO Move this into html.formother.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
Class to manage establishments.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
establishment_prepare_head($object)
Return head table for establishment tabs screen.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_banner_tab($object, $paramid, $morehtml= '', $shownav=1, $fieldid= 'rowid', $fieldref= 'ref', $morehtmlref= '', $moreparam= '', $nodbprefix=0, $morehtmlleft= '', $morehtmlstatus= '', $onlybanner=0, $morehtmlright= '')
Show tab footer of a card.