data-stream_ru
Moderator
Posts: 471
Joined: Jan 2009
Reputation: 7
|
RE: Writing CronJobs Web int. It's time!
Ok, writing new web inferface for integration hcrond with ispSP
Table structor, rewriting code at main.c and compiling see above.
Let`s run!
1. For RH, Fedora, CentOS e.t.c.
Open /etc/ispcp/apache/00_master.conf
and add the end of line "php_admin_value open_basedir..."
":{APACHE_WWW_DIR}"
Open /etc/httpd/vhosts/00_master.conf
and add the end of line "php_admin_value open_basedir..."
":/var/www/virtual/"
May be it`s unsecured solution, but to do cheks of users scripts we need path to they sites in open_basedir.
2. cronjobs_overview.php
Code:
<?php
/*
* (с) 2009, Russia, Moscow
* Serge Obookhoff AKA Hong Lee
* www.data-stream.ru && www.veterinars.ru
* Last Revision at 01/2009
* Written for ispCP Team (www.isp-control.net) ONLY.
* Written using the old, dead blanks VHCS.
* All Functions rewritten.
*
* Notice: If you use this script you have own risks.
*
*/
require '../include/ispcp-lib.php';
check_login(__FILE__);
$tpl = new pTemplate();
$tpl->define_dynamic('page', Config::get('CLIENT_TEMPLATE_PATH') . '/cronjobs_overview.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('cronjobs', 'page');
$theme_color = Config::get('USER_INITIAL_THEME');
$tpl->assign(
array('TR_CLIENT_CRONJOBS_TITLE' => tr('ispCP - Client/Cronjob Manager'),
'THEME_COLOR_PATH' => "../themes/$theme_color",
'THEME_CHARSET' => tr('encoding'),
'ISP_LOGO' => get_logo($_SESSION['user_id'])
)
);
# Getting user's right to reading and using the Jobs
function gen_cron_user(&$tpl, &$sql, $domain) {
#
}
function gen_cron_jobs(&$tpl, &$sql, $user_id) {
$query = <<<SQL_QUERY
SELECT
id, name, lastrun, activ, coment, domain
FROM
hcrondtab
WHERE
domain = $user_id
ORDER BY
id
SQL_QUERY;
$rs = exec_query($sql, $query, array($user_id));
if ($rs->RecordCount() == 0) {
$tpl->assign(
array('NAME' => tr('Jobs list is empty!'),
'DESCRIPTION' => '',
'ACTIVE' => '',
'LASTRUN' => ''
)
);
} else {
$counter = 0;
while (!$rs->EOF) {
if ($counter % 2 == 0) {
$tpl->assign('ITEM_CLASS', 'content');
} else {
$tpl->assign('ITEM_CLASS', 'content2');
}
if ($rs->fields['activ'] == 1) {$activ = 'Yes';}
else {$activ = 'No';};
$lastrun = $rs->fields['lastrun'];
if ($lastrun == 0 ) {$lastrun = '';}
else {$lastrun = date("Y-m-d H:i:s",$lastrun);}
$tpl->assign(
array('NAME' => $rs->fields['name'],
'DESCRIPTION' => $rs->fields['coment'],
'LASTRUN' => $lastrun,
'ACTIVE' => $activ,
'ID' => $rs->fields['id']
)
);
$tpl->parse('CRONJOBS', '.cronjobs');
$rs->MoveNext();
$counter++;
}
}
} // End of gen_cron_job();
/*
*
* static page messages.
*
*/
gen_client_mainmenu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/main_menu_webtools.tpl');
gen_client_menu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/menu_webtools.tpl');
gen_logged_from($tpl);
check_permissions($tpl);
gen_cron_jobs($tpl, $sql, $_SESSION['user_id']);
$tpl->assign(
array('TR_CRON_MANAGER' => tr('Cronjob Manager'),
'TR_MESSAGE_DELETE' => tr('Are you sure you want to delete %s?', true, '%s'),
'TR_CRONJOBS' => tr('Cronjobs'),
'TR_ACTIVE' => tr('Active'),
'TR_ACTION' => tr('Active'),
'TR_EDIT' => tr('Edit'),
'TR_DELETE' => tr('Delete'),
'TR_ADD' => tr('Add Cronjob')
)
);
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (Config::get('DUMP_GUI_DEBUG'))
dump_gui_debug();
unset_messages();
?>
3. cronjobs_overview.tpl
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset={THEME_CHARSET}">
<title>{TR_CLIENT_CRONJOBS_TITLE}</title>
<meta name="robots" content="noindex">
<meta name="robots" content="nofollow">
<link href="{THEME_COLOR_PATH}/css/ispcp.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="{THEME_COLOR_PATH}/css/ispcp.js"></script>
<script type="text/javascript">
<!--
function action_delete(url, name) {
if (!confirm(sprintf("{TR_MESSAGE_DELETE}", name)))
return false;
location = url;
}
//-->
</script>
</head>
<body onload="MM_preloadImages('{THEME_COLOR_PATH}/images/icons/database_a.gif','{THEME_COLOR_PATH}/images/icons/domains_a.gif','{THEME_COLOR_PATH}/images/icons/ftp_a.gif','{THEME_COLOR_PATH}/images/icons/general_a.gif' ,'{THEME_COLOR_PATH}/images/icons/email_a.gif','{THEME_COLOR_PATH}/images/icons/webtools_a.gif','{THEME_COLOR_PATH}/images/icons/statistics_a.gif','{THEME_COLOR_PATH}/images/icons/support_a.gif')">
<!-- BDP: logged_from --><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" nowrap="nowrap" class="backButton"> <a href="change_user_interface.php?action=go_back"><img src="{THEME_COLOR_PATH}/images/icons/close_interface.png" width="16" height="16" border="0" align="absmiddle"></a> {YOU_ARE_LOGGED_AS}</td>
</tr>
</table>
<!-- EDP: logged_from -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%" style="border-collapse: collapse;padding:0;margin:0;">
<tr>
<td align="left" valign="top" style="vertical-align: top; width: 195px; height: 56px;"><img src="{THEME_COLOR_PATH}/images/top/top_left.jpg" border="0"></td>
<td style="height: 56px; width:100%; background-image: url({THEME_COLOR_PATH}/images/top/top_bg.jpg)"><img src="{THEME_COLOR_PATH}/images/top/top_left_bg.jpg" border="0"></td>
<td style="width: 73px; height: 56px;"><img src="{THEME_COLOR_PATH}/images/top/top_right.jpg" border="0"></td>
</tr>
<tr>
<td style="width: 195px; vertical-align: top;">{MENU}</td>
<td colspan="2" style="vertical-align: top;"><table style="width: 100%; border-collapse: collapse;padding:0;margin:0;">
<tr height="95">
<td style="padding-left:30px; width: 100%; background-image: url({THEME_COLOR_PATH}/images/top/middle_bg.jpg);">{MAIN_MENU}</td>
<td style="padding:0;margin:0;text-align: right; width: 73px;vertical-align: top;"><img src="{THEME_COLOR_PATH}/images/top/middle_right.jpg" border="0"></td>
</tr>
<tr>
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left"><table width="100%" cellpadding="5" cellspacing="5">
<tr>
<td width="25"><img src="{THEME_COLOR_PATH}/images/content/table_icon_tools.png" width="25" height="25"></td>
<td colspan="2" class="title">{TR_CRON_MANAGER}</td>
</tr>
</table></td>
<td width="27" align="right"> </td>
</tr>
<tr>
<td><table width="100%" cellpadding="5" cellspacing="5">
<!-- BDP: page_message -->
<tr>
<td width="25"> </td>
<td colspan="3" class="title"><span class="message">{MESSAGE}</span></td>
</tr>
<!-- EDP: page_message -->
<tr>
<td width="25"> </td>
<td class="content3"><strong>{TR_CRONJOBS}</strong></td>
<td align="center" class="content3"><strong>{TR_ACTIVE}</strong></td>
<td align="center" class="content3"><strong>Last Run</strong></td>
<td colspan="2" align="center" class="content3"><strong>{TR_ACTION}</strong></td>
</tr>
<!-- BDP: cronjobs -->
<tr>
<td nowrap="nowrap"> </td>
<td nowrap="nowrap" class="{ITEM_CLASS}"><strong>{NAME}</strong><br>
{DESCRIPTION}</td>
<td width="100" align="center" nowrap="nowrap" class="{ITEM_CLASS}">{ACTIVE}</td>
<td width="150" align="center" nowrap="nowrap" class="{ITEM_CLASS}">{LASTRUN}</td>
<td width="100" nowrap="nowrap" class="{ITEM_CLASS}"><img src="{THEME_COLOR_PATH}/images/icons/edit.png" width="16" height="16" align="absmiddle"> <a href="cronjobs_edit.php?cron_id={ID}" class="link">{TR_EDIT}</a></td>
<td width="100" nowrap="nowrap" class="{ITEM_CLASS}"><img src="{THEME_COLOR_PATH}/images/icons/delete.png" width="16" height="16" border="0" align="absmiddle"> <a href="#" class="link" onclick="action_delete('cronjobs_delete.php?cron_id={ID}', '{NAME}')">{TR_DELETE}</a></td>
</tr>
<!-- EDP: cronjobs -->
<tr>
<td nowrap="nowrap"> </td>
<td colspan="4"><input name="button" type="button" class="button" onclick="MM_goToURL('parent','cronjobs_add.php');return document.MM_returnValue" value="{TR_ADD}"></td>
</tr>
</table></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
4. cronjobs_delete.php
Code:
<?php
/*
* (с) 2009, Russia, Moscow
* Serge Obookhoff AKA Hong Lee
* www.data-stream.ru && www.veterinars.ru
* Last Revision at 01/2009
* Written for ispCP Team (www.isp-control.net) ONLY.
* Written using the old, dead blanks VHCS.
* All Functions rewritten.
*
* Notice: If you use this script you have own risks.
*
*/
require '../include/ispcp-lib.php';
check_login(__FILE__);
if (isset($_GET['cron_id']) && $_GET['cron_id'] !== '') {
$cron_id = $_GET['cron_id'];
$query = "
SELECT
`id`
`name`
FROM
`hcrondtab`
WHERE
`id` = ?
";
$rs = exec_query($sql, $query, array($cron_id));
if ($rs -> RecordCount() == 0) {
set_page_message(tr('Nothing to do!'));
user_goto('cronjobs_overview.php');
}
$query = "
DELETE from
`hcrondtab`
WHERE
`id` = ?
";
$rs = exec_query($sql, $query, array($cron_id));
# write_log($_SESSION['user_logged'].": delete cronjob ".$cron_name."!");
set_page_message(tr('Cronjob successfully deleted!'));
header('Location: cronjobs_overview.php');
exit(0);
} else {
header('Location: cronjobs_overview.php');
exit(0);
}
?>
5. cronjobs_add.php
Code:
<?php
/*
* (с) 2009, Russia, Moscow
* Serge Obookhoff AKA Hong Lee
* www.data-stream.ru && www.veterinars.ru
* Last Revision at 01/2009
* Written for ispCP Team (www.isp-control.net) ONLY.
* Written using the old, dead blanks VHCS.
* All Functions rewritten.
*
* Notice: If you use this script you have own risks.
*
*/
//bypass ispCP HTML input control
$min = implode ("," , $_POST['min']);
$hour = implode ("," , $_POST['hour']);
$day_of_month = implode ("," , $_POST['day_of_month']);
$month = implode ("," , $_POST['month']);
$day_of_week = implode ("," , $_POST['day_of_week']);
unset($_POST['month'], $_POST['day_of_week'], $_POST['min'], $_POST['hour'], $_POST['day_of_month']);
require '../include/ispcp-lib.php';
check_login(__FILE__);
$tpl = new pTemplate();
$tpl->define_dynamic('page', Config::get('CLIENT_TEMPLATE_PATH') . '/cronjobs_add.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$theme_color = Config::get('USER_INITIAL_THEME');
$tpl->assign(
array('TR_CLIENT_CRONJOBS_TITLE' => tr('ispCP - Client/Cronjob Manager'),
'THEME_COLOR_PATH' => "../themes/$theme_color",
'THEME_CHARSET' => tr('encoding'),
'ISP_LOGO' => get_logo($_SESSION['user_id'])
)
);
function add_cron_job(&$tpl, &$sql, $user_id, &$file_type, &$min, &$hour, &$day_of_month, &$month, &$day_of_week) {
if (!isset($_POST['Submit'])) {
return;
}
if ((empty($min) | empty($hour) | empty($day_of_month) | empty($month) | empty($day_of_week) | empty($_POST['name']) | empty($_POST['description']) | empty($_POST['command_line'])) && isset($_POST['Submit'])) {
set_page_message(tr('Please type All Fields and choise all Values!'));
return;
}
foreach($_POST as $key => $value)
{
$a = $key;
$$a = $value;
}
//do all checks of command_line
/* Start (c) Vladimir Sinitsyn*/
// Vladimir Sinitsyn aka SenatoR
// Russia, Yekaterinburg
// Русские, привет! =)
// $command_line mey be "perl /var/www/virtual/hackers.ru/htdocs/cgi-bin/decoder.pl?file=/etc/passwd-"
// We must use security check!
$stop_word = array('/etc/','password','passwd','groups'); //STOP Words!
//Let`s start our work!
$temp = explode(" ", $command_line); //We`ve divided line two parts - command (php) and values.
$command = $temp[0];
$stream = $temp[1];
unset($temp);
//We have only 3 commands, so, make it without "cool" things, use simle code..
if($command != "php" && $command != "perl" && $command != "python") {
set_page_message(tr('Comand not Allowed!'));
return;
}
//Если список большой - сделаем проверку иначе!
foreach($stop_word as $k=>$v)
{
if(strpos($stream,$v) == true) {
set_page_message(tr('Are you a cunning Hacker ?! But I am not only stupid machine!!! I will write delation to Admin!'));
write_log("WARNING: Perhaps hacking! ". $_SESSION['user_logged'] . ": add Cron Job: " . $name . " with comnd: " . $command_line);
return;
} //Hackers ALLERT... `stop word'
}
$flag = 0; //Use one thing!
foreach($file_type as $k=>$v) //Start
{
if(strpos($stream,$v) == true) //Works fast!!! (its important)
{
$flag++; //Yeah! Its good!
$file = preg_replace("/(\\".$v.").*/i","\\1",$stream); //CUT ALL!!! Only filename in $file!
break; //Stop
}
}
if($flag == 0) {
set_page_message(tr('File type wrong!'));
return;
}//File type wrong!
//Check files and permission
if(!file_exists($file)) {
set_page_message(tr('File not found!'));
return;
} //No file!
if(!is_readable($file)) {
set_page_message(tr('File not readable!'));
return;
}; //Wrong permissions!
if(strpos("cgi",$file) || strpos("pl",$file)) // only for cgi and pl and so..
{
if(!is_executable($file)) {
set_page_message(tr('Wrong permissions!'));
return;
}; //Wrong permissions!
}
/* End (c) */
//get user gid & uid
$query = "
SELECT
`domain_uid`, `domain_gid`
FROM
`domain`
WHERE
`domain_admin_id` = ?
";
$rs = exec_query($sql, $query, array($user_id));
$uid = 'vu' . $rs->fields['domain_uid'];
$gid = 'vu' . $rs->fields['domain_gid'];
// add cron_job in the ispcp DB;
$query = "
INSERT INTO `hcrondtab`
(`min`, `hour`, `day`, `mon`, `dow`, `uid`, `gid`, `cmd`, `name`, `runonce`, `activ`, `coment`, `domain`)
VALUES
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
";
$rs = exec_query($sql, $query, array($min, $hour, $day_of_month, $month, $day_of_week, $uid, $gid, $command_line, $name, $runonce, $activ, $description, $user_id));
$query = "
SELECT
`id`
`name`
FROM
`hcrondtab`
WHERE
`name` = ?
";
$rs = exec_query($sql, $query, array($name));
$cron_name = $rs->fields['name'];
# send_request();
write_log($_SESSION['user_logged'] . ": add Cron Job: " . $name);
set_page_message(tr('Cron Job successfully added!'));
user_goto('cronjobs_overview.php');
} // End of add_cron_job();
function get_cron_domain(&$tpl, &$sql, $user_id) {
$query = "
SELECT
`admin_name`
FROM
`admin`
WHERE
admin_id = ?
";
$rs = exec_query($sql, $query, array($user_id));
return $rs->fields['admin_name'];
}
/*
*
* static page messages.
*
*/
gen_client_mainmenu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/main_menu_webtools.tpl');
gen_client_menu($tpl, Config::get('CLIENT_TEMPLATE_PATH') . '/menu_webtools.tpl');
gen_logged_from($tpl);
check_permissions($tpl);
$file_type = array('.php','.php4','.php5','.cgi','.pl','.py'); //List of GOOD files ;-)
$new_value = implode (" ", $file_type);
add_cron_job($tpl, $sql, $_SESSION['user_id'], $file_type, $min, $hour, $day_of_month, $month, $day_of_week);
if (isset($_POST['command_line'])) {$example = $_POST['command_line'];}
else {
$example = 'php ' . Config::get('APACHE_WWW_DIR') . '/' . get_cron_domain($tpl, $sql, $_SESSION['user_id']) . '/htdocs/test.php' ;
}
if (isset($_POST['activ']) && $_POST['activ'] == 0) {$active_no = 'selected'; $active_yes = '';}
else {$active_yes = 'selected'; $active_no = '';}
if (isset($_POST['runonce']) && $_POST['runonce'] == 1) {$runonce_yes = 'selected'; $runonce_no = '';}
else {$runonce_no = 'selected'; $runonce_yes = '';}
if (isset($_POST['name'])) {$name = $_POST['name'];}
else {$name='';}
if (isset($_POST['description'])) {$description = $_POST['description'];}
else {$description='';}
$tpl->assign(
array('TR_CRON_MANAGER' => tr('Cronjob Manager'),
'TR_ADD_CRONJOB' => tr('Add Cronjob'),
'TR_NAME' => tr('Name'),
'TR_DESCRIPTION' => tr('Description'),
'TR_ACTIVE' => tr('Active'),
'YES' => tr('Yes'),
'NO' => tr('No'),
'TR_CRONJOB' => tr('Cronjob'),
'TR_COMMAND' => tr('Command to run:'),
'TR_MIN' => tr('Minute(s):'),
'TR_HOUR' => tr('Hour(s):'),
'TR_DAY' => tr('Day(s):'),
'TR_MONTHS' => tr('Month(s):'),
'TR_WEEKDAYS' => tr('Weekday(s):'),
'TR_ADD' => tr('Add'),
'TR_RESET' => tr('Reset'),
'TR_CANCEL' => tr('Cancel'),
'EXAMPLE' => $example,
'ALLOWED' => 'php, perl, python',
'FILETYPE' => $new_value,
'ACTIVE_YES' => $active_yes,
'ACTIVE_NO' => $active_no,
'RUNONCE_YES' => $runonce_yes,
'RUNONCE_NO' => $runonce_no,
'NAME' => $name,
'DESCRIPTION' => $description,
)
);
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (Config::get('DUMP_GUI_DEBUG'))
dump_gui_debug();
unset_messages();
?>
6. cronjobs_add.tpl
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset={THEME_CHARSET}">
<title>{TR_CLIENT_CRONJOBS_TITLE}</title>
<meta name="robots" content="noindex">
<meta name="robots" content="nofollow">
<link href="{THEME_COLOR_PATH}/css/ispcp.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="{THEME_COLOR_PATH}/css/ispcp.js"></script>
</head>
<body onload="MM_preloadImages('{THEME_COLOR_PATH}/images/icons/database_a.gif','{THEME_COLOR_PATH}/images/icons/domains_a.gif','{THEME_COLOR_PATH}/images/icons/ftp_a.gif','{THEME_COLOR_PATH}/images/icons/general_a.gif' ,'{THEME_COLOR_PATH}/images/icons/email_a.gif','{THEME_COLOR_PATH}/images/icons/webtools_a.gif','{THEME_COLOR_PATH}/images/icons/statistics_a.gif','{THEME_COLOR_PATH}/images/icons/support_a.gif')">
<!-- BDP: logged_from --><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" nowrap="nowrap" class="backButton"> <a href="change_user_interface.php?action=go_back"><img src="{THEME_COLOR_PATH}/images/icons/close_interface.png" width="16" height="16" border="0" align="absmiddle"></a> {YOU_ARE_LOGGED_AS}</td>
</tr>
</table>
<!-- EDP: logged_from -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%" style="border-collapse: collapse;padding:0;margin:0;">
<tr>
<td align="left" valign="top" style="vertical-align: top; width: 195px; height: 56px;"><img src="{THEME_COLOR_PATH}/images/top/top_left.jpg" border="0"></td>
<td style="height: 56px; width:100%; background-image: url({THEME_COLOR_PATH}/images/top/top_bg.jpg)"><img src="{THEME_COLOR_PATH}/images/top/top_left_bg.jpg" border="0"></td>
<td style="width: 73px; height: 56px;"><img src="{THEME_COLOR_PATH}/images/top/top_right.jpg" border="0"></td>
</tr>
<tr>
<td style="width: 195px; vertical-align: top;">{MENU}</td>
<td colspan="2" style="vertical-align: top;"><table style="width: 100%; border-collapse: collapse;padding:0;margin:0;">
<tr height="95">
<td style="padding-left:30px; width: 100%; background-image: url({THEME_COLOR_PATH}/images/top/middle_bg.jpg);">{MAIN_MENU}</td>
<td style="padding:0;margin:0;text-align: right; width: 73px;vertical-align: top;"><img src="{THEME_COLOR_PATH}/images/top/middle_right.jpg" border="0"></td>
</tr>
<tr>
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left"><table width="100%" cellpadding="5" cellspacing="5">
<tr>
<td width="25"><img src="{THEME_COLOR_PATH}/images/content/table_icon_tools.png" width="25" height="25"></td>
<td colspan="2" class="title">{TR_CRON_MANAGER}</td>
</tr>
</table></td>
<td width="27" align="right"> </td>
</tr>
<tr>
<td><form name="add_cronjob" method="post" action="cronjobs_add.php">
<table width="100%" cellpadding="5" cellspacing="5">
<tr>
<td width="25"> </td>
<td colspan="5" class="content3"><b>{TR_ADD_CRONJOB}</b></td>
</tr>
<!-- BDP: page_message -->
<tr>
<td width="25"> </td>
<td colspan="5" class="title"><span class="message">{MESSAGE}</span></td>
</tr>
<!-- EDP: page_message -->
<tr>
<td nowrap="nowrap"> </td>
<td nowrap="nowrap" class="content2">{TR_NAME}</td>
<td colspan="4" class="content"><input name="name" type="text" class="textinput" id="name" value="{NAME}" style="width:170px"></td>
</tr>
<tr>
<td nowrap="nowrap"> </td>
<td nowrap="nowrap" class="content2">{TR_DESCRIPTION}</td>
<td colspan="4" class="content"><input name="description" type="text" class="textinput" value="{DESCRIPTION}" id="description" style="width:170px"></td>
</tr>
<tr>
<td nowrap="nowrap"> </td>
<td nowrap="nowrap" class="content2">{TR_ACTIVE}</td>
<td colspan="4" class="content"><select name="activ">
<option value="1" {ACTIVE_YES}>{YES}</option>
<option value="0" {ACTIVE_NO}>{NO}</option>
</select></td>
</tr>
<tr>
<td nowrap="nowrap"> </td>
<td nowrap="nowrap" class="content2">Run only once and when delete Job</td>
<td colspan="4" class="content"><select name="runonce">
<option value="1" {RUNONCE_YES}>{YES}</option>
<option value="-1" {RUNONCE_NO}>{NO}</option>
</select></td>
</tr>
<tr>
<td> </td>
<td colspan="5" class="content3"><b>{TR_CRONJOB}</b></td>
</tr>
<tr>
<td width="25"> </td>
<td colspan="3" class="content2">{TR_COMMAND}</td>
<td colspan="2" class="content2">Comand Line Syntax:</td>
</tr>
<tr>
<td width="25"> </td>
<td colspan="3" class="content"><input name="command_line" type="text" class="textinput" id="command_line" value="{EXAMPLE}" style="width:470px"></td>
<td colspan="2" class="content2">Enter properly COMMAND, space, full SERVER PATH to executed script!</td>
</tr>
<tr>
<td width="25"> </td>
<td colspan="5" class="content2">Allowed commands in only <b>{ALLOWED}</b> . And allowed file extension is <b>{FILETYPE}</b></td>
</tr>
<tr>
<td nowrap="nowrap"> </td>
<td align="center" nowrap="nowrap" class="content2">{TR_MIN}</td>
<td align="center" class="content2">{TR_HOUR}</td>
<td align="center" class="content2">{TR_DAY}</td>
<td align="center" class="content2">{TR_MONTHS}</td>
<td align="center" class="content2">{TR_WEEKDAYS}</td>
</tr>
<tr align="center" valign="top">
<td width="25" nowrap="nowrap"> </td>
<td width="200" nowrap="nowrap" class="content"><select name="min[]" size="6" multiple="multiple" id="min">
<option value="*">Every Minute</option>
<option value="*/2">Every Other Minute</option>
<option value="*/5">Every Five Minutes</option>
<option value="*/10">Every Ten Minutes</option>
<option value="*/15">Every Fifteen Minutes</option>
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select></td>
<td class="content"><select name="hour[]" size="6" multiple="multiple" id="hour">
<option value="*">Every Hour</option>
<option value="*/2">Every Other Hour</option>
<option value="*/4">Every Four Hours</option>
<option value="*/6">Every Six Hours</option>
<option value="0">0 = 12 AM/Midnight</option>
<option value="1">1 = 1 AM</option>
<option value="2">2 = 2 AM</option>
<option value="3">3 = 3 AM</option>
<option value="4">4 = 4 AM</option>
<option value="5">5 = 5 AM</option>
<option value="6">6 = 6 AM</option>
<option value="7">7 = 7 AM</option>
<option value="8">8 = 8 AM</option>
<option value="9">9 = 9 AM</option>
<option value="10">10 = 10 AM</option>
<option value="11">11 = 11 AM</option>
<option value="12">12 = 12 PM/Noon</option>
<option value="13">13 = 1 PM</option>
<option value="14">14 = 2 PM</option>
<option value="15">15 = 3 PM</option>
<option value="16">16 = 4 PM</option>
<option value="17">17 = 5 PM</option>
<option value="18">18 = 6 PM</option>
<option value="19">19 = 7 PM</option>
<option value="20">20 = 8 PM</option>
<option value="21">21 = 9 PM</option>
<option value="22">22 = 10 PM</option>
<option value="23">23 = 11 PM</option>
</select></td>
<td class="content"><select name="day_of_month[]" size="6" multiple="multiple" id="day_of_month">
<option value="*">Every Day</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select></td>
<td class="content"><select name="month[]" size="6" multiple="multiple" id="month">
<option value="*">Every Month</option>
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select></td>
<td class="content"><select name="day_of_week[]" size="6" multiple="multiple" id="day_of_week">
<option value="*">Every Weekday</option>
<option value="0">Sunday</option>
<option value="1">Monday</option>
<option value="2">Tuesday</option>
<option value="3">Wednesday</option>
<option value="4">Thursday</option>
<option value="5">Friday</option>
<option value="6">Saturday</option>
</select></td>
</tr>
<tr>
<td width="25"> </td>
<td colspan="5"><input name="Submit" type="submit" class="button" value=" {TR_ADD} ">
<input name="Reset" type="reset" class="button" value="{TR_RESET}">
<input name="button" type="button" class="button" onclick="MM_goToURL('parent','cronjobs_overview.php');return document.MM_returnValue" value="{TR_CANCEL}"></td>
</tr>
</table>
<input type="hidden" name="uaction" value="add_cronjob">
</form>
<p> <b> Функция в процессе разработки и тестирования!</b></p>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
7. cronjobs_edit.php ...
Ooops! Russian Vodca is over
My work temporary stoped...
|
|