dolibarr 22.0.5
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';
29require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
30require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
31require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
32require_once DOL_DOCUMENT_ROOT.'/bookcal/class/availabilities.class.php';
33require_once DOL_DOCUMENT_ROOT.'/bookcal/lib/bookcal_availabilities.lib.php';
34
44// Load translation files required by the page
45$langs->loadLangs(array("agenda", "other"));
46
47// Get parameters
48$id = GETPOSTINT('id');
49$ref = GETPOST('ref', 'alpha');
50$lineid = GETPOSTINT('lineid');
51
52$action = GETPOST('action', 'aZ09');
53$confirm = GETPOST('confirm', 'alpha');
54$cancel = GETPOST('cancel');
55$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
56$backtopage = GETPOST('backtopage', 'alpha');
57$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
58$dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
59
60// Initialize a technical objects
61$object = new Availabilities($db);
62$extrafields = new ExtraFields($db);
63$diroutputmassaction = $conf->bookcal->dir_output.'/temp/massgeneration/'.$user->id;
64$hookmanager->initHooks(array('availabilitiescard', 'globalcard')); // Note that conf->hooks_modules contains array
65
66// Fetch optionals attributes and labels
67$extrafields->fetch_name_optionals_label($object->table_element);
68
69$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
70
71// Initialize array of search criteria
72$search_all = GETPOST("search_all", 'alpha');
73$search = array();
74foreach ($object->fields as $key => $val) {
75 if (GETPOST('search_'.$key, 'alpha')) {
76 $search[$key] = GETPOST('search_'.$key, 'alpha');
77 }
78}
79
80if (empty($action) && empty($id) && empty($ref)) {
81 $action = 'view';
82}
83
84// Load object
85include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
86
87//avoid warning on missing/undef entity
88$object->entity = ((GETPOSTISSET('entity') && GETPOST('entity') != '') ? GETPOSTINT('entity') : $conf->entity);
89
90// There is several ways to check permission.
91// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
92$enablepermissioncheck = 0;
93if ($enablepermissioncheck) {
94 $permissiontoread = $user->hasRight('bookcal', 'availabilities', 'read');
95 $permissiontoadd = $user->hasRight('bookcal', 'availabilities', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
96 $permissiontodelete = $user->hasRight('bookcal', 'availabilities', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
97 $permissionnote = $user->hasRight('bookcal', 'availabilities', 'write'); // Used by the include of actions_setnotes.inc.php
98 $permissiondellink = $user->hasRight('bookcal', 'availabilities', 'write'); // Used by the include of actions_dellink.inc.php
99} else {
100 $permissiontoread = 1;
101 $permissiontoadd = 1; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
102 $permissiontodelete = 1;
103 $permissionnote = 1;
104 $permissiondellink = 1;
105}
106
107$upload_dir = $conf->bookcal->multidir_output[isset($object->entity) ? $object->entity : 1].'/availabilities';
108
109// Security check (enable the most restrictive one)
110//if ($user->socid > 0) accessforbidden();
111//if ($user->socid > 0) $socid = $user->socid;
112//$isdraft = (isset($object->status) && ($object->status == $object::STATUS_DRAFT) ? 1 : 0);
113//restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
114if (!isModEnabled('bookcal')) {
116}
117if (!$permissiontoread) {
119}
120
121
122/*
123 * Actions
124 */
125
126$error = 0;
127
128$parameters = array();
129$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
130if ($reshook < 0) {
131 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
132}
133
134if (empty($reshook)) {
135 $backurlforlist = dol_buildpath('/bookcal/availabilities_list.php', 1);
136
137 if (empty($backtopage) || ($cancel && empty($id))) {
138 if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
139 if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
140 $backtopage = $backurlforlist;
141 } else {
142 $backtopage = dol_buildpath('/bookcal/availabilities_card.php', 1).'?id='.((!empty($id) && $id > 0) ? $id : '__ID__');
143 }
144 }
145 }
146
147 $triggermodname = 'BOOKCAL_AVAILABILITIES_MODIFY'; // Name of trigger action code to execute when we modify record
148
149 $startday = GETPOSTINT('startday');
150 $startmonth = GETPOSTINT('startmonth');
151 $startyear = GETPOSTINT('startyear');
152 $starthour = GETPOSTINT('startHour');
153
154 if (GETPOST('startHour') == "" && ($action == 'add' || $action == 'update')) { // Test on permission not required
155 $error++;
156 setEventMessages($langs->trans("ErrorStartHourIsNull"), $hookmanager->errors, 'errors');
157 }
158
159 $dateStartTimestamp = dol_mktime($starthour, 0, 0, $startmonth, $startday, $startyear);
160
161 $endday = GETPOSTINT('endday');
162 $endmonth = GETPOSTINT('endmonth');
163 $endyear = GETPOSTINT('endyear');
164 $endhour = GETPOSTINT('endHour');
165
166 if (GETPOST('endHour') == "" && ($action == 'add' || $action == 'update')) { // Test on permission not required
167 $error++;
168 setEventMessages($langs->trans("ErrorEndHourIsNull"), $hookmanager->errors, 'errors');
169 }
170
171 $dateEndTimestamp = dol_mktime($endhour, 0, 0, $endmonth, $endday, $endyear);
172
173 // check hours
174 if ($starthour > $endhour) {
175 if ($dateStartTimestamp === $dateEndTimestamp) {
176 $error++;
177 setEventMessages($langs->trans("ErrorEndTimeMustBeGreaterThanStartTime"), $hookmanager->errors, 'errors');
178 }
179 }
180
181 // check date
182 if (($dateStartTimestamp != "") && ($dateStartTimestamp >= $dateEndTimestamp)) {
183 $error++;
184 setEventMessages($langs->trans("ErrorIncoherentDates"), $hookmanager->errors, 'errors');
185 }
186
187
188 // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
189 include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
190
191 // Actions when linking object each other
192 include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
193
194 // Actions when printing a doc from card
195 include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
196
197 // Action to move up and down lines of object
198 //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';
199
200 // Action to build doc
201 include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
202
203 if ($action == 'set_thirdparty' && $permissiontoadd) {
204 $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname);
205 }
206 if ($action == 'classin' && $permissiontoadd) {
207 $object->setProject(GETPOSTINT('projectid'));
208 }
209
210 // Actions to send emails
211 $triggersendname = 'BOOKCAL_AVAILABILITIES_SENTBYMAIL';
212 $autocopy = 'MAIN_MAIL_AUTOCOPY_AVAILABILITIES_TO';
213 $trackid = 'availabilities'.$object->id;
214 include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
215}
216
217
218
219
220/*
221 * View
222 *
223 * Put here all code to build page
224 */
225
226$form = new Form($db);
227$formfile = new FormFile($db);
228$formproject = new FormProjets($db);
229
230$title = $langs->trans("Availabilities");
231$help_url = '';
232llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-bookcal page-card_availabilities');
233
234// Part to create
235if ($action == 'create') {
236 if (empty($permissiontoadd)) {
237 accessforbidden($langs->trans('NotEnoughPermissions'), 0, 1);
238 }
239
240 print load_fiche_titre($langs->trans("NewAvailabilities"), '', 'object_'.$object->picto);
241 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
242 print '<input type="hidden" name="token" value="'.newToken().'">';
243 if ($error != 0) {
244 print '<input type="hidden" name="action" value="create">';
245 } else {
246 print '<input type="hidden" name="action" value="add">';
247 }
248 if ($backtopage) {
249 print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
250 }
251 if ($backtopageforcancel) {
252 print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
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="'.$_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, $soc);
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.(!empty($object->socid) ? '&socid='.$object->socid : '').'&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:48
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:67
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.
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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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.
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.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0)
Clean a string to use it as a file name.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.