diff options
Diffstat (limited to 'config/cron/cron.php')
-rw-r--r-- | config/cron/cron.php | 240 |
1 files changed, 119 insertions, 121 deletions
diff --git a/config/cron/cron.php b/config/cron/cron.php index b9666e01..d7ed1494 100644 --- a/config/cron/cron.php +++ b/config/cron/cron.php @@ -30,21 +30,21 @@ require_once("guiconfig.inc"); require_once("/usr/local/pkg/cron.inc"); -$a_cron = &$config['cron']['item']; +$a_cron = &$config['cron']['item']; if ($_GET['act'] == "del") { - if ($_GET['type'] == 'php') { - if ($a_cron[$_GET['id']]) { - unset($a_cron[$_GET['id']]); - write_config(); - header("Location: cron.php"); - exit; - } - } + if ($_GET['type'] == 'php') { + if ($a_cron[$_GET['id']]) { + unset($a_cron[$_GET['id']]); + write_config(); + header("Location: cron.php"); + exit; + } + } } -$pgtitle = array(gettext("Cron"),gettext("Settings")); +$pgtitle = array(gettext("Cron"), gettext("Settings")); include("head.inc"); ?> @@ -56,134 +56,133 @@ include("head.inc"); <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="tabs"> <tr><td class="tabnavtbl"> <?php - + $tab_array = array(); $tab_array[] = array(gettext("Settings"), true, "/packages/cron/cron.php"); $tab_array[] = array(gettext("Edit"), false, "/packages/cron/cron_edit.php"); - display_top_tabs($tab_array); - + display_top_tabs($tab_array); + ?> </td></tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="content"> - <tr> - <td class="tabcont" > + <tr> + <td class="tabcont" > <form action="cron.php" method="post" name="iform" id="iform"> -<?php +<?php if ($config_change == 1) { - write_config(); - $config_change = 0; + write_config(); + $config_change = 0; } -//if ($savemsg) print_info_box($savemsg); +//if ($savemsg) print_info_box($savemsg); //if (file_exists($d_hostsdirty_path)): echo"<p>"; //print_info_box_np("This is an info box."); //echo"<br />"; -//endif; +//endif; ?> - <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="title"> - <tr> - <td><p><!--<span class="vexpl"><span class="red"><strong>Cron<br></strong></span>--> - Cron controls the scheduling of commands. - <br /><br /> - For more information see: <a href='http://www.freebsd.org/doc/en/books/handbook/configtuning-cron.html' target='_blank'>http://www.freebsd.org/doc/en/books/handbook/configtuning-cron.html</a> - </p></td> - </tr> - </table> - <br /> - - <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="heading"> - <tr> - <td width="5%" class="listhdrr">minute</td> - <td width="5%" class="listhdrr">hour</td> - <td width="5%" class="listhdrr">mday</td> - <td width="5%" class="listhdrr">month</td> - <td width="5%" class="listhdrr">wday</td> - <td width="5%" class="listhdrr">who</td> - <td width="60%" class="listhdr">command</td> - <td width="10%" class="list"> - - <table border="0" cellspacing="0" cellpadding="1" summary="icons"> - <tr> - <td width="17"></td> - <td valign="middle"><a href="cron_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="edit" /></a></td> - </tr> - </table> - - </td> - </tr> + <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="title"> + <tr> + <td> + <p><!--<span class="vexpl"><span class="red"><strong>Cron<br></strong></span>--> + Cron controls the scheduling of commands. + <br /><br /> + For more information see: <a href='http://www.freebsd.org/doc/en/books/handbook/configtuning-cron.html' target='_blank'>http://www.freebsd.org/doc/en/books/handbook/configtuning-cron.html</a> + </p> + </td> + </tr> + </table> + <br /> + + <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="heading"> + <tr> + <td width="5%" class="listhdrr">minute</td> + <td width="5%" class="listhdrr">hour</td> + <td width="5%" class="listhdrr">mday</td> + <td width="5%" class="listhdrr">month</td> + <td width="5%" class="listhdrr">wday</td> + <td width="5%" class="listhdrr">who</td> + <td width="60%" class="listhdr">command</td> + <td width="10%" class="list"> + <table border="0" cellspacing="0" cellpadding="1" summary="icons"> + <tr> + <td width="17"></td> + <td valign="middle"><a href="cron_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="edit" /></a></td> + </tr> + </table> + </td> + </tr> + + + <?php + + $i = 0; + if (count($a_cron) > 0) { + foreach ($a_cron as $ent) { + + ?> + + <tr> + <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> + <?=$ent['minute'];?> + </td> + <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> + <?=$ent['hour'];?> + </td> + <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> + <?=$ent['mday'];?> + </td> + <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> + <?=$ent['month'];?> + </td> + <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> + <?=$ent['wday'];?> + </td> + <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> + <?=$ent['who'];?> + </td> + <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> + <?=$ent['command'];?> + </td> + <td valign="middle" style="white-space:nowrap" class="list"> + <table border="0" cellspacing="0" cellpadding="1" summary="edit delete"> + <tr> + <td valign="middle"><a href="cron_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" alt="edit" /></a></td> + <td><a href="cron_edit.php?type=php&act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this?')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" /></a></td> + </tr> + </table> + </td> + </tr> + <?php + + $i++; + } + } + ?> + + <tr> + <td class="list" colspan="7"></td> + <td class="list"> + <table border="0" cellspacing="0" cellpadding="1" summary="add"> + <tr> + <td width="17"></td> + <td valign="middle"><a href="cron_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="add" /></a></td> + </tr> + </table> + </td> + </tr> + + + <tr> + <td class="list" colspan="8"></td> + <td class="list"></td> + </tr> + </table> - - <?php - - $i = 0; - if (count($a_cron) > 0) { - - foreach ($a_cron as $ent) { - - ?> - - <tr> - <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> - <?=$ent['minute'];?> - </td> - <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> - <?=$ent['hour'];?> - </td> - <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> - <?=$ent['mday'];?> - </td> - <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> - <?=$ent['month'];?> - </td> - <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> - <?=$ent['wday'];?> - </td> - <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> - <?=$ent['who'];?> - </td> - <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"> - <?=$ent['command'];?> - </td> - <td valign="middle" style="white-space:nowrap" class="list"> - <table border="0" cellspacing="0" cellpadding="1" summary="edit delete"> - <tr> - <td valign="middle"><a href="cron_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" alt="edit" /></a></td> - <td><a href="cron_edit.php?type=php&act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this?')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" /></a></td> - </tr> - </table> - </td> - </tr> - <?php - - $i++; - } - } - ?> - - <tr> - <td class="list" colspan="7"></td> - <td class="list"> - <table border="0" cellspacing="0" cellpadding="1" summary="add"> - <tr> - <td width="17"></td> - <td valign="middle"><a href="cron_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="add" /></a></td> - </tr> - </table> - </td> - </tr> - - - <tr> - <td class="list" colspan="8"></td> - <td class="list"></td> - </tr> - </table> - </form> @@ -196,13 +195,12 @@ if ($config_change == 1) { <br /> <br /> -</td> -</tr> + </td> + </tr> </table> </div> - <?php include("fend.inc"); ?> </body> </html> |