28 require
'../../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/cron.lib.php';
33 $langs->loadLangs(array(
'admin',
'cron'));
38 $actionsave =
GETPOST(
"save",
'alphanohtml');
41 if (!empty($actionsave))
67 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
73 print '<form name="agendasetupform" action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
74 print '<input type="hidden" name="token" value="'.newToken().
'">';
78 print '<span class="opacitymedium">'.$langs->trans(
'CronInfo').
'</span><br>';
82 print '<table class="noborder centpercent">';
84 print '<tr class="liste_titre">';
85 print "<td>".$langs->trans(
"Parameter").
"</td>";
86 print "<td>".$langs->trans(
"Value").
"</td>";
90 print '<tr class="oddeven">';
91 print '<td class="fieldrequired">'.$langs->trans(
"KeyForCronAccess").
'</td>';
93 if (!empty($conf->global->CRON_DISABLE_KEY_CHANGE)) $disabled =
' disabled="disabled"';
95 if (empty($conf->global->CRON_DISABLE_KEY_CHANGE))
97 print '<input type="text" class="flat minwidth300"'.$disabled.
' id="CRON_KEY" name="CRON_KEY" value="'.(
GETPOST(
'CRON_KEY') ?
GETPOST(
'CRON_KEY') : (!empty($conf->global->CRON_KEY) ? $conf->global->CRON_KEY :
'')).
'">';
98 if (!empty($conf->use_javascript_ajax))
99 print ' '.img_picto($langs->trans(
'Generate'),
'refresh',
'id="generate_token" class="linkobject"');
101 print (!empty($conf->global->CRON_KEY) ? $conf->global->CRON_KEY :
'');
102 print '<input type="hidden" id="CRON_KEY" name="CRON_KEY" value="'.(GETPOST(
'CRON_KEY') ?
GETPOST(
'CRON_KEY') : (!empty($conf->global->CRON_KEY) ? $conf->global->CRON_KEY :
'')).
'">';
105 print '<td> </td>';
112 print '<div class="center">';
113 print '<input type="submit" name="save" class="button button-save" value="'.$langs->trans(
"Save").
'">';
119 print '<br><br><br>';
122 if (!empty($conf->global->CRON_WARNING_DELAY_HOURS))
print info_admin($langs->trans(
"WarningCronDelayed", $conf->global->CRON_WARNING_DELAY_HOURS)).
'<br>';
131 if (!empty($conf->use_javascript_ajax))
133 print
"\n".
'<script type="text/javascript">';
134 print
'$(document).ready(function () {
135 $("#generate_token").click(function() {
136 $.get( "'.DOL_URL_ROOT.
'/core/ajax/security.php", {
137 action: \'getrandompassword\',
141 $("#CRON_KEY").val(token);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_cron_urls()
Show information with URLs to launch jobs.
dolibarr_set_const($db, $name, $value, $type= 'chaine', $visible=0, $note= '', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
cronadmin_prepare_head()
Return array of tabs to used on pages to setup cron module.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin= '1', $morecss= '', $textfordropdown= '')
Show information for admin users or standard users.