30require
'../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/cron/class/cronjob.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/cron.lib.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
37$langs->loadLangs(array(
"admin",
"cron",
"bills",
"members"));
39$action =
GETPOST(
'action',
'aZ09');
40$massaction =
GETPOST(
'massaction',
'alpha');
41$confirm =
GETPOST(
'confirm',
'alpha');
42$toselect =
GETPOST(
'toselect',
'array');
43$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'cronjoblist';
48$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
49$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
51if (empty($page) || $page == -1) {
54$offset = $limit * $page;
58 $sortfield =
't.priority,t.status';
61 $sortorder =
'ASC,DESC';
63$optioncss =
GETPOST(
'optioncss',
'alpha');
66$search_status =
GETPOST(
'search_status',
'intcomma');
67$search_label =
GETPOST(
"search_label",
'alpha');
68$search_module_name =
GETPOST(
"search_module_name",
'alpha');
69$search_lastresult =
GETPOST(
"search_lastresult",
"alphawithlgt");
70$search_processing =
GETPOST(
"search_processing",
'int');
71$securitykey =
GETPOST(
'securitykey',
'alpha');
73$outputdir = $conf->cron->dir_output;
74if (empty($outputdir)) {
75 $outputdir = $conf->cronjob->dir_output;
77$diroutputmassaction = $outputdir.
'/temp/massgeneration/'.$user->id;
82$hookmanager->initHooks(array(
'cronjoblist'));
86$extrafields->fetch_name_optionals_label(
$object->table_element);
88$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
91if (!$user->hasRight(
'cron',
'read')) {
95$permissiontoread = $user->hasRight(
'cron',
'read');
96$permissiontoadd = $user->hasRight(
'cron',
'create') ? $user->hasRight(
'cron',
'create') : $user->hasRight(
'cron',
'write');
97$permissiontodelete = $user->hasRight(
'cron',
'delete');
98$permissiontoexecute = $user->hasRight(
'cron',
'execute');
105if (
GETPOST(
'cancel',
'alpha')) {
109if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
113$parameters = array();
114$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
119if (empty($reshook)) {
121 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
124 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
127 $search_lastresult =
'';
129 $search_array_options = array();
131 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
132 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
137 if (!empty($search_label)) {
138 $filter[
't.label'] = $search_label;
142 if ($action ==
'confirm_delete' && $confirm ==
"yes" && $permissiontodelete) {
146 $result =
$object->delete($user);
154 if ($action ==
'confirm_execute' && $confirm ==
"yes" && $permissiontoexecute) {
164 $resrunjob =
$object->run_jobs($user->login);
165 if ($resrunjob < 0) {
170 $res =
$object->reprogram_jobs($user->login, $now);
172 if ($resrunjob >= 0) {
173 if (
$object->lastresult >= 0) {
185 $param =
'&search_status='.urlencode($search_status);
186 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
187 $param .=
'&contextpage='.urlencode($contextpage);
189 if ($limit > 0 && $limit != $conf->liste_limit) {
190 $param .=
'&limit='.((int) $limit);
193 $param .=
'&search_label='.urlencode($search_label);
195 if ($optioncss !=
'') {
196 $param .=
'&optioncss='.urlencode($optioncss);
199 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
201 header(
"Location: ".DOL_URL_ROOT.
'/cron/list.php?'.$param.($sortfield ?
'&sortfield='.$sortfield :
'').($sortorder ?
'&sortorder='.$sortorder :
''));
207 $objectclass =
'CronJob';
208 $objectlabel =
'CronJob';
209 $uploaddir = $conf->cron->dir_output;
210 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
211 if ($massaction && $permissiontoadd) {
213 foreach ($toselect as
$id) {
214 $result = $tmpcron->fetch(
$id);
217 if ($massaction ==
'disable') {
218 $result = $tmpcron->setStatut(Cronjob::STATUS_DISABLED);
219 } elseif ($massaction ==
'enable') {
220 $result = $tmpcron->setStatut(Cronjob::STATUS_ENABLED);
238$form =
new Form($db);
241$title = $langs->trans(
"CronList");
243llxHeader(
'', $title,
'',
'', 0, 0,
'',
'',
'',
'bodyforlist');
245$TTestNotAllowed = array();
246$sqlTest =
'SELECT rowid, test FROM '.MAIN_DB_PREFIX.
'cronjob';
247$resultTest = $db->query($sqlTest);
249 while ($objTest = $db->fetch_object($resultTest)) {
252 $TTestNotAllowed[$objTest->rowid] = $objTest->rowid;
261$sql .=
" t.jobtype,";
263$sql .=
" t.command,";
264$sql .=
" t.classesname,";
265$sql .=
" t.objectname,";
266$sql .=
" t.methodename,";
268$sql .=
" t.md5params,";
269$sql .=
" t.module_name,";
270$sql .=
" t.priority,";
271$sql .=
" t.processing,";
272$sql .=
" t.datelastrun,";
273$sql .=
" t.datenextrun,";
274$sql .=
" t.dateend,";
275$sql .=
" t.datestart,";
276$sql .=
" t.lastresult,";
277$sql .=
" t.datelastresult,";
278$sql .=
" t.lastoutput,";
279$sql .=
" t.unitfrequency,";
280$sql .=
" t.frequency,";
282$sql .=
" t.fk_user_author,";
283$sql .=
" t.fk_user_mod,";
287$sql .=
" t.libname,";
289$sql .=
" FROM ".MAIN_DB_PREFIX.
"cronjob as t";
290$sql .=
" WHERE entity IN (0,".$conf->entity.
")";
291if (!empty($TTestNotAllowed)) {
292 $sql .=
' AND t.rowid NOT IN ('.$db->sanitize(implode(
',', $TTestNotAllowed)).
')';
294if ($search_status >= 0 && $search_status < 2 && $search_status !=
'') {
295 $sql .=
" AND t.status = ".(empty($search_status) ?
'0' :
'1');
297if ($search_lastresult !=
'') {
300if (GETPOSTISSET(
'search_processing')) {
301 $sql .=
" AND t.processing = ".((int) $search_processing);
304if (is_array($filter) && count($filter) > 0) {
305 foreach ($filter as $key => $value) {
306 $sql .=
" AND ".$key.
" LIKE '%".$db->escape($value).
"%'";
309if (!empty($search_module_name)) {
313include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
315$parameters = array();
316$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
317$sql .= $hookmanager->resPrint;
319$sql .= $db->order($sortfield, $sortorder);
321$nbtotalofrecords =
'';
323 $result = $db->query($sql);
324 $nbtotalofrecords = $db->num_rows($result);
325 if (($page * $limit) > $nbtotalofrecords) {
331$sql .= $db->plimit($limit + 1, $offset);
333$result = $db->query($sql);
338$num = $db->num_rows($result);
340$arrayofselected = is_array($toselect) ? $toselect : array();
343if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
344 $param .=
'&contextpage='.urlencode($contextpage);
346if ($limit > 0 && $limit != $conf->liste_limit) {
347 $param .=
'&limit='.((int) $limit);
350 $param .=
'&search_status='.urlencode($search_status);
353 $param .=
'&search_label='.urlencode($search_label);
355if ($search_module_name) {
356 $param .=
'&search_module_name='.urlencode($search_module_name);
358if ($search_lastresult) {
359 $param .=
'&search_lastresult='.urlencode($search_lastresult);
362 $param .=
'&mode='.urlencode($mode);
364if ($optioncss !=
'') {
365 $param .=
'&optioncss='.urlencode($optioncss);
368include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
372if ($action ==
'execute') {
373 print $form->formconfirm($_SERVER[
'PHP_SELF'].
"?id=".
$id.
'&securitykey='.$securitykey.$param, $langs->trans(
"CronExecute"), $langs->trans(
"CronConfirmExecute"),
"confirm_execute",
'',
'', 1);
376if ($action ==
'delete' && empty($toselect)) {
377 print $form->formconfirm($_SERVER[
'PHP_SELF'].
"?id=".
$id.$param, $langs->trans(
"CronDelete"), $langs->trans(
"CronConfirmDelete"),
"confirm_delete",
'',
'', 1);
381$arrayofmassactions = array(
384 'enable' =>
img_picto(
'',
'check',
'class="pictofixedwidth"').$langs->trans(
"CronStatusActiveBtn"),
385 'disable' =>
img_picto(
'',
'uncheck',
'class="pictofixedwidth"').$langs->trans(
"CronStatusInactiveBtn"),
387if ($user->hasRight(
'cron',
'delete')) {
388 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
390if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
391 $arrayofmassactions = array();
393$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
395if ($mode ==
'modulesetup') {
396 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
397 print
load_fiche_titre($langs->trans(
"CronSetup"), $linkback,
'title_setup');
403print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'" name="search_form">'.
"\n";
404if ($optioncss !=
'') {
405 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
407print
'<input type="hidden" name="token" value="'.newToken().
'">';
408print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
409print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
410print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
411print
'<input type="hidden" name="page" value="'.$page.
'">';
412print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
413print
'<input type="hidden" name="mode" value="'.$mode.
'">';
417$newcardbutton .=
dolGetButtonTitle($langs->trans(
'New'), $langs->trans(
'CronCreateJob'),
'fa fa-plus-circle', DOL_URL_ROOT.
'/cron/card.php?action=create&backtopage='.urlencode($_SERVER[
'PHP_SELF'].
'?mode=modulesetup'),
'', $user->hasRight(
'cron',
'create'));
420if ($mode ==
'modulesetup') {
427print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, ($mode ==
'modulesetup' ?
'' :
'title_setup'), 0, $newcardbutton,
'', $limit);
430$topicmail =
"SendCronRef";
433$trackid =
'cron'.$object->id;
434include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
436$text = $langs->trans(
"HoursOnThisPageAreOnServerTZ").
' '.$stringcurrentdate.
'<br>';
438 $text .= $langs->trans(
"WarningCronDelayed",
getDolGlobalString(
'CRON_WARNING_DELAY_HOURS'));
446$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
448print
'<div class="div-table-responsive">';
449print
'<table class="noborder liste">';
451print
'<tr class="liste_titre_filter">';
454 print
'<td class="liste_titre right">';
455 $searchpicto = $form->showFilterButtons();
459print
'<td class="liste_titre"> </td>';
460print
'<td class="liste_titre">';
461print
'<input type="text" class="flat width75" name="search_label" value="'.$search_label.
'">';
464print
'<td class="liste_titre"><input type="text" class="width50" name="search_module_name" value="'.$search_module_name.
'"></td>';
465print
'<td class="liste_titre"> </td>';
466print
'<td class="liste_titre"> </td>';
469print
'<td class="liste_titre"> </td>';
470print
'<td class="liste_titre"> </td>';
471print
'<td class="liste_titre"> </td>';
472print
'<td class="liste_titre center"><input type="text" class="width50" name="search_lastresult" value="'.$search_lastresult.
'"></td>';
473print
'<td class="liste_titre"> </td>';
474print
'<td class="liste_titre"> </td>';
475print
'<td class="liste_titre center">';
476print $form->selectarray(
'search_status', array(
'0' => $langs->trans(
"Disabled"),
'1' => $langs->trans(
"Scheduled")), $search_status, 1, 0, 0,
'', 0, 0, 0,
'',
'search_status width100 onrightofpage');
478print
'<td class="liste_titre"> </td>';
481 print
'<td class="liste_titre right">';
482 $searchpicto = $form->showFilterButtons();
488print
'<tr class="liste_titre">';
491 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
"", $param,
'', $sortfield, $sortorder,
'center maxwidthsearch ');
496print_liste_field_titre(
"CronModule", $_SERVER[
"PHP_SELF"],
"t.module_name",
"", $param,
'', $sortfield, $sortorder);
501print_liste_field_titre(
"CronNbRun", $_SERVER[
"PHP_SELF"],
"t.nbrun",
"", $param,
'', $sortfield, $sortorder,
'right tdoverflowmax50 maxwidth50imp ');
502print_liste_field_titre(
"CronDtLastLaunch", $_SERVER[
"PHP_SELF"],
"t.datelastrun",
"", $param,
'', $sortfield, $sortorder,
'center tdoverflowmax100 ');
503print_liste_field_titre(
"Duration", $_SERVER[
"PHP_SELF"],
"",
"", $param,
'', $sortfield, $sortorder,
'center ');
504print_liste_field_titre(
"CronLastResult", $_SERVER[
"PHP_SELF"],
"t.lastresult",
"", $param,
'', $sortfield, $sortorder,
'center ');
505print_liste_field_titre(
"CronLastOutput", $_SERVER[
"PHP_SELF"],
"t.lastoutput",
"", $param,
'', $sortfield, $sortorder);
506print_liste_field_titre(
"CronDtNextLaunch", $_SERVER[
"PHP_SELF"],
"t.datenextrun",
"", $param,
'', $sortfield, $sortorder,
'center ');
507print_liste_field_titre(
"Status", $_SERVER[
"PHP_SELF"],
"t.status,t.priority",
"", $param,
'', $sortfield, $sortorder,
'center ');
511 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
"", $param,
'', $sortfield, $sortorder,
'center maxwidthsearch ');
521 while ($i < min($num, $limit)) {
522 $obj = $db->fetch_object($result);
529 if (preg_match(
'/:(.*)$/', $obj->label, $reg)) {
530 $langs->load($reg[1]);
535 $object->label = preg_replace(
'/:.*$/',
'', $obj->label);
536 $object->status = $obj->status;
537 $object->priority = $obj->priority;
538 $object->processing = $obj->processing;
539 $object->lastresult = (string) $obj->lastresult;
540 $object->datestart = $db->jdate($obj->datestart);
541 $object->dateend = $db->jdate($obj->dateend);
542 $object->module_name = $obj->module_name;
543 $object->params = $obj->params;
544 $object->datelastrun = $db->jdate($obj->datelastrun);
545 $object->datenextrun = $db->jdate($obj->datenextrun);
547 $datelastrun = $db->jdate($obj->datelastrun);
548 $datelastresult = $db->jdate($obj->datelastresult);
550 print
'<tr class="oddeven">';
554 print
'<td class="nowraponall center">';
555 if ($massactionbutton || $massaction) {
557 if (in_array($obj->rowid, $arrayofselected)) {
560 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect valignmiddle" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
566 print
'<td class="nowraponall">';
571 print
'<td class="minwidth150">';
574 print
'<div class="small twolinesmax minwidth150 maxwidth250 classfortooltip" title="'.dol_escape_htmltag($langs->trans(
$object->label), 0, 0).
'">';
575 print
$object->getNomUrl(0,
'', 1);
594 print
'<td class="nowraponall">';
595 if ($obj->jobtype ==
'method') {
597 $texttoshow =
'<b>'.$langs->trans(
"CronType_method").
'</b><br><br>';
598 $texttoshow .= $langs->trans(
'CronModule').
': '.$obj->module_name.
'<br>';
599 $texttoshow .= $langs->trans(
'CronClass').
': '.$obj->classesname.
'<br>';
600 $texttoshow .= $langs->trans(
'CronObject').
': '.$obj->objectname.
'<br>';
601 $texttoshow .= $langs->trans(
'CronMethod').
': '.$obj->methodename;
602 $texttoshow .=
'<br>'.$langs->trans(
'CronArgs').
': '.$obj->params;
603 $texttoshow .=
'<br>'.$langs->trans(
'Comment').
': '.$langs->trans($obj->note);
604 } elseif ($obj->jobtype ==
'command') {
606 $texttoshow =
'<b>'.$langs->trans(
'CronType_command').
'</b><br><br>';
607 $texttoshow .= $langs->trans(
'CronCommand').
': '.
dol_trunc($obj->command);
608 $texttoshow .=
'<br>'.$langs->trans(
'CronArgs').
': '.$obj->params;
609 $texttoshow .=
'<br>'.$langs->trans(
'Comment').
': '.$langs->trans($obj->note);
611 print
'<span class="classfortooltip" title="'.dol_escape_htmltag($texttoshow, 1, 1).
'">'.$text.
'</a>';
616 if ($obj->unitfrequency ==
"60") {
617 $s = ($obj->frequency).
" ".$langs->trans(
'MinuteShort');
618 } elseif ($obj->unitfrequency ==
"3600") {
619 $s = ($obj->frequency).
" ".$langs->trans(
'HourShort');
620 } elseif ($obj->unitfrequency ==
"86400") {
621 $s = ($obj->frequency).
" ".($obj->frequency > 1 ? $langs->trans(
'DurationDays') : $langs->trans(
'DurationDay'));
622 } elseif ($obj->unitfrequency ==
"604800") {
623 $s = ($obj->frequency).
" ".($obj->frequency > 1 ? $langs->trans(
'DurationWeeks') : $langs->trans(
'DurationWeek'));
624 } elseif ($obj->unitfrequency ==
"2678400") {
625 $s = ($obj->frequency).
" ".($obj->frequency > 1 ? $langs->trans(
'DurationMonths') : $langs->trans(
'DurationMonth'));
627 print
'<td class="tdoverflowmax125 center" title="'.dol_escape_htmltag($s).
'">';
645 print
'<td class="right">';
646 if (!empty($obj->nbrun)) {
651 if (!empty($obj->maxrun)) {
652 print
' <span class="'.$langs->trans(
"Max").
'">/ '.
dol_escape_htmltag($obj->maxrun).
'</span>';
656 $datefromto = (empty($datelastrun) ?
'' :
dol_print_date($datelastrun,
'dayhoursec',
'tzserver')).
' - '.(empty($datelastresult) ?
'' :
dol_print_date($datelastresult,
'dayhoursec',
'tzserver'));
659 print
'<td class="center" title="'.dol_escape_htmltag($datefromto).
'">';
660 if (!empty($datelastrun)) {
666 print
'<td class="center nowraponall" title="'.dol_escape_htmltag($datefromto).
'">';
667 if (!empty($datelastresult) && ($datelastresult >= $datelastrun)) {
668 $nbseconds = max($datelastresult - $datelastrun, 1);
669 print $nbseconds.
' '.$langs->trans(
"SecondShort");
674 print
'<td class="center tdlastresultcode" title="'.dol_escape_htmltag($obj->lastresult).
'">';
675 if ($obj->lastresult !=
'') {
676 if (empty($obj->lastresult)) {
677 print $obj->lastresult;
679 print
'<span class="error">'.dol_escape_htmltag(
dol_trunc($obj->lastresult)).
'</div>';
685 print
'<td class="small minwidth150">';
686 if (!empty($obj->lastoutput)) {
687 print
'<div class="twolinesmax classfortooltip" title="'.dol_escape_htmltag($obj->lastoutput, 1, 1).
'">';
694 print
'<td class="center">';
695 if (!empty($obj->datenextrun)) {
696 $datenextrun = $db->jdate($obj->datenextrun);
697 if (empty($obj->status)) {
698 print
'<span class="opacitymedium strikefordisabled">';
701 if ($obj->status == Cronjob::STATUS_ENABLED) {
702 if ($obj->maxrun && $obj->nbrun >= $obj->maxrun) {
704 } elseif ($datenextrun && $datenextrun < $now) {
708 if (empty($obj->status)) {
715 print
'<td class="center">';
716 print
$object->getLibStatut(5);
719 print
'<td class="nowraponall right">';
721 $backtopage = urlencode($_SERVER[
"PHP_SELF"].
'?'.$param.($sortfield ?
'&sortfield='.$sortfield :
'').($sortorder ?
'&sortorder='.$sortorder :
''));
722 if ($user->hasRight(
'cron',
'create')) {
723 print
'<a class="editfielda" href="'.DOL_URL_ROOT.
"/cron/card.php?id=".$obj->rowid.
'&action=edit&token='.
newToken().($sortfield ?
'&sortfield='.$sortfield :
'').($sortorder ?
'&sortorder='.$sortorder :
'').$param;
724 print
"&backtopage=".$backtopage.
"\" title=\"".
dol_escape_htmltag($langs->trans(
'Edit')).
"\">".
img_picto($langs->trans(
'Edit'),
'edit').
"</a> ";
726 if ($user->hasRight(
'cron',
'delete')) {
727 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
"?id=".$obj->rowid.
'&action=delete&token='.
newToken().($page ?
'&page='.$page :
'').($sortfield ?
'&sortfield='.$sortfield :
'').($sortorder ?
'&sortorder='.$sortorder :
'').$param;
728 print
'" title="'.dol_escape_htmltag($langs->trans(
'CronDelete')).
'">'.
img_picto($langs->trans(
'CronDelete'),
'delete',
'', 0, 0, 0,
'',
'marginleftonly').
'</a> ';
730 print
'<a href="#" title="'.dol_escape_htmltag($langs->trans(
'NotEnoughPermissions')).
'">'.
img_picto($langs->trans(
'NotEnoughPermissions'),
'delete',
'', 0, 0, 0,
'',
'marginleftonly').
'</a> ';
732 if ($user->hasRight(
'cron',
'execute')) {
733 if (!empty($obj->status)) {
734 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?id='.$obj->rowid.
'&action=execute&token='.
newToken();
736 print($sortfield ?
'&sortfield='.$sortfield :
'');
737 print($sortorder ?
'&sortorder='.$sortorder :
'');
738 print $param.
"\" title=\"".
dol_escape_htmltag($langs->trans(
'CronExecute')).
"\">".
img_picto($langs->trans(
'CronExecute'),
"play",
'', 0, 0, 0,
'',
'marginleftonly').
'</a>';
740 print
'<a href="#" class="cursordefault" title="'.dol_escape_htmltag($langs->trans(
'JobDisabled')).
'">'.
img_picto($langs->trans(
'JobDisabled'),
"playdisabled",
'', 0, 0, 0,
'',
'marginleftonly').
'</a>';
743 print
'<a href="#" class="cursornotallowed" title="'.dol_escape_htmltag($langs->trans(
'NotEnoughPermissions')).
'">'.
img_picto($langs->trans(
'NotEnoughPermissions'),
"playdisabled",
'', 0, 0, 0,
'',
'marginleftonly').
'</a>';
750 print
'<td class="nowraponall center">';
751 if ($massactionbutton || $massaction) {
753 if (in_array($obj->rowid, $arrayofselected)) {
756 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect valignmiddle" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
766 print
'<tr><td colspan="16"><span class="opacitymedium">'.$langs->trans(
'CronNoJobs').
'</span></td></tr>';
774if ($mode ==
'modulesetup') {
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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.
cronadmin_prepare_head()
Return array of tabs to used on pages to setup cron module.
verifCond($strToEvaluate, $onlysimplestring='1')
Verify if condition in string is ok or not.
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.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dolGetFirstLineOfText($text, $nboflines=1, $charset='UTF-8')
Return first line of text.
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.
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.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
newToken()
Return the value of token currently saved into session with name 'newtoken'.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
Show information in HTML for admin users or standard users.
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.