26 require_once(
"../class/config.php");
27 include_once(
"head.php");
30 "cronupdate" => array (
"post",
"array",
""),
34 if (!empty($cronupdate)) {
35 if ($cron->update($cronupdate)) {
36 $msg->raise(
"INFO",
"mysql", _(
"Save done."));
43 <h3><?php
__(
"Scheduled tasks"); ?></h3>
48 echo
$msg->msg_html_all()
51 <form method=
"post" action=
"cron.php" id=
"main" name=
"cron" >
58 <th><?php
__(
"URL"); ?></th>
59 <th><?php
__(
"Schedule"); ?></th>
60 <th><?php
__(
"User"); ?></th>
61 <th><?php
__(
"Password"); ?></th>
62 <th><?php
__(
"Email report"); ?></th>
72 <tr
class=
"<?php echo ($i%2)?"lst1
":"lst2
"; ?>">
74 <?php
if (isset(
$lst_cron[
$i])) echo
"<input type='hidden' name='cronupdate[$i][id]' value='".
$lst_cron[
$i][
'id'].
"' />"; ?>
75 <?php
if (isset(
$lst_cron[
$i])) { echo
'#'.$lst_cron[
$i][
'id']; } ?><br/>
76 <a href=
"javascript:cleancron('<?php echo $i ?>');"><img src=
"images/delete.png" alt=
"<?php __("Delete
");?>" title=
"<?php __("Delete
");?>"/></a>
79 <label
for=
"crup_url_<?php echo $i?>"><?php
__(
"Called URL"); ?> :</label><br/><input type=
"text" id=
"crup_url_<?php echo $i; ?>" name=
"<?php echo "cronupdate[
$i][url]
";?>" size=
"40" maxlength=
"255" value=
"<?php if (isset($lst_cron[$i]['url'])) { ehe($lst_cron[$i]['url']); } ?>"/>
82 <?php
__(
"Period:");?> <select name=
'cronupdate[<?php echo $i; ?>][schedule]'>
84 foreach ($cron->schedule() as $cs) {
85 echo
"<option value='".$cs[
'unit'].
"'";
87 echo
" selected='selected' ";
89 echo
" >".$cs[
'name'];
96 </tr><tr
class=
"<?php echo ($i%2)?"lst1
":"lst2
"; ?>">
97 <td><label
for=
"crup_user_<?php echo $i?>"><?php
__(
"HTTP user (optional)"); ?> :</label><br/><input type=
"text" id=
"crup_user_<?php echo $i?>" name=
"<?php echo "cronupdate[
$i][user]
";?>" size=
"20" maxlength=
"64" value=
"<?php if (isset($lst_cron[$i]['user'])) { ehe($lst_cron[$i]['user']);} ?>"/></td>
98 <td><label
for=
"crup_pass_<?php echo $i?>"><?php
__(
"HTTP password (optional)"); ?> :</label><br/><input type=
"text" id=
"crup_pass_<?php echo $i?>" name=
"<?php echo "cronupdate[
$i][password]
";?>" size=
"20" maxlength=
"64" value=
"<?php if (isset($lst_cron[$i]['password'])) { ehe($lst_cron[$i]['password']);} ?>"/></td>
99 <td><label
for=
"crup_mail_<?php echo $i?>"><?php
__(
"Mail address (optional)"); ?> :</label><br/><input type=
"text" id=
"crup_mail_<?php echo $i?>" name=
"<?php echo "cronupdate[
$i][email]
";?>" size=
"25" maxlength=
"64" value=
"<?php if (isset($lst_cron[$i]['email'])) { ehe($lst_cron[$i]['email']);} ?>"/></td>
103 <p><input type=
"submit" name=
"submit" class=
"inb ok" value=
"<?php __("Apply the modifications
"); ?>" /></p>
107 <script type=
"text/javascript">
109 document.getElementById(
'crup_url_'+i).value =
'';
110 document.getElementById(
'crup_user_'+i).value =
'';
111 document.getElementById(
'crup_pass_'+i).value =
'';
112 document.getElementById(
'crup_mail_'+i).value =
'';
117 <?php include_once(
"foot.php"); ?>
for($i=0; $i< $max_cron ; $i++)</table >< p >< input type="submit" name="submit" class="inb ok" value="<?php __("Apply the modifications"); ?></p></form><script type="text/javascript"> cleancron(i)
if(!empty($cronupdate)) $lst_cron
$fields
Launch the AlternC's panel crontab for users.
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...