aboutsummaryrefslogtreecommitdiffstats
path: root/config/cron
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-08-06 12:00:26 +0545
committerPhil Davis <phil.davis@inf.org>2015-08-06 12:00:26 +0545
commitb3c4b3badcd3eb35a0ec0c469842a70905db881d (patch)
treee5b0421c22d924a603ef1e8cd091352c6ecd85cf /config/cron
parent37e90498c6c3fb56bfd28d50b8b85b12fc6fb4fb (diff)
downloadpfsense-packages-b3c4b3badcd3eb35a0ec0c469842a70905db881d.tar.gz
pfsense-packages-b3c4b3badcd3eb35a0ec0c469842a70905db881d.tar.bz2
pfsense-packages-b3c4b3badcd3eb35a0ec0c469842a70905db881d.zip
Cron package code style
Diffstat (limited to 'config/cron')
-rw-r--r--config/cron/cron.inc31
-rw-r--r--config/cron/cron.php240
-rw-r--r--config/cron/cron.xml74
-rw-r--r--config/cron/cron_edit.php339
4 files changed, 337 insertions, 347 deletions
diff --git a/config/cron/cron.inc b/config/cron/cron.inc
index a457f013..0c7c6769 100644
--- a/config/cron/cron.inc
+++ b/config/cron/cron.inc
@@ -3,10 +3,10 @@
/*
/* ========================================================================== */
/*
- cron.inc
- Copyright (C) 2008 Mark J Crane
- All rights reserved.
- */
+ cron.inc
+ Copyright (C) 2008 Mark J Crane
+ All rights reserved.
+ */
/* ========================================================================== */
/*
Redistribution and use in source and binary forms, with or without
@@ -33,35 +33,31 @@
require_once("services.inc");
-function cron_pkg_is_service_running($servicename)
-{
+function cron_pkg_is_service_running($servicename) {
exec("/bin/ps ax | awk '{ print $5 }'", $psout);
array_shift($psout);
- foreach($psout as $line) {
+ foreach ($psout as $line) {
$ps[] = trim(array_pop(explode(' ', array_pop(explode('/', $line)))));
}
- if(is_service_running($servicename, $ps) or is_process_running($servicename) ) {
+ if (is_service_running($servicename, $ps) or is_process_running($servicename)) {
return true;
- }
- else {
+ } else {
return false;
}
}
-function cron_sync_package()
-{
+function cron_sync_package() {
- global $config;
+ 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");
}
-
-function cron_install_command()
-{
+
+function cron_install_command() {
global $config;
conf_mount_rw();
@@ -88,8 +84,7 @@ function cron_install_command()
}
-function cron_deinstall_command()
-{
+function cron_deinstall_command() {
conf_mount_rw();
exec("/usr/local/etc/rc.d/cron.sh stop");
unlink_if_exists("/usr/local/etc/rc.d/cron.sh");
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'];?>&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>
-
- <?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>
@@ -196,13 +195,12 @@ if ($config_change == 1) {
<br />
<br />
-</td>
-</tr>
+ </td>
+ </tr>
</table>
</div>
-
<?php include("fend.inc"); ?>
</body>
</html>
diff --git a/config/cron/cron.xml b/config/cron/cron.xml
index ba70e5e5..5a2b770b 100644
--- a/config/cron/cron.xml
+++ b/config/cron/cron.xml
@@ -2,44 +2,44 @@
<!DOCTYPE packagegui SYSTEM "./schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="./xsl/package.xsl"?>
<packagegui>
- <copyright>
- <![CDATA[
+ <copyright>
+ <![CDATA[
/* $Id$ */
/* ========================================================================== */
/*
- cron.xml
- Copyright (C) 2008 Mark J Crane
- All rights reserved.
- */
+ cron.xml
+ Copyright (C) 2008 Mark J Crane
+ All rights reserved.
+ */
/* ========================================================================== */
/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
+ 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.
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
+ 2. Redistributions in binary form must reproduce the above copyright
+ 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
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- 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.
- */
+ 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
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ 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>
+ ]]>
+ </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>
<title>Settings</title>
@@ -62,32 +62,32 @@
<text>Settings</text>
<url>/packages/cron.php</url>
<active/>
- </tab>
+ </tab>
</tabs>
<configpath>installedpackages->package->$packagename->configuration->cron</configpath>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
+ <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>
+ <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>
+ <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>
+ <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>
+ <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/cron/index.php</item>
</additional_files_needed>
<fields>
@@ -103,13 +103,13 @@
<description>Enter the variable one here.</description>
<type>input</type>
</field>
- </fields>
+ </fields>
<custom_add_php_command>
</custom_add_php_command>
<custom_php_resync_config_command>
cron_sync_package();
</custom_php_resync_config_command>
- <custom_delete_php_command>
+ <custom_delete_php_command>
cron_sync_package();
</custom_delete_php_command>
<custom_php_install_command>
diff --git a/config/cron/cron_edit.php b/config/cron/cron_edit.php
index 12fde39d..2b72a04d 100644
--- a/config/cron/cron_edit.php
+++ b/config/cron/cron_edit.php
@@ -1,21 +1,21 @@
-<?php
+<?php
/* $Id$ */
/*
cron_edit.php
Copyright (C) 2008 Mark J Crane
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.
-
+
2. Redistributions in binary form must reproduce the above copyright
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
@@ -32,7 +32,7 @@ require_once("guiconfig.inc");
require_once("/usr/local/pkg/cron.inc");
-$a_cron = &$config['cron']['item'];
+$a_cron = &$config['cron']['item'];
$id = $_GET['id'];
if (isset($_POST['id'])) {
@@ -41,13 +41,13 @@ 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 ($a_cron[$_GET['id']]) {
+ unset($a_cron[$_GET['id']]);
+ write_config();
+ cron_sync_package();
+ header("Location: cron.php");
+ exit;
+ }
}
}
@@ -60,14 +60,14 @@ 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;
-
+
if (!$input_errors) {
$ent = array();
@@ -80,17 +80,16 @@ if ($_POST) {
$ent['command'] = $_POST['command'];
if (isset($id) && $a_cron[$id]) {
- //update
- $a_cron[$id] = $ent;
- }
- else {
- //add
+ //update
+ $a_cron[$id] = $ent;
+ } else {
+ //add
$a_cron[] = $ent;
}
-
+
write_config();
cron_sync_package();
-
+
header("Location: cron.php");
exit;
}
@@ -106,7 +105,7 @@ include("head.inc");
<script type="text/javascript">
//<![CDATA[
function show_advanced_config() {
- document.getElementById("showadvancedbox").innerHTML='';
+ document.getElementById("showadvancedbox").innerHTML = '';
aodiv = document.getElementById('showadvanced');
aodiv.style.display = "block";
//]]>
@@ -121,162 +120,160 @@ function show_advanced_config() {
<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>
+ <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>
</div>