Go to the documentation of this file.
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)) {
44 $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));
46 $search_agenda_label =
GETPOST(
'search_agenda_label');
48 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
49 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
50 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
52 if (empty($page) || $page == -1) {
55 $offset = $limit * $page;
56 $pageprev = $page - 1;
57 $pagenext = $page + 1;
59 $sortfield =
'a.datep,a.id';
62 $sortorder =
'DESC,DESC';
68 $diroutputmassaction = $conf->hrm->dir_output.
'/temp/massgeneration/'.$user->id;
69 $hookmanager->initHooks(array(
'hrmagenda',
'globalcard'));
71 $extrafields->fetch_name_optionals_label($object->table_element);
74 include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
75 if ($id > 0 || !empty($ref)) {
76 $upload_dir = $conf->hrm->multidir_output[$object->entity].
"/".$object->id;
79 $permissiontoread = $user->admin;
80 $permissiontoadd = $user->rights->hrm->write;
81 $upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1];
96 $parameters = array(
'id'=>$id);
97 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
102 if (empty($reshook)) {
104 if (
GETPOST(
'cancel',
'alpha') && !empty($backtopage)) {
105 header(
"Location: ".$backtopage);
110 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
112 $search_agenda_label =
'';
124 if ($object->id > 0) {
125 $title = $langs->trans(
"Agenda");
130 if (!empty($conf->notification->enabled)) {
131 $langs->load(
"mails");
136 print
dol_get_fiche_head($head,
'info', $langs->trans(
"Establishment"), -1, $object->picto);
140 $linkback =
'<a href="'.DOL_URL_ROOT.
'/hrm/hrm/myobject_list.php?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
142 $morehtmlref =
'<div class="refidno">';
180 $morehtmlref .=
'</div>';
183 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
185 print
'<div class="fichecenter">';
186 print
'<div class="underbanner clearboth"></div>';
188 $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.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
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.
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
establishment_prepare_head($object)
Return head table for establishment tabs screen.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Class to manage establishments.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.