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';
45$langs->loadLangs(array(
"admin",
"cron",
"bills",
"members"));
47$action =
GETPOST(
'action',
'aZ09');
48$massaction =
GETPOST(
'massaction',
'alpha');
49$confirm =
GETPOST(
'confirm',
'alpha');
50$toselect =
GETPOST(
'toselect',
'array');
51$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'cronjoblist';
56$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
57$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
59if (empty($page) || $page == -1) {
62$offset = $limit * $page;
66 $sortfield =
't.priority,t.status';
69 $sortorder =
'ASC,DESC';
71$optioncss =
GETPOST(
'optioncss',
'alpha');
74$search_status =
GETPOST(
'search_status',
'intcomma');
75$search_label =
GETPOST(
"search_label",
'alpha');
76$search_module_name =
GETPOST(
"search_module_name",
'alpha');
77$search_lastresult =
GETPOST(
"search_lastresult",
"alphawithlgt");
78$search_processing =
GETPOST(
"search_processing",
'int');
79$securitykey =
GETPOST(
'securitykey',
'alpha');
81$outputdir =
$conf->cron->dir_output;
82if (empty($outputdir)) {
83 $outputdir =
$conf->cronjob->dir_output;
85$diroutputmassaction = $outputdir.
'/temp/massgeneration/'.$user->id;
90$hookmanager->initHooks(array(
'cronjoblist'));
94$extrafields->fetch_name_optionals_label(
$object->table_element);
96$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
99if (!$user->hasRight(
'cron',
'read')) {
103$permissiontoread = $user->hasRight(
'cron',
'read');
104$permissiontoadd = $user->hasRight(
'cron',
'create') ? $user->hasRight(
'cron',
'create') : $user->hasRight(
'cron',
'write');
105$permissiontodelete = $user->hasRight(
'cron',
'delete');
106$permissiontoexecute = $user->hasRight(
'cron',
'execute');
114if (
GETPOST(
'cancel',
'alpha')) {
118if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
122$parameters = array();
123$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
128if (empty($reshook)) {
130 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
133 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
136 $search_lastresult =
'';
138 $search_array_options = array();
140 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
141 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
146 if (!empty($search_label)) {
147 $filter[
't.label'] = $search_label;
151 if ($action ==
'confirm_delete' && $confirm ==
"yes" && $permissiontodelete) {
155 $result =
$object->delete($user);
163 if ($action ==
'confirm_execute' && $confirm ==
"yes" && $permissiontoexecute) {
173 $resrunjob =
$object->run_jobs($user->login);
174 if ($resrunjob < 0) {
179 $res =
$object->reprogram_jobs($user->login, $now);
181 if ($resrunjob >= 0) {
182 if (
$object->lastresult >= 0) {
194 $param =
'&search_status='.urlencode($search_status);
195 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
196 $param .=
'&contextpage='.urlencode($contextpage);
198 if ($limit > 0 && $limit !=
$conf->liste_limit) {
199 $param .=
'&limit='.((int) $limit);
202 $param .=
'&search_label='.urlencode($search_label);
204 if ($optioncss !=
'') {
205 $param .=
'&optioncss='.urlencode($optioncss);
208 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
210 header(
"Location: ".DOL_URL_ROOT.
'/cron/list.php?'.$param.($sortfield ?
'&sortfield='.$sortfield :
'').($sortorder ?
'&sortorder='.$sortorder :
''));
216 $objectclass =
'CronJob';
217 $objectlabel =
'CronJob';
218 $uploaddir =
$conf->cron->dir_output;
219 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
220 if ($massaction && $permissiontoadd) {
222 foreach ($toselect as
$id) {
223 $result = $tmpcron->fetch(
$id);
226 if ($massaction ==
'disable') {
227 $result = $tmpcron->setStatut(Cronjob::STATUS_DISABLED);
228 } elseif ($massaction ==
'enable') {
229 $result = $tmpcron->setStatut(Cronjob::STATUS_ENABLED);
247$form =
new Form($db);
250$title = $langs->trans(
"CronList");
252llxHeader(
'', $title,
'',
'', 0, 0,
'',
'',
'',
'bodyforlist');
254$TTestNotAllowed = array();
255$sqlTest =
'SELECT rowid, test FROM '.MAIN_DB_PREFIX.
'cronjob';
256$resultTest = $db->query($sqlTest);
258 while ($objTest = $db->fetch_object($resultTest)) {
261 $TTestNotAllowed[$objTest->rowid] = $objTest->rowid;
270$sql .=
" t.jobtype,";
272$sql .=
" t.command,";
273$sql .=
" t.classesname,";
274$sql .=
" t.objectname,";
275$sql .=
" t.methodename,";
277$sql .=
" t.md5params,";
278$sql .=
" t.module_name,";
279$sql .=
" t.priority,";
280$sql .=
" t.processing,";
281$sql .=
" t.datelastrun,";
282$sql .=
" t.datenextrun,";
283$sql .=
" t.dateend,";
284$sql .=
" t.datestart,";
285$sql .=
" t.lastresult,";
286$sql .=
" t.datelastresult,";
287$sql .=
" t.lastoutput,";
288$sql .=
" t.unitfrequency,";
289$sql .=
" t.frequency,";
291$sql .=
" t.fk_user_author,";
292$sql .=
" t.fk_user_mod,";
296$sql .=
" t.libname,";
298$sql .=
" FROM ".MAIN_DB_PREFIX.
"cronjob as t";
299$sql .=
" WHERE entity IN (0,".$conf->entity.
")";
300if (!empty($TTestNotAllowed)) {
301 $sql .=
' AND t.rowid NOT IN ('.$db->sanitize(implode(
',', $TTestNotAllowed)).
')';
303if ($search_status >= 0 && $search_status < 2 && $search_status !=
'') {
304 $sql .=
" AND t.status = ".(empty($search_status) ?
'0' :
'1');
306if ($search_lastresult !=
'') {
309if (GETPOSTISSET(
'search_processing')) {
310 $sql .=
" AND t.processing = ".((int) $search_processing);
313if (is_array($filter) && count($filter) > 0) {
314 foreach ($filter as $key => $value) {
315 $sql .=
" AND ".$key.
" LIKE '%".$db->escape($value).
"%'";
318if (!empty($search_module_name)) {
322include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
324$parameters = array();
325$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
326$sql .= $hookmanager->resPrint;
328$sql .= $db->order($sortfield, $sortorder);
330$nbtotalofrecords =
'';
332 $result = $db->query($sql);
333 $nbtotalofrecords = $db->num_rows($result);
334 if (($page * $limit) > $nbtotalofrecords) {
340$sql .= $db->plimit($limit + 1, $offset);
342$result = $db->query($sql);
347$num = $db->num_rows($result);
349$arrayofselected = is_array($toselect) ? $toselect : array();
352if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
353 $param .=
'&contextpage='.urlencode($contextpage);
355if ($limit > 0 && $limit !=
$conf->liste_limit) {
356 $param .=
'&limit='.((int) $limit);
359 $param .=
'&search_status='.urlencode($search_status);
362 $param .=
'&search_label='.urlencode($search_label);
364if ($search_module_name) {
365 $param .=
'&search_module_name='.urlencode($search_module_name);
367if ($search_lastresult) {
368 $param .=
'&search_lastresult='.urlencode($search_lastresult);
371 $param .=
'&mode='.urlencode($mode);
373if ($optioncss !=
'') {
374 $param .=
'&optioncss='.urlencode($optioncss);
377include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
381if ($action ==
'execute') {
382 print $form->formconfirm($_SERVER[
'PHP_SELF'].
"?id=".
$id.
'&securitykey='.$securitykey.$param, $langs->trans(
"CronExecute"), $langs->trans(
"CronConfirmExecute"),
"confirm_execute",
'',
'', 1);
385if ($action ==
'delete' && empty($toselect)) {
386 print $form->formconfirm($_SERVER[
'PHP_SELF'].
"?id=".
$id.$param, $langs->trans(
"CronDelete"), $langs->trans(
"CronConfirmDelete"),
"confirm_delete",
'',
'', 1);
390$arrayofmassactions = array(
393 'enable' =>
img_picto(
'',
'check',
'class="pictofixedwidth"').$langs->trans(
"CronStatusActiveBtn"),
394 'disable' =>
img_picto(
'',
'uncheck',
'class="pictofixedwidth"').$langs->trans(
"CronStatusInactiveBtn"),
396if ($user->hasRight(
'cron',
'delete')) {
397 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
399if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
400 $arrayofmassactions = array();
402$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
405if ($mode ==
'modulesetup') {
406 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
407 print
load_fiche_titre($langs->trans(
"CronSetup"), $linkback,
'title_setup');
413print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'" name="search_form">'.
"\n";
414if ($optioncss !=
'') {
415 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
417print
'<input type="hidden" name="token" value="'.newToken().
'">';
418print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
419print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
420print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
421print
'<input type="hidden" name="page" value="'.$page.
'">';
422print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
423print
'<input type="hidden" name="mode" value="'.$mode.
'">';
426$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'));
429if ($mode ==
'modulesetup') {
436print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, ($mode ==
'modulesetup' ?
'' :
'title_setup'), 0, $newcardbutton,
'', $limit);
439$topicmail =
"SendCronRef";
442$trackid =
'cron'.$object->id;
443include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
445$text = $langs->trans(
"HoursOnThisPageAreOnServerTZ").
' '.$stringcurrentdate.
'<br>';
447 $text .= $langs->trans(
"WarningCronDelayed",
getDolGlobalString(
'CRON_WARNING_DELAY_HOURS'));
455$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
457print
'<div class="div-table-responsive">';
458print
'<table class="noborder liste">';
460print
'<tr class="liste_titre_filter">';
463 print
'<td class="liste_titre right">';
464 $searchpicto = $form->showFilterButtons();
468print
'<td class="liste_titre"> </td>';
469print
'<td class="liste_titre">';
470print
'<input type="text" class="flat width75" name="search_label" value="'.$search_label.
'">';
473print
'<td class="liste_titre"><input type="text" class="width50" name="search_module_name" value="'.$search_module_name.
'"></td>';
474print
'<td class="liste_titre"> </td>';
475print
'<td class="liste_titre"> </td>';
478print
'<td class="liste_titre"> </td>';
479print
'<td class="liste_titre"> </td>';
480print
'<td class="liste_titre"> </td>';
481print
'<td class="liste_titre center"><input type="text" class="width50" name="search_lastresult" value="'.$search_lastresult.
'"></td>';
482print
'<td class="liste_titre"> </td>';
483print
'<td class="liste_titre"> </td>';
484print
'<td class="liste_titre center">';
485print $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');
487print
'<td class="liste_titre"> </td>';
490 print
'<td class="liste_titre right">';
491 $searchpicto = $form->showFilterButtons();
497print
'<tr class="liste_titre">';
500 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
"", $param,
'', $sortfield, $sortorder,
'center maxwidthsearch ');
505print_liste_field_titre(
"CronModule", $_SERVER[
"PHP_SELF"],
"t.module_name",
"", $param,
'', $sortfield, $sortorder);
510print_liste_field_titre(
"CronNbRun", $_SERVER[
"PHP_SELF"],
"t.nbrun",
"", $param,
'', $sortfield, $sortorder,
'right tdoverflowmax50 maxwidth50imp ');
511print_liste_field_titre(
"CronDtLastLaunch", $_SERVER[
"PHP_SELF"],
"t.datelastrun",
"", $param,
'', $sortfield, $sortorder,
'center tdoverflowmax100 ');
512print_liste_field_titre(
"Duration", $_SERVER[
"PHP_SELF"],
"",
"", $param,
'', $sortfield, $sortorder,
'center ');
513print_liste_field_titre(
"CronLastResult", $_SERVER[
"PHP_SELF"],
"t.lastresult",
"", $param,
'', $sortfield, $sortorder,
'center ');
514print_liste_field_titre(
"CronLastOutput", $_SERVER[
"PHP_SELF"],
"t.lastoutput",
"", $param,
'', $sortfield, $sortorder);
515print_liste_field_titre(
"CronDtNextLaunch", $_SERVER[
"PHP_SELF"],
"t.datenextrun",
"", $param,
'', $sortfield, $sortorder,
'center ');
516print_liste_field_titre(
"Status", $_SERVER[
"PHP_SELF"],
"t.status,t.priority",
"", $param,
'', $sortfield, $sortorder,
'center ');
520 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
"", $param,
'', $sortfield, $sortorder,
'center maxwidthsearch ');
530 while ($i < min($num, $limit)) {
531 $obj = $db->fetch_object($result);
538 if (preg_match(
'/:(.*)$/', $obj->label, $reg)) {
539 $langs->load($reg[1]);
544 $object->label = preg_replace(
'/:.*$/',
'', $obj->label);
545 $object->status = $obj->status;
546 $object->priority = $obj->priority;
547 $object->processing = $obj->processing;
548 $object->lastresult = (string) $obj->lastresult;
549 $object->datestart = $db->jdate($obj->datestart);
550 $object->dateend = $db->jdate($obj->dateend);
551 $object->module_name = $obj->module_name;
552 $object->params = $obj->params;
553 $object->datelastrun = $db->jdate($obj->datelastrun);
554 $object->datenextrun = $db->jdate($obj->datenextrun);
556 $datelastrun = $db->jdate($obj->datelastrun);
557 $datelastresult = $db->jdate($obj->datelastresult);
559 print
'<tr class="oddeven">';
563 print
'<td class="nowraponall center">';
564 if ($massactionbutton || $massaction) {
566 if (in_array($obj->rowid, $arrayofselected)) {
569 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect valignmiddle" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
575 print
'<td class="nowraponall">';
580 print
'<td class="minwidth150">';
583 print
'<div class="small twolinesmax minwidth150 maxwidth250 classfortooltip" title="'.dol_escape_htmltag($langs->trans(
$object->label), 0, 0).
'">';
584 print
$object->getNomUrl(0,
'', 1);
603 print
'<td class="nowraponall">';
604 if ($obj->jobtype ==
'method') {
606 $texttoshow =
'<b>'.$langs->trans(
"CronType_method").
'</b><br><br>';
607 $texttoshow .= $langs->trans(
'CronModule').
': '.$obj->module_name.
'<br>';
608 $texttoshow .= $langs->trans(
'CronClass').
': '.$obj->classesname.
'<br>';
609 $texttoshow .= $langs->trans(
'CronObject').
': '.$obj->objectname.
'<br>';
610 $texttoshow .= $langs->trans(
'CronMethod').
': '.$obj->methodename;
611 $texttoshow .=
'<br>'.$langs->trans(
'CronArgs').
': '.$obj->params;
612 $texttoshow .=
'<br>'.$langs->trans(
'Comment').
': '.$langs->trans($obj->note);
613 } elseif ($obj->jobtype ==
'command') {
615 $texttoshow =
'<b>'.$langs->trans(
'CronType_command').
'</b><br><br>';
616 $texttoshow .= $langs->trans(
'CronCommand').
': '.
dol_trunc($obj->command);
617 $texttoshow .=
'<br>'.$langs->trans(
'CronArgs').
': '.$obj->params;
618 $texttoshow .=
'<br>'.$langs->trans(
'Comment').
': '.$langs->trans($obj->note);
620 print
'<span class="classfortooltip" title="'.dol_escape_htmltag($texttoshow, 1, 1).
'">'.$text.
'</a>';
625 if ($obj->unitfrequency ==
"60") {
626 $s = ($obj->frequency).
" ".$langs->trans(
'MinuteShort');
627 } elseif ($obj->unitfrequency ==
"3600") {
628 $s = ($obj->frequency).
" ".$langs->trans(
'HourShort');
629 } elseif ($obj->unitfrequency ==
"86400") {
630 $s = ($obj->frequency).
" ".($obj->frequency > 1 ? $langs->trans(
'DurationDays') : $langs->trans(
'DurationDay'));
631 } elseif ($obj->unitfrequency ==
"604800") {
632 $s = ($obj->frequency).
" ".($obj->frequency > 1 ? $langs->trans(
'DurationWeeks') : $langs->trans(
'DurationWeek'));
633 } elseif ($obj->unitfrequency ==
"2678400") {
634 $s = ($obj->frequency).
" ".($obj->frequency > 1 ? $langs->trans(
'DurationMonths') : $langs->trans(
'DurationMonth'));
636 print
'<td class="tdoverflowmax125 center" title="'.dol_escape_htmltag($s).
'">';
654 print
'<td class="right">';
655 if (!empty($obj->nbrun)) {
660 if (!empty($obj->maxrun)) {
661 print
' <span class="'.$langs->trans(
"Max").
'">/ '.
dol_escape_htmltag($obj->maxrun).
'</span>';
665 $datefromto = (empty($datelastrun) ?
'' :
dol_print_date($datelastrun,
'dayhoursec',
'tzserver')).
' - '.(empty($datelastresult) ?
'' :
dol_print_date($datelastresult,
'dayhoursec',
'tzserver'));
668 print
'<td class="center" title="'.dol_escape_htmltag($datefromto).
'">';
669 if (!empty($datelastrun)) {
675 print
'<td class="center nowraponall" title="'.dol_escape_htmltag($datefromto).
'">';
676 if (!empty($datelastresult) && ($datelastresult >= $datelastrun)) {
677 $nbseconds = max($datelastresult - $datelastrun, 1);
678 print $nbseconds.
' '.$langs->trans(
"SecondShort");
683 print
'<td class="center tdlastresultcode" title="'.dol_escape_htmltag($obj->lastresult).
'">';
684 if ($obj->lastresult !=
'') {
685 if (empty($obj->lastresult)) {
686 print $obj->lastresult;
688 print
'<span class="error">'.dol_escape_htmltag(
dol_trunc($obj->lastresult)).
'</div>';
694 print
'<td class="small minwidth150">';
695 if (!empty($obj->lastoutput)) {
696 print
'<div class="twolinesmax classfortooltip" title="'.dol_escape_htmltag($obj->lastoutput, 1, 1).
'">';
703 print
'<td class="center">';
704 if (!empty($obj->datenextrun)) {
705 $datenextrun = $db->jdate($obj->datenextrun);
706 if (empty($obj->status)) {
707 print
'<span class="opacitymedium strikefordisabled">';
710 if ($obj->status == Cronjob::STATUS_ENABLED) {
711 if ($obj->maxrun && $obj->nbrun >= $obj->maxrun) {
713 } elseif ($datenextrun && $datenextrun < $now) {
717 if (empty($obj->status)) {
724 print
'<td class="center">';
725 print
$object->getLibStatut(5);
728 print
'<td class="nowraponall right">';
730 $backtopage = urlencode($_SERVER[
"PHP_SELF"].
'?'.$param.($sortfield ?
'&sortfield='.$sortfield :
'').($sortorder ?
'&sortorder='.$sortorder :
''));
731 if ($user->hasRight(
'cron',
'create')) {
732 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;
733 print
"&backtopage=".$backtopage.
"\" title=\"".
dol_escape_htmltag($langs->trans(
'Edit')).
"\">".
img_picto($langs->trans(
'Edit'),
'edit').
"</a> ";
735 if ($user->hasRight(
'cron',
'delete')) {
736 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;
737 print
'" title="'.dol_escape_htmltag($langs->trans(
'CronDelete')).
'">'.
img_picto($langs->trans(
'CronDelete'),
'delete',
'', 0, 0, 0,
'',
'marginleftonly').
'</a> ';
739 print
'<a href="#" title="'.dol_escape_htmltag($langs->trans(
'NotEnoughPermissions')).
'">'.
img_picto($langs->trans(
'NotEnoughPermissions'),
'delete',
'', 0, 0, 0,
'',
'marginleftonly').
'</a> ';
741 if ($user->hasRight(
'cron',
'execute')) {
742 if (!empty($obj->status)) {
743 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?id='.$obj->rowid.
'&action=execute&token='.
newToken();
745 print($sortfield ?
'&sortfield='.$sortfield :
'');
746 print($sortorder ?
'&sortorder='.$sortorder :
'');
747 print $param.
"\" title=\"".
dol_escape_htmltag($langs->trans(
'CronExecute')).
"\">".
img_picto($langs->trans(
'CronExecute'),
"play",
'', 0, 0, 0,
'',
'marginleftonly').
'</a>';
749 print
'<a href="#" class="cursordefault" title="'.dol_escape_htmltag($langs->trans(
'JobDisabled')).
'">'.
img_picto($langs->trans(
'JobDisabled'),
"playdisabled",
'', 0, 0, 0,
'',
'marginleftonly').
'</a>';
752 print
'<a href="#" class="cursornotallowed" title="'.dol_escape_htmltag($langs->trans(
'NotEnoughPermissions')).
'">'.
img_picto($langs->trans(
'NotEnoughPermissions'),
"playdisabled",
'', 0, 0, 0,
'',
'marginleftonly').
'</a>';
759 print
'<td class="nowraponall center">';
760 if ($massactionbutton || $massaction) {
762 if (in_array($obj->rowid, $arrayofselected)) {
765 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect valignmiddle" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
775 print
'<tr><td colspan="16"><span class="opacitymedium">'.$langs->trans(
'CronNoJobs').
'</span></td></tr>';
783if ($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...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.