本文整理汇总了PHP中cron::ParseCronCommand方法的典型用法代码示例。如果您正苦于以下问题:PHP cron::ParseCronCommand方法的具体用法?PHP cron::ParseCronCommand怎么用?PHP cron::ParseCronCommand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cron
的用法示例。
在下文中一共展示了cron::ParseCronCommand方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: schedule
function schedule()
{
$tpl = new templates();
$sock = new sockets();
$page = CurrentPageName();
$sock->getFrameWork("cmd.php?apt-mirror-schedule=yes");
$config = unserialize(base64_decode($sock->GET_INFO("AptMirrorConfigSchedule")));
$table = "\n<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n<thead class='thead'>\n\t<tr>\n\t<th> </th>\n\t<th>{schedules}</th>\n\t<th> </th>\n\t</tr>\n</thead>\n<tbody class='tbody'>";
$cron = new cron();
if (is_array($config)) {
while (list($uid, $schedule) = each($config)) {
$schedule_enc = base64_encode($schedule);
if ($classtr == "oddRow") {
$classtr = null;
} else {
$classtr = "oddRow";
}
$array_text = $cron->ParseCronCommand("{$schedule} toto /dev/null", null, 1, true);
$delete = imgtootltip("delete-32.png", "{delete}", "MirDelCron('{$schedule_enc}')");
$table = $table . "\n\t\t\t<tr class={$classtr}>\n\t\t\t<td width=1%><img src='img/fw_bold.gif'></td>\n\t\t\t<td width=99%><strong style='font-size:14px'>{$array_text}</strong><br><div style='font-size:10px;text-align:right'><i>{$schedule}</i></div></td>\n\t\t\t<td width=1%>{$delete}</td>\n\t\t\t</tr>\n\t\t\t";
}
}
$table = $table . "</tbody></table>";
$html = "<div id='schedule-div'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend nowrap width=1%>{schedule}:</td>\n\t\t<td width=99%>" . Field_text("mirror-schedule", null, "font-size:15px;padding:3px;width:100%") . "</td>\n\t\t<td width=1%>" . button("{select}", "Loadjs('cron.php?field=mirror-schedule')") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{add}", "SaveScheduleMirror()") . "</td>\n\t</tr>\n\t</table>\n\t<br>\n\t{$table}\n\t</div>\n\t\n\t\n\t\n\t<script>\n\tvar x_SaveScheduleMirror= function (obj) {\n\t\t\tRefreshTab('mirror_tabs');\n\t\t}\n\t\n\t\n\tfunction SaveScheduleMirror(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('mirror-schedule',document.getElementById('mirror-schedule').value);\n\t\tdocument.getElementById('schedule-div').innerHTML='<center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SaveScheduleMirror);\n\t}\n\t\n\tfunction MirDelCron(pattern){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('mirror-del-schedule',pattern);\n\t\tdocument.getElementById('schedule-div').innerHTML='<center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SaveScheduleMirror)\t\n\t}\n\n\t</script>";
echo $tpl->_ENGINE_parse_body($html);
}