24 require
'../../main.inc.php';
25 require_once DOL_DOCUMENT_ROOT.
'/core/lib/hrm.lib.php';
26 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
27 require_once DOL_DOCUMENT_ROOT.
'/hrm/class/establishment.class.php';
30 $langs->loadLangs(array(
'admin',
'hrm'));
35 $action =
GETPOST(
'action',
'aZ09');
36 $cancel =
GETPOST(
'cancel',
'aZ09');
37 $backtopage =
GETPOST(
'backtopage',
'alpha');
39 if (
GETPOST(
'actioncode',
'array')) {
40 $actioncode =
GETPOST(
'actioncode',
'array', 3);
41 if (!count($actioncode)) {
47 $search_agenda_label =
GETPOST(
'search_agenda_label');
49 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
50 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
51 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
53 if (empty($page) || $page == -1) {
56 $offset = $limit * $page;
57 $pageprev = $page - 1;
58 $pagenext = $page + 1;
60 $sortfield =
'a.datep,a.id';
63 $sortorder =
'DESC,DESC';
69 $diroutputmassaction = $conf->hrm->dir_output.
'/temp/massgeneration/'.$user->id;
70 $hookmanager->initHooks(array(
'hrmagenda',
'globalcard'));
72 $extrafields->fetch_name_optionals_label($object->table_element);
75 include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
76 if ($id > 0 || !empty($ref)) {
77 $upload_dir = $conf->hrm->multidir_output[$object->entity].
"/".$object->id;
80 $permissiontoread = $user->admin;
81 $permissiontoadd = $user->rights->hrm->write;
82 $upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1];
97 $parameters = array(
'id'=>$id);
98 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
103 if (empty($reshook)) {
105 if (
GETPOST(
'cancel',
'alpha') && !empty($backtopage)) {
106 header(
"Location: ".$backtopage);
111 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
113 $search_agenda_label =
'';
125 if ($object->id > 0) {
126 $title = $langs->trans(
"Agenda");
132 $langs->load(
"mails");
137 print
dol_get_fiche_head($head,
'info', $langs->trans(
"Establishment"), -1, $object->picto);
141 $linkback =
'<a href="'.DOL_URL_ROOT.
'/hrm/hrm/myobject_list.php?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
143 $morehtmlref =
'<div class="refidno">';
181 $morehtmlref .=
'</div>';
184 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
186 print
'<div class="fichecenter">';
187 print
'<div class="underbanner clearboth"></div>';
189 $object->info($object->id);
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.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage establishments.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
establishment_prepare_head($object)
Return head table for establishment tabs screen.
dol_print_object_info($object, $usetable=0)
Show informations on an object TODO Move this into html.formother.
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.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
isModEnabled($module)
Is Dolibarr module enabled.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.