47if (!$res && !empty($_SERVER[
"CONTEXT_DOCUMENT_ROOT"])) {
48 $res = @include $_SERVER[
"CONTEXT_DOCUMENT_ROOT"].
"/main.inc.php";
51$tmp = empty($_SERVER[
'SCRIPT_FILENAME']) ?
'' : $_SERVER[
'SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
52while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) {
56if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1)).
"/main.inc.php")) {
57 $res = @include substr($tmp, 0, ($i + 1)).
"/main.inc.php";
59if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1))).
"/main.inc.php")) {
60 $res = @include dirname(substr($tmp, 0, ($i + 1))).
"/main.inc.php";
63if (!$res && file_exists(
"../main.inc.php")) {
64 $res = @include
"../main.inc.php";
66if (!$res && file_exists(
"../../main.inc.php")) {
67 $res = @include
"../../main.inc.php";
69if (!$res && file_exists(
"../../../main.inc.php")) {
70 $res = @include
"../../../main.inc.php";
73 die(
"Include of main fails");
80$langs->loadLangs(array(
"bookcal@bookcal",
"companies"));
85$action =
GETPOST(
'action',
'aZ09');
86$cancel =
GETPOST(
'cancel',
'aZ09');
87$backtopage =
GETPOST(
'backtopage',
'alpha');
92$diroutputmassaction = $conf->bookcal->dir_output.
'/temp/massgeneration/'.$user->id;
93$hookmanager->initHooks(array(
'calendarnote',
'globalcard'));
95$extrafields->fetch_name_optionals_label($object->table_element);
98include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
99if ($id > 0 || !empty($ref)) {
100 $upload_dir = $conf->bookcal->multidir_output[empty($object->entity) ? $conf->entity : $object->entity].
"/".$object->id;
106$enablepermissioncheck = 0;
107if ($enablepermissioncheck) {
108 $permissiontoread = $user->rights->bookcal->calendar->read;
109 $permissiontoadd = $user->rights->bookcal->calendar->write;
110 $permissionnote = $user->rights->bookcal->calendar->write;
112 $permissiontoread = 1;
113 $permissiontoadd = 1;
122if (!isModEnabled(
"bookcal")) {
125if (!$permissiontoread) {
134$parameters = array();
135$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
139if (empty($reshook)) {
140 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
148$form =
new Form($db);
152$title = $langs->trans(
'Calendar').
' - '.$langs->trans(
"Notes");
155if ($id > 0 || !empty($ref)) {
156 $object->fetch_thirdparty();
160 print
dol_get_fiche_head($head,
'note', $langs->trans(
"Calendar"), -1, $object->picto);
164 $linkback =
'<a href="'.dol_buildpath(
'/bookcal/calendar_list.php', 1).
'?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
166 $morehtmlref =
'<div class="refidno">';
203 $morehtmlref .=
'</div>';
206 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
209 print
'<div class="fichecenter">';
210 print
'<div class="underbanner clearboth"></div>';
213 $cssclass =
"titlefield";
214 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
calendarPrepareHead($object)
Prepare array of tabs for Calendar.
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='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
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.