28require
'../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
33require_once DOL_DOCUMENT_ROOT.
"/cron/class/cronjob.class.php";
34require_once DOL_DOCUMENT_ROOT.
"/core/class/html.formcron.class.php";
35require_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');
49if (!$user->hasRight(
'cron',
'create')) {
53$permissiontoadd = $user->hasRight(
'cron',
'create');
54$permissiontoexecute = $user->hasRight(
'cron',
'execute');
55$permissiontodelete = $user->hasRight(
'cron',
'delete');
64 $result = $object->fetch($id);
71 if (!empty($id) && empty($backtopage)) {
75 header(
"Location: ".$backtopage);
78 header(
"Location: ".DOL_URL_ROOT.
'/cron/list.php');
85if ($action ==
'confirm_delete' && $confirm ==
"yes" && $permissiontodelete) {
86 $result = $object->delete($user);
92 Header(
"Location: ".DOL_URL_ROOT.
'/cron/list.php');
98if ($action ==
'confirm_execute' && $confirm ==
"yes" && $permissiontoexecute) {
99 if (!empty($conf->global->CRON_KEY) && $conf->global->CRON_KEY != $securitykey) {
105 $result = $object->run_jobs($user->login);
111 $res = $object->reprogram_jobs($user->login, $now);
113 if ($object->lastresult > 0) {
128if ($action ==
'add' && $permissiontoadd) {
129 $object->jobtype =
GETPOST(
'jobtype');
130 $object->label =
GETPOST(
'label');
131 $object->command =
GETPOST(
'command');
132 $object->classesname =
GETPOST(
'classesname',
'alphanohtml');
133 $object->objectname =
GETPOST(
'objectname',
'aZ09');
134 $object->methodename =
GETPOST(
'methodename',
'aZ09');
135 $object->params =
GETPOST(
'params');
136 $object->md5params =
GETPOST(
'md5params');
137 $object->module_name =
GETPOST(
'module_name');
138 $object->note_private =
GETPOST(
'note',
'restricthtml');
139 $object->datestart =
dol_mktime(
GETPOST(
'datestarthour',
'int'),
GETPOST(
'datestartmin',
'int'), 0,
GETPOST(
'datestartmonth',
'int'),
GETPOST(
'datestartday',
'int'),
GETPOST(
'datestartyear',
'int'));
140 $object->dateend =
dol_mktime(
GETPOST(
'dateendhour',
'int'),
GETPOST(
'dateendmin',
'int'), 0,
GETPOST(
'dateendmonth',
'int'),
GETPOST(
'dateendday',
'int'),
GETPOST(
'dateendyear',
'int'));
141 $object->priority =
GETPOST(
'priority',
'int');
142 $object->datenextrun =
dol_mktime(
GETPOST(
'datenextrunhour',
'int'),
GETPOST(
'datenextrunmin',
'int'), 0,
GETPOST(
'datenextrunmonth',
'int'),
GETPOST(
'datenextrunday',
'int'),
GETPOST(
'datenextrunyear',
'int'));
143 $object->unitfrequency =
GETPOST(
'unitfrequency',
'int');
144 $object->frequency =
GETPOST(
'nbfrequency',
'int');
145 $object->maxrun =
GETPOST(
'maxrun',
'int');
146 $object->email_alert =
GETPOST(
'email_alert');
149 $result = $object->create($user);
162if ($action ==
'update' && $permissiontoadd) {
164 $object->jobtype =
GETPOST(
'jobtype');
165 $object->label =
GETPOST(
'label');
166 $object->command =
GETPOST(
'command');
167 $object->classesname =
GETPOST(
'classesname',
'alphanohtml');
168 $object->objectname =
GETPOST(
'objectname',
'aZ09');
169 $object->methodename =
GETPOST(
'methodename',
'aZ09');
170 $object->params =
GETPOST(
'params');
171 $object->md5params =
GETPOST(
'md5params');
172 $object->module_name =
GETPOST(
'module_name');
173 $object->note_private =
GETPOST(
'note',
'restricthtml');
174 $object->datestart =
dol_mktime(
GETPOST(
'datestarthour',
'int'),
GETPOST(
'datestartmin',
'int'), 0,
GETPOST(
'datestartmonth',
'int'),
GETPOST(
'datestartday',
'int'),
GETPOST(
'datestartyear',
'int'));
175 $object->dateend =
dol_mktime(
GETPOST(
'dateendhour',
'int'),
GETPOST(
'dateendmin',
'int'), 0,
GETPOST(
'dateendmonth',
'int'),
GETPOST(
'dateendday',
'int'),
GETPOST(
'dateendyear',
'int'));
176 $object->priority =
GETPOST(
'priority',
'int');
177 $object->datenextrun =
dol_mktime(
GETPOST(
'datenextrunhour',
'int'),
GETPOST(
'datenextrunmin',
'int'), 0,
GETPOST(
'datenextrunmonth',
'int'),
GETPOST(
'datenextrunday',
'int'),
GETPOST(
'datenextrunyear',
'int'));
178 $object->unitfrequency =
GETPOST(
'unitfrequency',
'int');
179 $object->frequency =
GETPOST(
'nbfrequency',
'int');
180 $object->maxrun =
GETPOST(
'maxrun',
'int');
181 $object->email_alert =
GETPOST(
'email_alert');
184 $result = $object->update($user);
196if ($action ==
'activate' && $permissiontoadd) {
200 $result = $object->update($user);
212if ($action ==
'inactive' && $permissiontoadd) {
214 $object->processing = 0;
217 $result = $object->update($user);
230if ($action ==
'confirm_clone' && $confirm ==
'yes' && $permissiontoadd) {
231 if (1 == 0 && !
GETPOST(
'clone_content') && !
GETPOST(
'clone_receivers')) {
236 $result = $objectutil->createFromClone($user, (($object->id > 0) ? $object->id : $id));
237 if (is_object($result) || $result > 0) {
239 if (is_object($result)) {
240 $newid = $result->id;
244 header(
"Location: ".$_SERVER[
'PHP_SELF'].
'?id='.$newid);
259$form =
new Form($db);
266if ($action ==
'create') {
270if ($conf->use_javascript_ajax) {
271 print
"\n".
'<script type="text/javascript">';
272 print
'jQuery(document).ready(function () {
273 function initfields()
275 if ($("#jobtype option:selected").val()==\'method\') {
276 $(".blockmethod").show();
277 $(".blockcommand").hide();
279 if ($("#jobtype option:selected").val()==\'command\') {
280 $(".blockmethod").hide();
281 $(".blockcommand").show();
285 jQuery("#jobtype").change(function() {
289 print
'</script>'.
"\n";
293if ($action ==
'delete') {
294 $formconfirm = $form->formconfirm($_SERVER[
'PHP_SELF'].
"?id=".$object->id, $langs->trans(
"CronDelete"), $langs->trans(
"CronConfirmDelete"),
"confirm_delete",
'',
'', 1);
299if ($action ==
'execute') {
300 $formconfirm = $form->formconfirm($_SERVER[
'PHP_SELF'].
"?id=".$object->id.
'&securitykey='.$securitykey, $langs->trans(
"CronExecute"), $langs->trans(
"CronConfirmExecute"),
"confirm_execute",
'',
'', 1);
306if ($action ==
'clone') {
308 $formquestion = array();
309 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk', $object->ref),
'confirm_clone', $formquestion,
'yes', 1);
320if (empty($object->status) && $action !=
'create') {
324if (($action ==
"create") || ($action ==
"edit")) {
325 print
'<form name="cronform" action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
326 print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
327 print
'<input type="hidden" name="backtopage" value="'.GETPOST(
'backtopage').
'">'.
"\n";
328 if (!empty($object->id)) {
329 print
'<input type="hidden" name="action" value="update">'.
"\n";
330 print
'<input type="hidden" name="id" value="'.$object->id.
'">'.
"\n";
332 print
'<input type="hidden" name="action" value="add">'.
"\n";
335 if ($action ==
"edit") {
341 print
'<table class="border centpercent">';
343 print
'<tr><td class="fieldrequired titlefieldcreate">';
344 print $langs->trans(
'CronLabel').
"</td>";
345 print
'<td><input type="text" class="width200" name="label" value="'.dol_escape_htmltag($object->label).
'"> ';
351 print
'<tr><td class="fieldrequired">';
352 print $langs->trans(
'CronType').
"</td><td>";
353 print $formCron->select_typejob(
'jobtype', $object->jobtype);
359 print
'<tr class="blockmethod"><td>';
360 print $langs->trans(
'CronModule').
"</td><td>";
361 print
'<input type="text" class="width200" name="module_name" value="'.dol_escape_htmltag($object->module_name).
'"> ';
364 print $form->textwithpicto(
'', $langs->trans(
"CronModuleHelp"), 1,
'help');
368 print
'<tr class="blockmethod"><td>';
369 print $langs->trans(
'CronClassFile').
"</td><td>";
370 print
'<input type="text" class="minwidth300" name="classesname" value="'.dol_escape_htmltag($object->classesname).
'"> ';
373 print $form->textwithpicto(
'', $langs->trans(
"CronClassFileHelp"), 1,
'help');
377 print
'<tr class="blockmethod"><td>';
378 print $langs->trans(
'CronObject').
"</td><td>";
379 print
'<input type="text" class="width200" name="objectname" value="'.dol_escape_htmltag($object->objectname).
'"> ';
382 print $form->textwithpicto(
'', $langs->trans(
"CronObjectHelp"), 1,
'help');
386 print
'<tr class="blockmethod"><td>';
387 print $langs->trans(
'CronMethod').
"</td><td>";
388 print
'<input type="text" class="minwidth300" name="methodename" value="'.dol_escape_htmltag($object->methodename).
'" /> ';
391 print $form->textwithpicto(
'', $langs->trans(
"CronMethodHelp"), 1,
'help');
395 print
'<tr class="blockmethod"><td>';
396 print $langs->trans(
'CronArgs').
"</td><td>";
397 print
'<input type="text" class="quatrevingtpercent" name="params" value="'.$object->params.
'" /> ';
400 print $form->textwithpicto(
'', $langs->trans(
"CronArgsHelp"), 1,
'help');
404 print
'<tr class="blockcommand"><td>';
405 print $langs->trans(
'CronCommand').
"</td><td>";
406 print
'<input type="text" class="minwidth150" name="command" value="'.$object->command.
'" /> ';
409 print $form->textwithpicto(
'', $langs->trans(
"CronCommandHelp"), 1,
'help');
414 print $langs->trans(
'CronNote').
"</td><td>";
415 $doleditor =
new DolEditor(
'note', $object->note_private,
'', 160,
'dolibarr_notes',
'In',
true,
false, 0, ROWS_4,
'90%');
416 $doleditor->Create();
422 print
'<tr class="blockemailalert"><td>';
423 print $langs->trans(
'EmailIfError').
"</td><td>";
424 print
'<input type="text" class="minwidth150" name="email_alert" value="'.dol_escape_htmltag($object->email_alert).
'" /> ';
431 print
'<tr><td class="fieldrequired">';
432 print $langs->trans(
'CronEvery').
"</td>";
434 print
'<select name="nbfrequency">';
435 for ($i = 1; $i <= 60; $i++) {
436 if ($object->frequency == $i) {
437 print
"<option value='".$i.
"' selected>".$i.
"</option>";
439 print
"<option value='".$i.
"'>".$i.
"</option>";
443 $input =
" <input type=\"radio\" name=\"unitfrequency\" value=\"60\" id=\"frequency_minute\" ";
444 if ($object->unitfrequency ==
"60") {
445 $input .=
' checked />';
449 $input .=
"<label for=\"frequency_minute\">".$langs->trans(
'Minutes').
"</label>";
452 $input =
" <input type=\"radio\" name=\"unitfrequency\" value=\"3600\" id=\"frequency_heures\" ";
453 if ($object->unitfrequency ==
"3600") {
454 $input .=
' checked />';
458 $input .=
"<label for=\"frequency_heures\">".$langs->trans(
'Hours').
"</label>";
461 $input =
" <input type=\"radio\" name=\"unitfrequency\" value=\"86400\" id=\"frequency_jours\" ";
462 if ($object->unitfrequency ==
"86400") {
463 $input .=
' checked />';
467 $input .=
"<label for=\"frequency_jours\">".$langs->trans(
'Days').
"</label>";
470 $input =
" <input type=\"radio\" name=\"unitfrequency\" value=\"604800\" id=\"frequency_semaine\" ";
471 if ($object->unitfrequency ==
"604800") {
472 $input .=
' checked />';
476 $input .=
"<label for=\"frequency_semaine\">".$langs->trans(
'Weeks').
"</label>";
479 $input =
" <input type=\"radio\" name=\"unitfrequency\" value=\"2678400\" id=\"frequency_month\" ";
480 if ($object->unitfrequency ==
"2678400") {
481 $input .=
' checked />';
485 $input .=
"<label for=\"frequency_month\">".$langs->trans(
'Monthly').
"</label>";
494 print $langs->trans(
'CronDtStart').
"</td><td>";
495 if (!empty($object->datestart)) {
496 print $form->selectDate($object->datestart,
'datestart', 1, 1,
'',
"cronform");
498 print $form->selectDate(-1,
'datestart', 1, 1, 1,
"cronform");
506 print $langs->trans(
'CronDtEnd').
"</td><td>";
507 if (!empty($object->dateend)) {
508 print $form->selectDate($object->dateend,
'dateend', 1, 1,
'',
"cronform");
510 print $form->selectDate(-1,
'dateend', 1, 1, 1,
"cronform");
518 print $langs->trans(
'CronPriority').
"</td>";
520 if (!empty($object->priority)) {
521 $priority = $object->priority;
523 print
'<td><input type="text" class="width50" name="priority" value="'.$priority.
'" /> ';
531 if (!empty($object->maxrun)) {
532 $maxrun = $object->maxrun;
534 print $langs->trans(
'CronMaxRun').
"</td>";
535 print
'<td><input type="text" class="width50" name="maxrun" value="'.$maxrun.
'" /> ';
541 print
'<tr><td class="fieldrequired">';
542 print $langs->trans(
'CronDtNextLaunch');
545 if (!empty($object->datenextrun)) {
546 print $form->selectDate($object->datenextrun,
'datenextrun', 1, 1,
'',
"cronform");
548 print $form->selectDate(-1,
'datenextrun', 1, 1,
'',
"cronform", 1, 1);
559 print $form->buttonsSaveCancel();
570 $linkback =
'<a href="'.DOL_URL_ROOT.
'/cron/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
573 if (preg_match(
'/:(.*)$/', $object->label, $reg)) {
574 $langs->load($reg[1]);
577 $labeltoshow = preg_replace(
'/:.*$/',
'', $object->label);
579 $morehtmlref =
'<div class="refidno">';
580 $morehtmlref .= $langs->trans($labeltoshow);
581 $morehtmlref .=
'</div>';
583 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref);
586 print
'<div class="fichecenter">';
587 print
'<div class="fichehalfleft">';
589 print
'<div class="underbanner clearboth"></div>';
590 print
'<table class="border centpercent tableforfield">';
597 print
'<tr><td class="titlefield">';
598 print $langs->trans(
'CronType').
"</td><td>";
599 print $formCron->select_typejob(
'jobtype', $object->jobtype, 1);
602 print
'<tr class="blockmethod"><td>';
603 print $langs->trans(
'CronModule').
"</td><td>";
607 print
'<tr class="blockmethod"><td>';
608 print $langs->trans(
'CronClassFile').
"</td><td>";
612 print
'<tr class="blockmethod"><td>';
613 print $langs->trans(
'CronObject').
"</td><td>";
617 print
'<tr class="blockmethod"><td>';
618 print $langs->trans(
'CronMethod').
"</td><td>";
622 print
'<tr class="blockmethod"><td>';
623 print $langs->trans(
'CronArgs').
"</td><td>";
627 print
'<tr class="blockcommand"><td>';
628 print $langs->trans(
'CronCommand').
"</td><td>";
633 print $langs->trans(
'CronNote').
"</td><td>";
634 if (!is_null($object->note_private) && $object->note_private !=
'') {
635 print $langs->trans($object->note_private);
639 print
'<tr class="blockemailalert"><td>';
640 print $langs->trans(
'EmailIfError').
"</td><td>";
644 if (isModEnabled(
'multicompany')) {
646 print $langs->trans(
'Entity').
"</td><td>";
647 if (empty($object->entity)) {
648 print
img_picto($langs->trans(
"AllEntities"),
'entity',
'class="pictofixedwidth"').$langs->trans(
"AllEntities");
650 $mc->getInfo($object->entity);
651 print
img_picto($langs->trans(
"AllEntities"),
'entity',
'class="pictofixedwidth"').$mc->label;
659 print
'<div class="fichehalfright">';
661 print
'<div class="underbanner clearboth"></div>';
662 print
'<table class="border centpercent tableforfield">';
664 print
'<tr><td class="titlefield">';
665 print $langs->trans(
'CronEvery').
"</td>";
667 if ($object->unitfrequency ==
"60") {
668 print $langs->trans(
'CronEach').
" ".($object->frequency).
" ".$langs->trans(
'Minutes');
670 if ($object->unitfrequency ==
"3600") {
671 print $langs->trans(
'CronEach').
" ".($object->frequency).
" ".$langs->trans(
'Hours');
673 if ($object->unitfrequency ==
"86400") {
674 print $langs->trans(
'CronEach').
" ".($object->frequency).
" ".$langs->trans(
'Days');
676 if ($object->unitfrequency ==
"604800") {
677 print $langs->trans(
'CronEach').
" ".($object->frequency).
" ".$langs->trans(
'Weeks');
679 if ($object->unitfrequency ==
"2678400") {
680 print $langs->trans(
'CronEach').
" ".($object->frequency).
" ".$langs->trans(
'Month');
685 print $langs->trans(
'CronDtStart').
"</td><td>";
686 if (!empty($object->datestart)) {
687 print $form->textwithpicto(
dol_print_date($object->datestart,
'dayhoursec'), $langs->trans(
"CurrentTimeZone"));
692 print $langs->trans(
'CronDtEnd').
"</td><td>";
693 if (!empty($object->dateend)) {
694 print $form->textwithpicto(
dol_print_date($object->dateend,
'dayhoursec'), $langs->trans(
"CurrentTimeZone"));
699 print $langs->trans(
'CronPriority').
"</td>";
700 print
"<td>".$object->priority;
704 print $langs->trans(
'CronMaxRun').
"</td>";
706 print $object->maxrun > 0 ? $object->maxrun :
'';
710 print $langs->trans(
'CronNbRun').
"</td>";
711 print
"<td>".$object->nbrun;
716 print $langs->trans(
'CronDtNextLaunch');
717 print
' ('.$langs->trans(
'CronFrom').
')';
719 if (!$object->status) {
720 print
img_picto(
'',
'object_calendarday').
' <span class="opacitymedium strikefordisabled">'.$form->textwithpicto(
dol_print_date($object->datenextrun,
'dayhoursec'), $langs->trans(
"CurrentTimeZone")).
'</span> ';
721 print $langs->trans(
"Disabled");
722 } elseif (!empty($object->datenextrun)) {
723 print
img_picto(
'',
'object_calendarday').
' '.$form->textwithpicto(
dol_print_date($object->datenextrun,
'dayhoursec'), $langs->trans(
"CurrentTimeZone"));
725 print $langs->trans(
'CronNone');
727 if ($object->status == Cronjob::STATUS_ENABLED) {
728 if ($object->maxrun && $object->nbrun >= $object->maxrun) {
730 } elseif ($object->datenextrun && $object->datenextrun < $now) {
742 print
'<div class="underbanner clearboth"></div>';
743 print
'<table class="border centpercent tableforfield">';
745 print
'<tr><td class="titlefield">';
746 print $langs->trans(
'CronDtLastLaunch').
"</td><td>";
747 if (!empty($object->datelastrun)) {
748 print $form->textwithpicto(
dol_print_date($object->datelastrun,
'dayhoursec'), $langs->trans(
"CurrentTimeZone"));
750 print $langs->trans(
'CronNone');
755 print $langs->trans(
'CronDtLastResult').
"</td><td>";
756 if (!empty($object->datelastresult)) {
757 print $form->textwithpicto(
dol_print_date($object->datelastresult,
'dayhoursec'), $langs->trans(
"CurrentTimeZone"));
759 if (empty($object->datelastrun)) {
760 print $langs->trans(
'CronNone');
768 print $langs->trans(
'CronLastResult').
"</td><td>";
769 if ($object->lastresult) {
770 print
'<span class="error">';
772 print $object->lastresult;
773 if ($object->lastresult) {
779 print $langs->trans(
'CronLastOutput').
"</td><td>";
780 print
'<span class="small">'.nl2br($object->lastoutput).
'</span>';
787 print
'<div class="clearboth"></div>';
793 print
"\n\n".
'<div class="tabsAction">'.
"\n";
794 if (!$user->rights->cron->create) {
795 print
'<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"NotEnoughPermissions")).
'">'.$langs->trans(
"Edit").
'</a>';
797 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?action=edit&token='.newToken().
'&id='.$object->id.
'">'.$langs->trans(
"Edit").
'</a>';
800 if ((empty($user->rights->cron->execute))) {
801 print
'<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"NotEnoughPermissions")).
'">'.$langs->trans(
"CronExecute").
'</a>';
802 } elseif (empty($object->status)) {
803 print
'<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"JobDisabled")).
'">'.$langs->trans(
"CronExecute").
'</a>';
805 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?action=execute&token='.newToken().
'&id='.$object->id.(empty($conf->global->CRON_KEY) ?
'' :
'&securitykey='.urlencode($conf->global->CRON_KEY)).
'">'.$langs->trans(
"CronExecute").
'</a>';
808 if (!$user->rights->cron->create) {
809 print
'<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"NotEnoughPermissions")).
'">'.$langs->trans(
"CronStatusActiveBtn").
'/'.$langs->trans(
"CronStatusInactiveBtn").
'</a>';
811 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?action=clone&token='.newToken().
'&id='.$object->id.
'">'.$langs->trans(
"ToClone").
'</a>';
813 if (empty($object->status)) {
814 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?action=activate&token='.newToken().
'&id='.$object->id.
'">'.$langs->trans(
"CronStatusActiveBtn").
'</a>';
816 print
'<a class="butActionDelete" href="'.$_SERVER[
'PHP_SELF'].
'?action=inactive&id='.$object->id.
'">'.$langs->trans(
"CronStatusInactiveBtn").
'</a>';
820 if (!$user->rights->cron->delete) {
821 print
'<a class="butActionDeleteRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv(
"NotEnoughPermissions")).
'">'.$langs->trans(
"Delete").
'</a>';
823 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.
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.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
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.
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)
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.