dolibarr 23.0.3
availabilities_card.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2022 Alice Adminson <aadminson@example.com>
4 * Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
5 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
27// Load Dolibarr environment
28require '../main.inc.php';
37require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
38require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
39require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
40require_once DOL_DOCUMENT_ROOT.'/bookcal/class/availabilities.class.php';
41require_once DOL_DOCUMENT_ROOT.'/bookcal/lib/bookcal_availabilities.lib.php';
42
43// Load translation files required by the page
44$langs->loadLangs(array("agenda", "other"));
45
46// Get parameters
47$id = GETPOSTINT('id');
48$ref = GETPOST('ref', 'alpha');
49$lineid = GETPOSTINT('lineid');
50
51$action = GETPOST('action', 'aZ09');
52$confirm = GETPOST('confirm', 'alpha');
53$cancel = GETPOST('cancel', 'alpha');
54$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
55$backtopage = GETPOST('backtopage', 'alpha');
56$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
57$dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
58
59// Initialize a technical objects
60$object = new Availabilities($db);
61$extrafields = new ExtraFields($db);
62$diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user->id;
63$hookmanager->initHooks(array('availabilitiescard', 'globalcard')); // Note that conf->hooks_modules contains array
64
65// Fetch optionals attributes and labels
66$extrafields->fetch_name_optionals_label($object->table_element);
67
68$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
69
70// Initialize array of search criteria
71$search_all = GETPOST("search_all", 'alpha');
72$search = array();
73foreach ($object->fields as $key => $val) {
74 if (GETPOST('search_'.$key, 'alpha')) {
75 $search[$key] = GETPOST('search_'.$key, 'alpha');
76 }
77}
78
79if (empty($action) && empty($id) && empty($ref)) {
80 $action = 'view';
81}
82
83// Load object
84include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
85
86//avoid warning on missing/undef entity
87$object->entity = ((GETPOSTISSET('entity') && GETPOST('entity') != '') ? GETPOSTINT('entity') : $conf->entity);
88
89// There is several ways to check permission.
90// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
91$enablepermissioncheck = 0;
92if ($enablepermissioncheck) {
93 $permissiontoread = $user->hasRight('bookcal', 'availabilities', 'read');
94 $permissiontoadd = $user->hasRight('bookcal', 'availabilities', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
95 $permissiontodelete = $user->hasRight('bookcal', 'availabilities', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
96 $permissionnote = $user->hasRight('bookcal', 'availabilities', 'write'); // Used by the include of actions_setnotes.inc.php
97 $permissiondellink = $user->hasRight('bookcal', 'availabilities', 'write'); // Used by the include of actions_dellink.inc.php
98} else {
99 $permissiontoread = 1;
100 $permissiontoadd = 1; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
101 $permissiontodelete = 1;
102 $permissionnote = 1;
103 $permissiondellink = 1;
104}
105
106$upload_dir = $conf->bookcal->multidir_output[isset($object->entity) ? $object->entity : 1].'/availabilities';
107
108// Security check (enable the most restrictive one)
109//if ($user->socid > 0) accessforbidden();
110//if ($user->socid > 0) $socid = $user->socid;
111//$isdraft = (isset($object->status) && ($object->status == $object::STATUS_DRAFT) ? 1 : 0);
112//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
113if (!isModEnabled("bookcal")) {
115}
116if (!$permissiontoread) {
118}
119
120$error = 0;
121
122
123/*
124 * Actions
125 */
126
127$parameters = array();
128$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
129if ($reshook < 0) {
130 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
131}
132
133if (empty($reshook)) {
134 $backurlforlist = dol_buildpath('/bookcal/availabilities_list.php', 1);
135
136 if (empty($backtopage) || ($cancel && empty($id))) {
137 if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
138 if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
139 $backtopage = $backurlforlist;
140 } else {
141 $backtopage = dol_buildpath('/bookcal/availabilities_card.php', 1).'?id='.((!empty($id) && $id > 0) ? $id : '__ID__');
142 }
143 }
144 }
145
146 $triggermodname = 'BOOKCAL_AVAILABILITIES_MODIFY'; // Name of trigger action code to execute when we modify record
147
148 $startday = GETPOSTINT('startday');
149 $startmonth = GETPOSTINT('startmonth');
150 $startyear = GETPOSTINT('startyear');
151 $starthour = GETPOSTINT('startHour');
152
153 $dateStartTimestamp = dol_mktime($starthour, 0, 0, $startmonth, $startday, $startyear);
154
155 $endday = GETPOSTINT('endday');
156 $endmonth = GETPOSTINT('endmonth');
157 $endyear = GETPOSTINT('endyear');
158 $endhour = GETPOSTINT('endHour');
159
160 $dateEndTimestamp = dol_mktime($endhour, 0, 0, $endmonth, $endday, $endyear);
161
162 if (! $cancel) {
163 if (GETPOST('startHour') == "" && ($action == 'add' || $action == 'update')) { // Test on permission not required
164 $error++;
165 setEventMessages($langs->trans("ErrorStartHourIsNull"), $hookmanager->errors, 'errors');
166 }
167 if (GETPOST('endHour') == "" && ($action == 'add' || $action == 'update')) { // Test on permission not required
168 $error++;
169 setEventMessages($langs->trans("ErrorEndHourIsNull"), $hookmanager->errors, 'errors');
170 }
171 // Check hours
172 if ($starthour > $endhour) {
173 if ($dateStartTimestamp === $dateEndTimestamp) {
174 $error++;
175 setEventMessages($langs->trans("ErrorEndTimeMustBeGreaterThanStartTime"), $hookmanager->errors, 'errors');
176 }
177 }
178 // Check date
179 if (($dateStartTimestamp != "") && ($dateStartTimestamp >= $dateEndTimestamp)) {
180 $error++;
181 setEventMessages($langs->trans("ErrorIncoherentDates"), $hookmanager->errors, 'errors');
182 }
183 }
184
185 // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
186 include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
187
188 // Actions when linking object each other
189 include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
190
191 // Actions when printing a doc from card
192 include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
193
194 // Action to move up and down lines of object
195 //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';
196
197 // Action to build doc
198 include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
199
200 if ($action == 'set_thirdparty' && $permissiontoadd) {
201 $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname);
202 }
203 if ($action == 'classin' && $permissiontoadd) {
204 $object->setProject(GETPOSTINT('projectid'));
205 }
206
207 // Actions to send emails
208 $triggersendname = 'BOOKCAL_AVAILABILITIES_SENTBYMAIL';
209 $autocopy = 'MAIN_MAIL_AUTOCOPY_AVAILABILITIES_TO';
210 $trackid = 'availabilities'.$object->id;
211 include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
212}
213
214
215
216
217/*
218 * View
219 *
220 * Put here all code to build page
221 */
222
223$form = new Form($db);
224$formfile = new FormFile($db);
225$formproject = new FormProjets($db);
226
227$title = $langs->trans("Availabilities");
228$help_url = '';
229llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-bookcal page-card_availabilities');
230
231// Part to create
232if ($action == 'create') {
233 if (empty($permissiontoadd)) {
234 accessforbidden($langs->trans('NotEnoughPermissions'), 0, 1);
235 }
236
237 print load_fiche_titre($langs->trans("NewAvailabilities"), '', 'object_'.$object->picto);
238 print '<form method="POST" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
239 print '<input type="hidden" name="token" value="'.newToken().'">';
240 if ($error != 0) {
241 print '<input type="hidden" name="action" value="create">';
242 } else {
243 print '<input type="hidden" name="action" value="add">';
244 }
245 if ($backtopage) {
246 print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
247 }
248 if ($backtopageforcancel) {
249 print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
250 }
251 if ($dol_openinpopup) {
252 print '<input type="hidden" name="dol_openinpopup" value="'.$dol_openinpopup.'">';
253 }
254
255 print dol_get_fiche_head(array(), '');
256
257 print '<table class="border centpercent tableforfieldcreate">'."\n";
258
259 // Common attributes
260 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php';
261
262 // Other attributes
263 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
264
265 print '</table>'."\n";
266
267 print dol_get_fiche_end();
268
269 print $form->buttonsSaveCancel("Create");
270
271 print '</form>';
272
273 //dol_set_focus('input[name="ref"]');
274}
275
276// Part to edit record
277if (($id || $ref) && $action == 'edit') {
278 print load_fiche_titre($langs->trans("Availabilities"), '', 'object_'.$object->picto);
279
280 print '<form method="POST" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
281 print '<input type="hidden" name="token" value="'.newToken().'">';
282 print '<input type="hidden" name="action" value="update">';
283 print '<input type="hidden" name="id" value="'.$object->id.'">';
284 if ($backtopage) {
285 print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
286 }
287 if ($backtopageforcancel) {
288 print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
289 }
290
291 print dol_get_fiche_head();
292
293 print '<table class="border centpercent tableforfieldedit">'."\n";
294
295 // Common attributes
296 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
297
298 // Other attributes
299 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
300
301 print '</table>';
302
303 print dol_get_fiche_end();
304
305 print $form->buttonsSaveCancel();
306
307 print '</form>';
308}
309
310// Part to show record
311if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
312 $res = $object->fetch_optionals();
313
314 $head = availabilitiesPrepareHead($object);
315 print dol_get_fiche_head($head, 'card', $langs->trans("Availabilities"), -1, $object->picto);
316
317 $formconfirm = '';
318
319 // Confirmation to delete
320 if ($action == 'delete') {
321 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteAvailabilities'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1);
322 }
323 // Confirmation to delete line
324 if ($action == 'deleteline') {
325 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
326 }
327
328 // Clone confirmation
329 if ($action == 'clone') {
330 // Create an array for form
331 $formquestion = array();
332 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
333 }
334
335 // Call Hook formConfirm
336 $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid);
337 $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
338 if (empty($reshook)) {
339 $formconfirm .= $hookmanager->resPrint;
340 } elseif ($reshook > 0) {
341 $formconfirm = $hookmanager->resPrint;
342 }
343
344 // Print form confirm
345 print $formconfirm;
346
347
348 // Object card
349 // ------------------------------------------------------------
350 $linkback = '<a href="'.dol_buildpath('/bookcal/availabilities_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
351
352 $morehtmlref = '<div class="refidno">';
353 $morehtmlref .= '</div>';
354
355
356 dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
357
358
359 print '<div class="fichecenter">';
360 print '<div class="fichehalfleft">';
361 print '<div class="underbanner clearboth"></div>';
362 print '<table class="border centpercent tableforfield">'."\n";
363
364 // Common attributes
365 //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field
366 //unset($object->fields['fk_project']); // Hide field already shown in banner
367 //unset($object->fields['fk_soc']); // Hide field already shown in banner
368 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
369
370 // Other attributes. Fields from hook formObjectOptions and Extrafields.
371 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
372
373 print '</table>';
374 print '</div>';
375 print '</div>';
376
377 print '<div class="clearboth"></div>';
378
379 print dol_get_fiche_end();
380
381
382 /*
383 * Lines
384 */
385
386 if (!empty($object->table_element_line)) {
387 // Show object lines
388 $result = $object->getLinesArray();
389
390 print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '' : '#line_'.GETPOSTINT('lineid')).'" method="POST">
391 <input type="hidden" name="token" value="' . newToken().'">
392 <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
393 <input type="hidden" name="mode" value="">
394 <input type="hidden" name="page_y" value="">
395 <input type="hidden" name="id" value="' . $object->id.'">
396 ';
397
398 if (!empty($conf->use_javascript_ajax) && $object->status == 0) {
399 include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
400 }
401
402 print '<div class="div-table-responsive-no-min">';
403 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) {
404 print '<table id="tablelines" class="noborder noshadow" width="100%">';
405 }
406
407 if (!empty($object->lines)) {
408 $object->printObjectLines($action, $mysoc, null, GETPOSTINT('lineid'), 1);
409 }
410
411 // Form to add new line
412 if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') {
413 if ($action != 'editline') {
414 // Add products/services form
415
416 $parameters = array();
417 $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
418 if ($reshook < 0) {
419 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
420 }
421 if (empty($reshook)) {
422 $object->formAddObjectLine(1, $mysoc, $mysoc);
423 }
424 }
425 }
426
427 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) {
428 print '</table>';
429 }
430 print '</div>';
431
432 print "</form>\n";
433 }
434
435
436 // Buttons for actions
437
438 if ($action != 'presend' && $action != 'editline') {
439 print '<div class="tabsAction">'."\n";
440 $parameters = array();
441 $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
442 if ($reshook < 0) {
443 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
444 }
445
446 if (empty($reshook)) {
447 // Send
448 if (empty($user->socid)) {
449 print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle');
450 }
451
452 // Back to draft
453 if ($object->status == $object::STATUS_VALIDATED) {
454 print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd);
455 }
456
457 print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd);
458
459 // Validate
460 if ($object->status == $object::STATUS_DRAFT) {
461 if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) {
462 print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken(), '', $permissiontoadd);
463 } else {
464 $langs->load("errors");
465 print dolGetButtonAction($langs->trans("ErrorAddAtLeastOneLineFirst"), $langs->trans("Validate"), 'default', '#', '', 0);
466 }
467 }
468
469 // Clone
470 print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=clone&token='.newToken(), '', $permissiontoadd);
471
472 /*
473 if ($permissiontoadd) {
474 if ($object->status == $object::STATUS_ENABLED) {
475 print dolGetButtonAction($langs->trans('Disable'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable&token='.newToken(), '', $permissiontoadd);
476 } else {
477 print dolGetButtonAction($langs->trans('Enable'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable&token='.newToken(), '', $permissiontoadd);
478 }
479 }
480 if ($permissiontoadd) {
481 if ($object->status == $object::STATUS_VALIDATED) {
482 print dolGetButtonAction($langs->trans('Cancel'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=close&token='.newToken(), '', $permissiontoadd);
483 } else {
484 print dolGetButtonAction($langs->trans('Re-Open'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen&token='.newToken(), '', $permissiontoadd);
485 }
486 }
487 */
488
489 // Delete (need delete permission, or if draft, just need create/modify permission)
490 print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
491 }
492 print '</div>'."\n";
493 }
494
495
496 // Select mail models is same action as presend
497 if (GETPOST('modelselected')) {
498 $action = 'presend';
499 }
500
501 if ($action != 'presend') {
502 print '<div class="fichecenter"><div class="fichehalfleft">';
503 print '<a name="builddoc"></a>'; // ancre
504
505 $includedocgeneration = 0;
506
507 // Documents
508 if ($includedocgeneration) {
509 $objref = dol_sanitizeFileName($object->ref);
510 $relativepath = $objref.'/'.$objref.'.pdf';
511 $filedir = $conf->bookcal->dir_output.'/'.$object->element.'/'.$objref;
512 $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
513 $genallowed = $permissiontoread; // If you can read, you can build the PDF to read content
514 $delallowed = $permissiontoadd; // If you can create/edit, you can remove a file on card
515 print $formfile->showdocuments('bookcal:Availabilities', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
516 }
517
518 // Show links to link elements
519 $tmparray = $form->showLinkToObjectBlock($object, array(), array('availabilities'), 1);
520 $linktoelem = $tmparray['linktoelem'];
521 $htmltoenteralink = $tmparray['htmltoenteralink'];
522 print $htmltoenteralink;
523
524 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
525
526
527 print '</div><div class="fichehalfright">';
528
529 $MAXEVENT = 10;
530
531 $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', dol_buildpath('/bookcal/availabilities_agenda.php', 1).'?id='.$object->id);
532
533 // List of actions on element
534 include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
535 $formactions = new FormActions($db);
536 $somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter);
537
538 print '</div></div>';
539 }
540
541 //Select mail models is same action as presend
542 if (GETPOST('modelselected')) {
543 $action = 'presend';
544 }
545
546 // Presend form
547 $modelmail = 'availabilities';
548 $defaulttopic = 'InformationMessage';
549 $diroutput = $conf->bookcal->dir_output;
550 $trackid = 'availabilities'.$object->id;
551
552 include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
553}
554
555// End of page
556llxFooter();
557$db->close();
$id
Support class for third parties, contacts, members, users or resources.
Definition account.php:47
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:73
availabilitiesPrepareHead($object)
Prepare array of tabs for Availabilities.
Class for Availabilities.
Class to manage standard extra fields.
Class to manage building of HTML components.
Class to offer components to list and upload files.
Class to manage generation of HTML components Only common components must be here.
Class to manage building of HTML components.
global $mysoc
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
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.