28 require
'../main.inc.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
33 require_once DOL_DOCUMENT_ROOT.
"/cron/class/cronjob.class.php";
34 require_once DOL_DOCUMENT_ROOT.
"/core/class/html.formcron.class.php";
35 require_once DOL_DOCUMENT_ROOT.
'/core/lib/cron.lib.php';
38 $langs->loadLangs(array(
'admin',
'cron',
'members',
'bills'));
41 $action =
GETPOST(
'action',
'aZ09');
42 $confirm =
GETPOST(
'confirm',
'alpha');
43 $cancel =
GETPOST(
'cancel',
'alpha');
44 $backtopage =
GETPOST(
'backtopage',
'alpha');
45 $backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
47 $securitykey =
GETPOST(
'securitykey',
'alpha');
49 $permissiontoadd = $user->rights->cron->create;
51 if (!$user->rights->cron->create) {
62 $result = $object->fetch($id);
68 if (!empty($cancel)) {
69 if (!empty($id) && empty($backtopage)) {
73 header(
"Location: ".$backtopage);
76 header(
"Location: ".DOL_URL_ROOT.
'/cron/list.php');
83 if ($action ==
'confirm_delete' && $confirm ==
"yes" && $user->rights->cron->delete) {
84 $result = $object->delete($user);
90 Header(
"Location: ".DOL_URL_ROOT.
'/cron/list.php');
96 if ($action ==
'confirm_execute' && $confirm ==
"yes" && $user->rights->cron->execute) {
97 if (!empty($conf->global->CRON_KEY) && $conf->global->CRON_KEY != $securitykey) {
103 $result = $object->run_jobs($user->login);
109 $res = $object->reprogram_jobs($user->login, $now);
111 if ($object->lastresult > 0) {
126 if ($action ==
'add') {
127 $object->jobtype =
GETPOST(
'jobtype');
128 $object->label =
GETPOST(
'label');
129 $object->command =
GETPOST(
'command');
130 $object->classesname =
GETPOST(
'classesname',
'alphanohtml');
131 $object->objectname =
GETPOST(
'objectname',
'aZ09');
132 $object->methodename =
GETPOST(
'methodename',
'aZ09');
133 $object->params =
GETPOST(
'params');
134 $object->md5params =
GETPOST(
'md5params');
135 $object->module_name =
GETPOST(
'module_name');
136 $object->note_private =
GETPOST(
'note',
'restricthtml');
137 $object->datestart =
dol_mktime(
GETPOST(
'datestarthour',
'int'),
GETPOST(
'datestartmin',
'int'), 0,
GETPOST(
'datestartmonth',
'int'),
GETPOST(
'datestartday',
'int'),
GETPOST(
'datestartyear',
'int'));
138 $object->dateend =
dol_mktime(
GETPOST(
'dateendhour',
'int'),
GETPOST(
'dateendmin',
'int'), 0,
GETPOST(
'dateendmonth',
'int'),
GETPOST(
'dateendday',
'int'),
GETPOST(
'dateendyear',
'int'));
139 $object->priority =
GETPOST(
'priority',
'int');
140 $object->datenextrun =
dol_mktime(
GETPOST(
'datenextrunhour',
'int'),
GETPOST(
'datenextrunmin',
'int'), 0,
GETPOST(
'datenextrunmonth',
'int'),
GETPOST(
'datenextrunday',
'int'),
GETPOST(
'datenextrunyear',
'int'));
141 $object->unitfrequency =
GETPOST(
'unitfrequency',
'int');
142 $object->frequency =
GETPOST(
'nbfrequency',
'int');
143 $object->maxrun =
GETPOST(
'maxrun',
'int');
144 $object->email_alert =
GETPOST(
'email_alert');
147 $result = $object->create($user);
160 if ($action ==
'update') {
162 $object->jobtype =
GETPOST(
'jobtype');
163 $object->label =
GETPOST(
'label');
164 $object->command =
GETPOST(
'command');
165 $object->classesname =
GETPOST(
'classesname',
'alphanohtml');
166 $object->objectname =
GETPOST(
'objectname',
'aZ09');
167 $object->methodename =
GETPOST(
'methodename',
'aZ09');
168 $object->params =
GETPOST(
'params');
169 $object->md5params =
GETPOST(
'md5params');
170 $object->module_name =
GETPOST(
'module_name');
171 $object->note_private =
GETPOST(
'note',
'restricthtml');
172 $object->datestart =
dol_mktime(
GETPOST(
'datestarthour',
'int'),
GETPOST(
'datestartmin',
'int'), 0,
GETPOST(
'datestartmonth',
'int'),
GETPOST(
'datestartday',
'int'),
GETPOST(
'datestartyear',
'int'));
173 $object->dateend =
dol_mktime(
GETPOST(
'dateendhour',
'int'),
GETPOST(
'dateendmin',
'int'), 0,
GETPOST(
'dateendmonth',
'int'),
GETPOST(
'dateendday',
'int'),
GETPOST(
'dateendyear',
'int'));
174 $object->priority =
GETPOST(
'priority',
'int');
175 $object->datenextrun =
dol_mktime(
GETPOST(
'datenextrunhour',
'int'),
GETPOST(
'datenextrunmin',
'int'), 0,
GETPOST(
'datenextrunmonth',
'int'),
GETPOST(
'datenextrunday',
'int'),
GETPOST(
'datenextrunyear',
'int'));
176 $object->unitfrequency =
GETPOST(
'unitfrequency',
'int');
177 $object->frequency =
GETPOST(
'nbfrequency',
'int');
178 $object->maxrun =
GETPOST(
'maxrun',
'int');
179 $object->email_alert =
GETPOST(
'email_alert');
182 $result = $object->update($user);
194 if ($action ==
'activate') {
198 $result = $object->update($user);
210 if ($action ==
'inactive') {
212 $object->processing = 0;
215 $result = $object->update($user);
228 if ($action ==
'confirm_clone' && $confirm ==
'yes' && !empty($permissiontoadd)) {
229 if (1 == 0 && !
GETPOST(
'clone_content') && !
GETPOST(
'clone_receivers')) {
234 $result = $objectutil->createFromClone($user, (($object->id > 0) ? $object->id : $id));
235 if (is_object($result) || $result > 0) {
237 if (is_object($result)) {
238 $newid = $result->id;
242 header(
"Location: ".$_SERVER[
'PHP_SELF'].
'?id='.$newid);
260 llxHeader(
'', $langs->trans(
"CronTask"));
264 if ($action ==
'create') {
268 if ($conf->use_javascript_ajax) {
269 print
"\n".
'<script type="text/javascript">';
270 print
'jQuery(document).ready(function () {
271 function initfields()
273 if ($("#jobtype option:selected").val()==\'method\') {
274 $(".blockmethod").show();
275 $(".blockcommand").hide();
277 if ($("#jobtype option:selected").val()==\'command\') {
278 $(".blockmethod").hide();
279 $(".blockcommand").show();
283 jQuery("#jobtype").change(function() {
287 print
'</script>'.
"\n";
291 if ($action ==
'delete') {
292 $formconfirm =
$form->formconfirm($_SERVER[
'PHP_SELF'].
"?id=".$object->id, $langs->trans(
"CronDelete"), $langs->trans(
"CronConfirmDelete"),
"confirm_delete",
'',
'', 1);
297 if ($action ==
'execute') {
298 $formconfirm =
$form->formconfirm($_SERVER[
'PHP_SELF'].
"?id=".$object->id.
'&securitykey='.$securitykey, $langs->trans(
"CronExecute"), $langs->trans(
"CronConfirmExecute"),
"confirm_execute",
'',
'', 1);
304 if ($action ==
'clone') {
306 $formquestion = array();
307 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk', $object->ref),
'confirm_clone', $formquestion,
'yes', 1);
318 if (empty($object->status) && $action !=
'create') {
322 if (($action ==
"create") || ($action ==
"edit")) {
323 print
'<form name="cronform" action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
324 print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
325 print
'<input type="hidden" name="backtopage" value="'.GETPOST(
'backtopage').
'">'.
"\n";
326 if (!empty($object->id)) {
327 print
'<input type="hidden" name="action" value="update">'.
"\n";
328 print
'<input type="hidden" name="id" value="'.$object->id.
'">'.
"\n";
330 print
'<input type="hidden" name="action" value="add">'.
"\n";
333 if ($action ==
"edit") {
339 print
'<table class="border centpercent">';
341 print
'<tr><td class="fieldrequired titlefieldcreate">';
342 print $langs->trans(
'CronLabel').
"</td>";
343 print
'<td><input type="text" class="width200" name="label" value="'.dol_escape_htmltag($object->label).
'"> ';
349 print
'<tr><td class="fieldrequired">';
350 print $langs->trans(
'CronType').
"</td><td>";
351 print $formCron->select_typejob(
'jobtype', $object->jobtype);
357 print
'<tr class="blockmethod"><td>';
358 print $langs->trans(
'CronModule').
"</td><td>";
359 print
'<input type="text" class="width200" name="module_name" value="'.dol_escape_htmltag($object->module_name).
'"> ';
362 print
$form->textwithpicto(
'', $langs->trans(
"CronModuleHelp"), 1,
'help');
366 print
'<tr class="blockmethod"><td>';
367 print $langs->trans(
'CronClassFile').
"</td><td>";
368 print
'<input type="text" class="minwidth300" name="classesname" value="'.dol_escape_htmltag($object->classesname).
'"> ';
371 print
$form->textwithpicto(
'', $langs->trans(
"CronClassFileHelp"), 1,
'help');
375 print
'<tr class="blockmethod"><td>';
376 print $langs->trans(
'CronObject').
"</td><td>";
377 print
'<input type="text" class="width200" name="objectname" value="'.dol_escape_htmltag($object->objectname).
'"> ';
380 print
$form->textwithpicto(
'', $langs->trans(
"CronObjectHelp"), 1,
'help');
384 print
'<tr class="blockmethod"><td>';
385 print $langs->trans(
'CronMethod').
"</td><td>";
386 print
'<input type="text" class="minwidth300" name="methodename" value="'.dol_escape_htmltag($object->methodename).
'" /> ';
389 print
$form->textwithpicto(
'', $langs->trans(
"CronMethodHelp"), 1,
'help');
393 print
'<tr class="blockmethod"><td>';
394 print $langs->trans(
'CronArgs').
"</td><td>";
395 print
'<input type="text" class="quatrevingtpercent" name="params" value="'.$object->params.
'" /> ';
398 print
$form->textwithpicto(
'', $langs->trans(
"CronArgsHelp"), 1,
'help');
402 print
'<tr class="blockcommand"><td>';
403 print $langs->trans(
'CronCommand').
"</td><td>";
404 print
'<input type="text" class="minwidth150" name="command" value="'.$object->command.
'" /> ';
407 print
$form->textwithpicto(
'', $langs->trans(
"CronCommandHelp"), 1,
'help');
412 print $langs->trans(
'CronNote').
"</td><td>";
413 $doleditor =
new DolEditor(
'note', $object->note_private,
'', 160,
'dolibarr_notes',
'In',
true,
false, 0, ROWS_4,
'90%');
414 $doleditor->Create();
420 print
'<tr class="blockemailalert"><td>';
421 print $langs->trans(
'EmailIfError').
"</td><td>";
422 print
'<input type="text" class="minwidth150" name="email_alert" value="'.dol_escape_htmltag($object->email_alert).
'" /> ';
429 print
'<tr><td class="fieldrequired">';
430 print $langs->trans(
'CronEvery').
"</td>";
432 print
'<select name="nbfrequency">';
433 for ($i = 1; $i <= 60; $i++) {
434 if ($object->frequency == $i) {
435 print
"<option value='".$i.
"' selected>".$i.
"</option>";
437 print
"<option value='".$i.
"'>".$i.
"</option>";
441 $input =
" <input type=\"radio\" name=\"unitfrequency\" value=\"60\" id=\"frequency_minute\" ";
442 if ($object->unitfrequency ==
"60") {
443 $input .=
' checked />';
447 $input .=
"<label for=\"frequency_minute\">".$langs->trans(
'Minutes').
"</label>";
450 $input =
" <input type=\"radio\" name=\"unitfrequency\" value=\"3600\" id=\"frequency_heures\" ";
451 if ($object->unitfrequency ==
"3600") {
452 $input .=
' checked />';
456 $input .=
"<label for=\"frequency_heures\">".$langs->trans(
'Hours').
"</label>";
459 $input =
" <input type=\"radio\" name=\"unitfrequency\" value=\"86400\" id=\"frequency_jours\" ";
460 if ($object->unitfrequency ==
"86400") {
461 $input .=
' checked />';
465 $input .=
"<label for=\"frequency_jours\">".$langs->trans(
'Days').
"</label>";
468 $input =
" <input type=\"radio\" name=\"unitfrequency\" value=\"604800\" id=\"frequency_semaine\" ";
469 if ($object->unitfrequency ==
"604800") {
470 $input .=
' checked />';
474 $input .=
"<label for=\"frequency_semaine\">".$langs->trans(
'Weeks').
"</label>";
477 $input =
" <input type=\"radio\" name=\"unitfrequency\" value=\"2678400\" id=\"frequency_month\" ";
478 if ($object->unitfrequency ==
"2678400") {
479 $input .=
' checked />';
483 $input .=
"<label for=\"frequency_month\">".$langs->trans(
'Monthly').
"</label>";
492 print $langs->trans(
'CronDtStart').
"</td><td>";
493 if (!empty($object->datestart)) {
494 print
$form->selectDate($object->datestart,
'datestart', 1, 1,
'',
"cronform");
496 print
$form->selectDate(-1,
'datestart', 1, 1, 1,
"cronform");
504 print $langs->trans(
'CronDtEnd').
"</td><td>";
505 if (!empty($object->dateend)) {
506 print
$form->selectDate($object->dateend,
'dateend', 1, 1,
'',
"cronform");
508 print
$form->selectDate(-1,
'dateend', 1, 1, 1,
"cronform");
516 print $langs->trans(
'CronPriority').
"</td>";
518 if (!empty($object->priority)) {
519 $priority = $object->priority;
521 print
'<td><input type="text" class="width50" name="priority" value="'.$priority.
'" /> ';
529 if (!empty($object->maxrun)) {
530 $maxrun = $object->maxrun;
532 print $langs->trans(
'CronMaxRun').
"</td>";
533 print
'<td><input type="text" class="width50" name="maxrun" value="'.$maxrun.
'" /> ';
539 print
'<tr><td class="fieldrequired">';
540 print $langs->trans(
'CronDtNextLaunch');
543 if (!empty($object->datenextrun)) {
544 print
$form->selectDate($object->datenextrun,
'datenextrun', 1, 1,
'',
"cronform");
546 print
$form->selectDate(-1,
'datenextrun', 1, 1,
'',
"cronform", 1, 1);
557 print
$form->buttonsSaveCancel();
568 $linkback =
'<a href="'.DOL_URL_ROOT.
'/cron/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
571 if (preg_match(
'/:(.*)$/', $object->label, $reg)) {
572 $langs->load($reg[1]);
575 $labeltoshow = preg_replace(
'/:.*$/',
'', $object->label);
577 $morehtmlref =
'<div class="refidno">';
578 $morehtmlref .= $langs->trans($labeltoshow);
579 $morehtmlref .=
'</div>';
581 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref);
584 print
'<div class="fichecenter">';
585 print
'<div class="fichehalfleft">';
587 print
'<div class="underbanner clearboth"></div>';
588 print
'<table class="border centpercent tableforfield">';
595 print
'<tr><td class="titlefield">';
596 print $langs->trans(
'CronType').
"</td><td>";
597 print $formCron->select_typejob(
'jobtype', $object->jobtype, 1);
600 print
'<tr class="blockmethod"><td>';
601 print $langs->trans(
'CronModule').
"</td><td>";
605 print
'<tr class="blockmethod"><td>';
606 print $langs->trans(
'CronClassFile').
"</td><td>";
610 print
'<tr class="blockmethod"><td>';
611 print $langs->trans(
'CronObject').
"</td><td>";
615 print
'<tr class="blockmethod"><td>';
616 print $langs->trans(
'CronMethod').
"</td><td>";
620 print
'<tr class="blockmethod"><td>';
621 print $langs->trans(
'CronArgs').
"</td><td>";
625 print
'<tr class="blockcommand"><td>';
626 print $langs->trans(
'CronCommand').
"</td><td>";
631 print $langs->trans(
'CronNote').
"</td><td>";
632 if (!is_null($object->note_private) && $object->note_private !=
'') {
633 print $langs->trans($object->note_private);
637 print
'<tr class="blockemailalert"><td>';
638 print $langs->trans(
'EmailIfError').
"</td><td>";
644 print $langs->trans(
'Entity').
"</td><td>";
645 if (empty($object->entity)) {
646 print
img_picto($langs->trans(
"AllEntities"),
'entity',
'class="pictofixedwidth"').$langs->trans(
"AllEntities");
648 $mc->getInfo($object->entity);
649 print
img_picto($langs->trans(
"AllEntities"),
'entity',
'class="pictofixedwidth"').$mc->label;
657 print
'<div class="fichehalfright">';
659 print
'<div class="underbanner clearboth"></div>';
660 print
'<table class="border centpercent tableforfield">';
662 print
'<tr><td class="titlefield">';
663 print $langs->trans(
'CronEvery').
"</td>";
665 if ($object->unitfrequency ==
"60") {
666 print $langs->trans(
'CronEach').
" ".($object->frequency).
" ".$langs->trans(
'Minutes');
668 if ($object->unitfrequency ==
"3600") {
669 print $langs->trans(
'CronEach').
" ".($object->frequency).
" ".$langs->trans(
'Hours');
671 if ($object->unitfrequency ==
"86400") {
672 print $langs->trans(
'CronEach').
" ".($object->frequency).
" ".$langs->trans(
'Days');
674 if ($object->unitfrequency ==
"604800") {
675 print $langs->trans(
'CronEach').
" ".($object->frequency).
" ".$langs->trans(
'Weeks');
677 if ($object->unitfrequency ==
"2678400") {
678 print $langs->trans(
'CronEach').
" ".($object->frequency).
" ".$langs->trans(
'Month');
683 print $langs->trans(
'CronDtStart').
"</td><td>";
684 if (!empty($object->datestart)) {
685 print
$form->textwithpicto(
dol_print_date($object->datestart,
'dayhoursec'), $langs->trans(
"CurrentTimeZone"));
690 print $langs->trans(
'CronDtEnd').
"</td><td>";
691 if (!empty($object->dateend)) {
692 print
$form->textwithpicto(
dol_print_date($object->dateend,
'dayhoursec'), $langs->trans(
"CurrentTimeZone"));
697 print $langs->trans(
'CronPriority').
"</td>";
698 print
"<td>".$object->priority;
702 print $langs->trans(
'CronMaxRun').
"</td>";
704 print $object->maxrun > 0 ? $object->maxrun :
'';
708 print $langs->trans(
'CronNbRun').
"</td>";
709 print
"<td>".$object->nbrun;
714 print $langs->trans(
'CronDtNextLaunch');
715 print
' ('.$langs->trans(
'CronFrom').
')';
717 if (!$object->status) {
718 print $langs->trans(
"Disabled");
719 } elseif (!empty($object->datenextrun)) {
720 print
img_picto(
'',
'object_calendarday').
' '.
$form->textwithpicto(
dol_print_date($object->datenextrun,
'dayhoursec'), $langs->trans(
"CurrentTimeZone"));
722 print $langs->trans(
'CronNone');
724 if ($object->status == Cronjob::STATUS_ENABLED) {
725 if ($object->maxrun && $object->nbrun >= $object->maxrun) {
727 } elseif ($object->datenextrun && $object->datenextrun < $now) {
739 print
'<div class="underbanner clearboth"></div>';
740 print
'<table class="border centpercent tableforfield">';
742 print
'<tr><td class="titlefield">';
743 print $langs->trans(
'CronDtLastLaunch').
"</td><td>";
744 if (!empty($object->datelastrun)) {
745 print
$form->textwithpicto(
dol_print_date($object->datelastrun,
'dayhoursec'), $langs->trans(
"CurrentTimeZone"));
747 print $langs->trans(
'CronNone');
752 print $langs->trans(
'CronDtLastResult').
"</td><td>";
753 if (!empty($object->datelastresult)) {
754 print
$form->textwithpicto(
dol_print_date($object->datelastresult,
'dayhoursec'), $langs->trans(
"CurrentTimeZone"));
756 if (empty($object->datelastrun)) {
757 print $langs->trans(
'CronNone');
765 print $langs->trans(
'CronLastResult').
"</td><td>";
766 if ($object->lastresult) {
767 print
'<span class="error">';
769 print $object->lastresult;
770 if ($object->lastresult) {
776 print $langs->trans(
'CronLastOutput').
"</td><td>";
777 print
'<span class="small">'.nl2br($object->lastoutput).
'</span>';
784 print
'<div class="clearboth"></div>';
790 print
"\n\n".
'<div class="tabsAction">'.
"\n";
791 if (!$user->rights->cron->create) {
792 print
'<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"NotEnoughPermissions")).
'">'.$langs->trans(
"Edit").
'</a>';
794 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?action=edit&token='.
newToken().
'&id='.$object->id.
'">'.$langs->trans(
"Edit").
'</a>';
797 if ((empty($user->rights->cron->execute))) {
798 print
'<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"NotEnoughPermissions")).
'">'.$langs->trans(
"CronExecute").
'</a>';
799 } elseif (empty($object->status)) {
800 print
'<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"JobDisabled")).
'">'.$langs->trans(
"CronExecute").
'</a>';
802 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?action=execute&token='.
newToken().
'&id='.$object->id.(empty($conf->global->CRON_KEY) ?
'' :
'&securitykey='.$conf->global->CRON_KEY).
'">'.$langs->trans(
"CronExecute").
'</a>';
805 if (!$user->rights->cron->create) {
806 print
'<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"NotEnoughPermissions")).
'">'.$langs->trans(
"CronStatusActiveBtn").
'/'.$langs->trans(
"CronStatusInactiveBtn").
'</a>';
808 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?action=clone&token='.
newToken().
'&id='.$object->id.
'">'.$langs->trans(
"ToClone").
'</a>';
810 if (empty($object->status)) {
811 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?action=activate&token='.
newToken().
'&id='.$object->id.
'">'.$langs->trans(
"CronStatusActiveBtn").
'</a>';
813 print
'<a class="butActionDelete" href="'.$_SERVER[
'PHP_SELF'].
'?action=inactive&id='.$object->id.
'">'.$langs->trans(
"CronStatusInactiveBtn").
'</a>';
817 if (!$user->rights->cron->delete) {
818 print
'<a class="butActionDeleteRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"NotEnoughPermissions")).
'">'.$langs->trans(
"Delete").
'</a>';
820 print
'<a class="butActionDelete" href="'.$_SERVER[
'PHP_SELF'].
'?action=delete&token='.
newToken().
'&id='.$object->id.
'">'.$langs->trans(
"Delete").
'</a>';
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage a WYSIWYG editor.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
cron_prepare_head(Cronjob $object)
Return array of tabs to used on a cron job.
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_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
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.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_now($mode='auto')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dol_clone($object, $native=0)
Create a clone of instance of object (new instance with same value for each properties) With native =...
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
isModEnabled($module)
Is Dolibarr module enabled.
$formconfirm
if ($action == 'delbookkeepingyear') {
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.