aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/cron/cron.inc65
-rw-r--r--config/cron/cron.php199
-rw-r--r--config/cron/cron.xml63
-rw-r--r--config/cron/cron_edit.php238
-rw-r--r--config/cron/index.php2
5 files changed, 175 insertions, 392 deletions
diff --git a/config/cron/cron.inc b/config/cron/cron.inc
index a457cf58..7a7a8993 100644
--- a/config/cron/cron.inc
+++ b/config/cron/cron.inc
@@ -1,14 +1,11 @@
<?php
-/* $Id$ */
-/*
-/* ========================================================================== */
/*
cron.inc
+ part of pfSense (https://www.pfSense.org/)
Copyright (C) 2008 Mark J Crane
+ Copyright (C) 2015 ESF, LLC
All rights reserved.
- */
-/* ========================================================================== */
-/*
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -30,63 +27,23 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
-
require_once("services.inc");
-function cron_pkg_is_service_running($servicename) {
- exec("/bin/ps ax | awk '{ print $5 }'", $psout);
- array_shift($psout);
- foreach ($psout as $line) {
- $ps[] = trim(array_pop(explode(' ', array_pop(explode('/', $line)))));
- }
- if (is_service_running($servicename, $ps) or is_process_running($servicename)) {
- return true;
- } else {
- return false;
- }
-}
-
function cron_sync_package() {
-
- global $config;
- //synch cron tab
configure_cron();
- exec("/usr/local/etc/rc.d/cron.sh stop");
- exec("/usr/local/etc/rc.d/cron.sh start");
-
+ // Previous package versions were "helpfully" killing cron on uninstall.
+ // Also, need to make sure cron is running, otherwise the package is useless.
+ // TODO: Something like this needs to be eventually done in configure_cron() in services.inc.
+ if (!is_process_running("cron")) {
+ exec("cd /tmp && /usr/sbin/cron -s 2>/dev/null");
+ }
}
-
function cron_install_command() {
-
- global $config;
conf_mount_rw();
-
- //write_config();
-
- write_rcfile(array(
- "file" => "cron.sh",
- "start" => "[ `/bin/pgrep -f 'cron -s' | wc -l` -eq 0 ] && /usr/sbin/cron -s &",
- "stop" => "[ -f \"/var/run/cron.pid\" ] && kill -9 `cat /var/run/cron.pid`; rm -f /var/run/cron.pid; /bin/pkill -f 'cron -s'"
- )
- );
-
- cron_sync_package();
-
- //if (pkg_is_service_running('cron')) {
- //documentation purposes
- //}
-
- conf_mount_ro();
-
-}
-
-
-function cron_deinstall_command() {
- conf_mount_rw();
- exec("/usr/local/etc/rc.d/cron.sh stop");
+ // Clean up possible lingering garbage after previous package versions
unlink_if_exists("/usr/local/etc/rc.d/cron.sh");
- conf_mount_ro();
+ cron_sync_package();
}
?>
diff --git a/config/cron/cron.php b/config/cron/cron.php
index d7ed1494..7d55b086 100644
--- a/config/cron/cron.php
+++ b/config/cron/cron.php
@@ -1,8 +1,9 @@
<?php
-/* $Id$ */
/*
cron.php
+ part of pfSense (https://www.pfSense.org/)
Copyright (C) 2008 Mark J Crane
+ Copyright (C) 2015 ESF, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -26,13 +27,11 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
-
require_once("guiconfig.inc");
require_once("/usr/local/pkg/cron.inc");
$a_cron = &$config['cron']['item'];
-
if ($_GET['act'] == "del") {
if ($_GET['type'] == 'php') {
if ($a_cron[$_GET['id']]) {
@@ -56,147 +55,101 @@ 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);
-
?>
</td></tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="content">
- <tr>
- <td class="tabcont" >
-
-<form action="cron.php" method="post" name="iform" id="iform">
-<?php
-
-if ($config_change == 1) {
- write_config();
- $config_change = 0;
-}
-
-//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;
-
-?>
+<tr><td class="tabcont" >
+ <form action="cron.php" method="post" name="iform" id="iform">
+ <?php
+ if ($config_change == 1) {
+ write_config();
+ $config_change = 0;
+ }
+ ?>
<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>
+ <tr><td>
+ <div>
+ 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'>http://www.freebsd.org/doc/en/books/handbook/configtuning-cron.html</a>
+ </div>
+ </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 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>
- ?>
- <tr>
- <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
- <?=$ent['minute'];?>&nbsp;
- </td>
- <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
- <?=$ent['hour'];?>&nbsp;
- </td>
- <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
- <?=$ent['mday'];?>&nbsp;
- </td>
- <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
- <?=$ent['month'];?>&nbsp;
- </td>
- <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
- <?=$ent['wday'];?>&nbsp;
- </td>
- <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
- <?=$ent['who'];?>&nbsp;
- </td>
- <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';">
- <?=$ent['command'];?>&nbsp;
- </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&amp;act=del&amp;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++;
+ <?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'];?>&nbsp;</td>
+ <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"><?=$ent['hour'];?>&nbsp;</td>
+ <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"><?=$ent['mday'];?>&nbsp;</td>
+ <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"><?=$ent['month'];?>&nbsp;</td>
+ <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"><?=$ent['wday'];?>&nbsp;</td>
+ <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"><?=$ent['who'];?>&nbsp;</td>
+ <td class="listr" ondblclick="document.location='cron_edit.php?id=<?=$i;?>';"><?=$ent['command'];?>&nbsp;</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&amp;act=del&amp;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>
-
-
-<br />
-<br />
-<br />
-<br />
-<br />
-<br />
-<br />
-<br />
-
+ <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>
+</td></tr>
</table>
</div>
diff --git a/config/cron/cron.xml b/config/cron/cron.xml
index 5a2b770b..84b7f07e 100644
--- a/config/cron/cron.xml
+++ b/config/cron/cron.xml
@@ -1,21 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE packagegui SYSTEM "./schema/packages.dtd">
-<?xml-stylesheet type="text/xsl" href="./xsl/package.xsl"?>
+<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
+<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
<copyright>
- <![CDATA[
+<![CDATA[
/* $Id$ */
-/* ========================================================================== */
+/* ====================================================================================== */
/*
cron.xml
+ part of pfSense (https://www.pfSense.org/)
Copyright (C) 2008 Mark J Crane
+ Copyright (C) 2015 ESF, LLC
All rights reserved.
- */
-/* ========================================================================== */
+*/
+/* ====================================================================================== */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
+
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
@@ -23,6 +26,7 @@
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
+
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
@@ -33,79 +37,43 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
+*/
+/* ====================================================================================== */
]]>
</copyright>
<description>Cron</description>
- <requirements>Describe your package requirements here</requirements>
- <faq>Currently there are no FAQ items provided.</faq>
<name>Cron Settings</name>
- <version>0.2.2</version>
+ <version>0.3.0</version>
<title>Settings</title>
<include_file>/usr/local/pkg/cron.inc</include_file>
<menu>
<name>Cron</name>
- <tooltiptext>cron settings.</tooltiptext>
+ <tooltiptext>Cron settings.</tooltiptext>
<section>Services</section>
<configfile>cron.xml</configfile>
<url>/packages/cron/cron.php</url>
</menu>
- <service>
- <name>cron</name>
- <rcfile>cron.sh</rcfile>
- <executable>cron</executable>
- <description>Scheduled commands daemon</description>
- </service>
- <tabs>
- <tab>
- <text>Settings</text>
- <url>/packages/cron.php</url>
- <active/>
- </tab>
- </tabs>
<configpath>installedpackages->package->$packagename->configuration->cron</configpath>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/cron/cron.xml</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/cron/cron.inc</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/www/packages/cron/</prefix>
- <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/cron/cron.php</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/www/packages/cron/</prefix>
- <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/cron/cron_edit.php</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/www/packages/cron/</prefix>
- <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/cron/index.php</item>
</additional_files_needed>
- <fields>
- <field>
- <fielddescr>Variable One</fielddescr>
- <fieldname>var1</fieldname>
- <description>Enter the variable one here.</description>
- <type>input</type>
- </field>
- <field>
- <fielddescr>Variable Two</fielddescr>
- <fieldname>var1</fieldname>
- <description>Enter the variable one here.</description>
- <type>input</type>
- </field>
- </fields>
- <custom_add_php_command>
- </custom_add_php_command>
<custom_php_resync_config_command>
cron_sync_package();
</custom_php_resync_config_command>
@@ -115,7 +83,4 @@
<custom_php_install_command>
cron_install_command();
</custom_php_install_command>
- <custom_php_deinstall_command>
- cron_deinstall_command();
- </custom_php_deinstall_command>
</packagegui>
diff --git a/config/cron/cron_edit.php b/config/cron/cron_edit.php
index 2b72a04d..b89c28e0 100644
--- a/config/cron/cron_edit.php
+++ b/config/cron/cron_edit.php
@@ -1,9 +1,9 @@
<?php
-/* $Id$ */
/*
-
cron_edit.php
+ part of pfSense (https://www.pfSense.org/)
Copyright (C) 2008 Mark J Crane
+ Copyright (C) 2015 ESF, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -27,11 +27,9 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
-
require_once("guiconfig.inc");
require_once("/usr/local/pkg/cron.inc");
-
$a_cron = &$config['cron']['item'];
$id = $_GET['id'];
@@ -40,19 +38,18 @@ if (isset($_POST['id'])) {
}
if ($_GET['act'] == "del") {
- if ($_GET['type'] == 'php') {
- if ($a_cron[$_GET['id']]) {
- unset($a_cron[$_GET['id']]);
- write_config();
- cron_sync_package();
- header("Location: cron.php");
- exit;
- }
- }
+ if ($_GET['type'] == 'php') {
+ if ($a_cron[$_GET['id']]) {
+ unset($a_cron[$_GET['id']]);
+ write_config();
+ cron_sync_package();
+ header("Location: cron.php");
+ exit;
+ }
+ }
}
if (isset($id) && $a_cron[$id]) {
-
$pconfig['minute'] = $a_cron[$id]['minute'];
$pconfig['hour'] = $a_cron[$id]['hour'];
$pconfig['mday'] = $a_cron[$id]['mday'];
@@ -60,11 +57,9 @@ if (isset($id) && $a_cron[$id]) {
$pconfig['wday'] = $a_cron[$id]['wday'];
$pconfig['who'] = $a_cron[$id]['who'];
$pconfig['command'] = $a_cron[$id]['command'];
-
}
if ($_POST) {
-
unset($input_errors);
$pconfig = $_POST;
@@ -80,10 +75,10 @@ if ($_POST) {
$ent['command'] = $_POST['command'];
if (isset($id) && $a_cron[$id]) {
- //update
+ // update
$a_cron[$id] = $ent;
} else {
- //add
+ // add
$a_cron[] = $ent;
}
@@ -115,165 +110,78 @@ function show_advanced_config() {
<?php if ($input_errors) print_input_errors($input_errors); ?>
-
<div id="mainlevel">
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="mainlevel">
<tr><td class="tabnavtbl">
<?php
-
$tab_array = array();
$tab_array[] = array(gettext("Settings"), false, "/packages/cron/cron.php");
$tab_array[] = array(gettext("Edit"), true, "/packages/cron/cron_edit.php");
display_top_tabs($tab_array);
-
?>
</td></tr>
</table>
-<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="mainarea">
- <tr>
- <td class="tabcont" >
-
- <!--
- <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>
- </p>
- </td>
- </tr>
- </table>
- -->
- <br />
- <form action="cron_edit.php" method="post" name="iform" id="iform">
- <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="form">
- <tr>
- <td width="25%" valign="top" class="vncellreq">minute</td>
- <td width="75%" class="vtable">
- <input name="minute" type="text" class="formfld" id="minute" size="40" value="<?=htmlspecialchars($pconfig['minute']);?>" />
- </td>
- </tr>
-
- <tr>
- <td width="25%" valign="top" class="vncellreq">hour</td>
- <td width="75%" class="vtable">
- <input name="hour" type="text" class="formfld" id="hour" size="40" value="<?=htmlspecialchars($pconfig['hour']);?>" />
- </td>
- </tr>
-
- <tr>
- <td width="25%" valign="top" class="vncellreq">mday</td>
- <td width="75%" class="vtable">
- <input name="mday" type="text" class="formfld" id="mday" size="40" value="<?=htmlspecialchars($pconfig['mday']);?>" />
- </td>
- </tr>
-
- <tr>
- <td width="25%" valign="top" class="vncellreq">month</td>
- <td width="75%" class="vtable">
- <input name="month" type="text" class="formfld" id="month" size="40" value="<?=htmlspecialchars($pconfig['month']);?>" />
- </td>
- </tr>
-
- <tr>
- <td width="25%" valign="top" class="vncellreq">wday</td>
- <td width="75%" class="vtable">
- <input name="wday" type="text" class="formfld" id="wday" size="40" value="<?=htmlspecialchars($pconfig['wday']);?>" />
- </td>
- </tr>
-
- <tr>
- <td width="25%" valign="top" class="vncellreq">who</td>
- <td width="75%" class="vtable">
- <input name="who" type="text" class="formfld" id="who" size="40" value="<?=htmlspecialchars($pconfig['who']);?>" />
- </td>
- </tr>
-
- <tr>
- <td width="25%" valign="top" class="vncellreq">command</td>
- <td width="75%" class="vtable">
- <!-- <input name="command" type="text" class="formfld" id="command" size="40" value="<?=htmlspecialchars($pconfig['command']);?>" /> -->
- <textarea rows="3" cols="68" name="command" id="command"><?=htmlspecialchars($pconfig['command']);?></textarea>
- </td>
- </tr>
- <!--
- <tr>
- <td width="22%" valign="top" class="vncell">PHP</td>
- <td width="78%" class="vtable">
- -->
- <?php
- //echo "<textarea name=\"php\" id=\"php\" cols=\"70\" rows=\"15\" wrap=\"off\">".htmlspecialchars($pconfig['php'])."</textarea>\n";
- ?>
- <!--
- <br>
- <select name='dialplan_expression_select' id='dialplan_expression_select' onchange="document.getElementById('dialplan_expression').value += document.getElementById('dialplan_expression_select').value + '\n';" class='formfld'>
- <option></option>
- <option value='snortkillsessions'>snort kill sessions</option>
- </select>
- <span class="vexpl">
- <br />
- </span>
- </td>
- </tr>
- -->
- <!--
- <tr>
- <td width="22%" valign="top" class="vncellreq">Enabled</td>
- <td width="78%" class="vtable">
- <?php
- echo " <select name='enabled' class='formfld'>\n";
- echo " <option></option>\n";
- switch (htmlspecialchars($pconfig['enabled'])) {
- case "true":
- echo " <option value='true' selected='selected'>true</option>\n";
- echo " <option value='false'>false</option>\n";
- break;
- case "false":
- echo " <option value='true'>true</option>\n";
- echo " <option value='false' selected='selected'>false</option>\n";
-
- break;
- default:
- echo " <option value='true' selected='selected'>true</option>\n";
- echo " <option value='false'>false</option>\n";
- }
- echo " </select>\n";
- ?>
- </td>
- </tr>
- -->
- <!--
- <tr>
- <td width="25%" valign="top" class="vncellreq">Description</td>
- <td width="75%" class="vtable">
- <input name="description" type="text" class="formfld" id="description" size="40" value="<?=htmlspecialchars($pconfig['description']);?>" />
- <br /><span class="vexpl">Enter the description here.<br /></span>
- </td>
- </tr>
- -->
-
- <tr>
- <td valign="top">&nbsp;</td>
- <td>
- <input name="Submit" type="submit" class="formbtn" value="Save" /> <input class="formbtn" type="button" value="Cancel" onclick="history.back()" />
- <?php if (isset($id) && $a_cron[$id]): ?>
- <input name="id" type="hidden" value="<?=$id;?>" />
- <?php endif; ?>
- </td>
- </tr>
- </table>
- </form>
-
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
-
- </td>
- </tr>
+<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="mainarea">
+<tr><td class="tabcont" >
+ <br />
+ <form action="cron_edit.php" method="post" name="iform" id="iform">
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="form">
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">minute</td>
+ <td width="75%" class="vtable">
+ <input name="minute" type="text" class="formfld" id="minute" size="40" value="<?=htmlspecialchars($pconfig['minute']);?>" />
+ </td>
+ </tr>
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">hour</td>
+ <td width="75%" class="vtable">
+ <input name="hour" type="text" class="formfld" id="hour" size="40" value="<?=htmlspecialchars($pconfig['hour']);?>" />
+ </td>
+ </tr>
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">mday</td>
+ <td width="75%" class="vtable">
+ <input name="mday" type="text" class="formfld" id="mday" size="40" value="<?=htmlspecialchars($pconfig['mday']);?>" />
+ </td>
+ </tr>
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">month</td>
+ <td width="75%" class="vtable">
+ <input name="month" type="text" class="formfld" id="month" size="40" value="<?=htmlspecialchars($pconfig['month']);?>" />
+ </td>
+ </tr>
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">wday</td>
+ <td width="75%" class="vtable">
+ <input name="wday" type="text" class="formfld" id="wday" size="40" value="<?=htmlspecialchars($pconfig['wday']);?>" />
+ </td>
+ </tr>
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">who</td>
+ <td width="75%" class="vtable">
+ <input name="who" type="text" class="formfld" id="who" size="40" value="<?=htmlspecialchars($pconfig['who']);?>" />
+ </td>
+ </tr>
+ <tr>
+ <td width="25%" valign="top" class="vncellreq">command</td>
+ <td width="75%" class="vtable">
+ <textarea rows="3" cols="68" name="command" id="command"><?=htmlspecialchars($pconfig['command']);?></textarea>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">&nbsp;</td>
+ <td>
+ <input name="Submit" type="submit" class="formbtn" value="Save" /> <input class="formbtn" type="button" value="Cancel" onclick="history.back()" />
+ <?php if (isset($id) && $a_cron[$id]): ?>
+ <input name="id" type="hidden" value="<?=$id;?>" />
+ <?php endif; ?>
+ </td>
+ </tr>
+ </table>
+ </form>
+ <br />
+</td></tr>
</table>
</div>
diff --git a/config/cron/index.php b/config/cron/index.php
index 0d4ff4cd..24237ecc 100644
--- a/config/cron/index.php
+++ b/config/cron/index.php
@@ -3,4 +3,4 @@
Header("Location: /");
exit;
-?> \ No newline at end of file
+?>