refactoring cron section: new html formating

This commit is contained in:
Serghey Rodin 2012-09-20 12:59:57 +03:00
parent c080bcad00
commit a1c8045d58
10 changed files with 614 additions and 471 deletions

View file

@ -68,7 +68,6 @@ top_panel($user,$TAB);
$db_types = json_decode(implode('', $output), true); $db_types = json_decode(implode('', $output), true);
unset($output); unset($output);
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_add_cron.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_cron.html'); include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_cron.html');
unset($_SESSION['error_msg']); unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']); unset($_SESSION['ok_msg']);

View file

@ -13,26 +13,18 @@ top_panel($user,$TAB);
// Data // Data
if ($_SESSION['user'] == 'admin') { if ($_SESSION['user'] == 'admin') {
exec (VESTA_CMD."v_list_cron_jobs $user json", $output, $return_var); exec (VESTA_CMD."v_list_cron_jobs $user json", $output, $return_var);
check_error($return_var);
$data = json_decode(implode('', $output), true); $data = json_decode(implode('', $output), true);
$data = array_reverse($data); $data = array_reverse($data);
unset($output); unset($output);
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_cron.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_cron.html'); include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_cron.html');
} else { } else {
exec (VESTA_CMD."v_list_cron_jobs $user json", $output, $return_var); exec (VESTA_CMD."v_list_cron_jobs $user json", $output, $return_var);
check_error($return_var);
$data = json_decode(implode('', $output), true); $data = json_decode(implode('', $output), true);
$data = array_reverse($data); $data = array_reverse($data);
unset($output); unset($output);
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/menu_cron.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_cron.html'); include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_cron.html');
} }
// Footer // Footer

View file

@ -1,26 +1,24 @@
<script type="text/javascript">
function elementHideShow(elementToHideOrShow) { <table class="sub-menu" style="background: white;">
var el = document.getElementById(elementToHideOrShow); <tr>
if (el.style.display == "block") { <td style="padding: 12px 2px 16px 0;" ><a class="add-name"><b>Adding Cron Job</b></a>
el.style.display = "none"; <?php
if (!empty($_SESSION['error_msg'])) {
echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
} else { } else {
el.style.display = "block"; if (!empty($_SESSION['ok_msg'])) {
echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
} }
} }
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
function randomString() { <form id="vstobjects" name="v_add_cron" method="post">
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var string_length = 10;
var randomstring = '';
for (var i=0; i<string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum,rnum+1);
}
document.v_add_user.v_password.value = randomstring;
}
</script>
<table class='data'> <table class='data'>
<tr class="data-add"> <tr class="data-add">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150"> <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
@ -29,29 +27,80 @@
</table> </table>
</td> </td>
<td class="data-dotted" width="830px" style="vertical-align:top;"> <td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px"><tr> <table width="830px">
<tr>
<td></td> <td></td>
</tr></table> </tr>
</table>
<table class="data-col2" width="600px"> <table class="data-col2" width="600px">
<form method="post" name="v_add_user"> <tr>
<tr><td class="add-text" style="padding: 10 0 0 2px;">Minute</td></tr> <td class="add-text" style="padding: 10 0 0 2px;">
<tr><td><input type="text" size="20" class="add-input" name="v_min" <?php if (!empty($v_min)) echo "value=".$v_min; ?>></td></tr> Minute
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Hour</td></tr> </td>
<tr><td></span><input type="text" size="20" class="add-input" name="v_hour" <?php if (!empty($v_hour)) echo "value=".$v_hour; ?>></tr> </tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Day</td></tr> <tr>
<tr><td></span><input type="text" size="20" class="add-input" name="v_day" <?php if (!empty($v_day)) echo "value=".$v_day; ?>></tr> <td>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Month</td></tr> <input type="text" size="20" class="add-input" name="v_min" <?php if (!empty($v_min)) echo "value=".$v_min; ?>>
<tr><td></span><input type="text" size="20" class="add-input" name="v_month" <?php if (!empty($v_month)) echo "value=".$v_month; ?>></tr> </td>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Day of Week</td></tr> </tr>
<tr><td></span><input type="text" size="20" class="add-input" name="v_wday" <?php if (!empty($v_wday)) echo "value=".$v_wday; ?>></tr> <tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Command</td></tr> <td class="add-text" style="padding: 10px 0 0 2px;">
<tr><td></span><input type="text" size="20" class="add-input" name="v_cmd" <?php if (!empty($v_cmd)) echo "value='".$v_cmd."'"; ?>></tr> Hour
</td>
<tr><td style="padding: 24px 0 0 0;"> </tr>
<input type="submit" name="ok" value="OK" class="add-button"></form> <tr>
<input type="button" class="add-button" value="Cancel" onClick="location.href='/list/cron/'"> <td>
</td></tr> <input type="text" size="20" class="add-input" name="v_hour" <?php if (!empty($v_hour)) echo "value=".$v_hour; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Day
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_day" <?php if (!empty($v_day)) echo "value=".$v_day; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Month
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_month" <?php if (!empty($v_month)) echo "value=".$v_month; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Day of Week
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_wday" <?php if (!empty($v_wday)) echo "value=".$v_wday; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Command
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_cmd" <?php if (!empty($v_cmd)) echo "value='".$v_cmd."'"; ?>>
</td>
</tr>
<tr>
<td style="padding: 24px 0 0 0;">
<input type="submit" name="ok" value="OK" class="button">
<input type="button" class="button" value="Cancel" onclick="location.href='/list/cron/'">
</td>
</tr>
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>
</form>

View file

@ -1,26 +1,24 @@
<script type="text/javascript">
function elementHideShow(elementToHideOrShow) { <table class="sub-menu" style="background: white;">
var el = document.getElementById(elementToHideOrShow); <tr>
if (el.style.display == "block") { <td style="padding: 12px 2px 16px 0;" ><a class="add-name"><b>Editing Cron Job</b></a>
el.style.display = "none"; <?php
if (!empty($_SESSION['error_msg'])) {
echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
} else { } else {
el.style.display = "block"; if (!empty($_SESSION['ok_msg'])) {
echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
} }
} }
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
function randomString() { <form id="vstobjects" name="v_edit_cron" method="post">
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var string_length = 10;
var randomstring = '';
for (var i=0; i<string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum,rnum+1);
}
document.v_add_user.v_password.value = randomstring;
}
</script>
<table class='data'> <table class='data'>
<tr class="data-add"> <tr class="data-add">
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150"> <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
@ -31,29 +29,81 @@
</table> </table>
</td> </td>
<td class="data-dotted" width="830px" style="vertical-align:top;"> <td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px"><tr> <table width="830px">
<tr>
<td></td> <td></td>
</tr></table> </tr>
<table class="data-col2" width="600px"> </table>
<form method="post" name="v_add_user">
<tr><td class="add-text" style="padding: 10 0 0 2px;">Minute</td></tr>
<tr><td><input type="text" size="20" class="add-input" name="v_min" <?php if (!empty($v_min)) echo "value=".$v_min; ?>></td></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Hour</td></tr>
<tr><td></span><input type="text" size="20" class="add-input" name="v_hour" <?php if (!empty($v_hour)) echo "value=".$v_hour; ?>></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Day</td></tr>
<tr><td></span><input type="text" size="20" class="add-input" name="v_day" <?php if (!empty($v_day)) echo "value=".$v_day; ?>></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Month</td></tr>
<tr><td></span><input type="text" size="20" class="add-input" name="v_month" <?php if (!empty($v_month)) echo "value=".$v_month; ?>></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Day of Week</td></tr>
<tr><td></span><input type="text" size="20" class="add-input" name="v_wday" <?php if (!empty($v_wday)) echo "value=".$v_wday; ?>></tr>
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Command</td></tr>
<tr><td></span><input type="text" size="20" class="add-input" name="v_cmd" <?php if (!empty($v_cmd)) echo "value='".$v_cmd."'"; ?>></tr>
<tr><td style="padding: 24px 0 0 0;"> <table class="data-col2" width="600px">
<input type="submit" name="save" value="Save" class="add-button"></form> <tr>
<input type="button" class="add-button" value="Cancel" onClick="location.href='/list/cron/'"> <td class="add-text" style="padding: 10 0 0 2px;">
</td></tr> Minute
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_min" <?php if (!empty($v_min)) echo "value=".$v_min; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Hour
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_hour" <?php if (!empty($v_hour)) echo "value=".$v_hour; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Day
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_day" <?php if (!empty($v_day)) echo "value=".$v_day; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Month
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_month" <?php if (!empty($v_month)) echo "value=".$v_month; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Day of Week
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_wday" <?php if (!empty($v_wday)) echo "value=".$v_wday; ?>>
</td>
</tr>
<tr>
<td class="add-text" style="padding: 10px 0 0 2px;">
Command
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="add-input" name="v_cmd" <?php if (!empty($v_cmd)) echo "value='".$v_cmd."'"; ?>>
</td>
</tr>
<tr>
<td style="padding: 24px 0 0 0;">
<input type="submit" name="save" value="Save" class="button">
<input type="button" class="button" value="Cancel" onclick="location.href='/list/cron/'">
</td>
</tr>
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>
</form>

View file

@ -1,3 +1,33 @@
<table class="sub-menu" style="background: white;">
<tr>
<td style="padding: 12px 0 8px 6px">
<div style="float:left">
<button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/cron/'"> Add Cron Job </button>
</div>
<div style="text-align: right; float: right;">
<input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
<button> Search </button>
</div>
<div style="float:left; padding-left: 26px;">
<a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
<select style="margin:0 2px 0 0px;" >
<option>apply to selected</option>
<option>rebuild</option>
<option>update counters</option>
<option>suspend</option>
<option>unsuspend</option>
<option>delete</option>
</select>
<button style="width:27px;"> </button>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<form id="vstobjects">
<table class='data'> <table class='data'>
<?php <?php
@ -10,10 +40,6 @@ foreach ($data as $key => $value) {
$status = 'active'; $status = 'active';
$spnd_action = 'suspend'; $spnd_action = 'suspend';
} }
if (empty($data[$key]['CATCHALL'])) {
$data[$key]['CATCHALL'] = 'null';
}
?> ?>
<tr class="data-row"> <tr class="data-row">
@ -36,7 +62,6 @@ foreach ($data as $key => $value) {
$('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog('open'); $('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog('open');
return false; return false;
}); });
$('#delete_dialog_<?php echo "$i" ?>').dialog({ $('#delete_dialog_<?php echo "$i" ?>').dialog({
modal: true, modal: true,
autoOpen: false, autoOpen: false,
@ -61,12 +86,11 @@ foreach ($data as $key => $value) {
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr> <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
<tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr> <tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
<tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr> <tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
</table> </table>
</td> </td>
<td class="data-dotted" width="830px" style="vertical-align:top;"> <td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px">
<table width="830px"><tr> <tr>
<td></td> <td></td>
<td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/cron/?job=<?php echo $data[$key]['JOB'] ?>"> edit</a></td> <td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/cron/?job=<?php echo $data[$key]['JOB'] ?>"> edit</a></td>
<td class="data-controls" width="80px"> <td class="data-controls" width="80px">
@ -83,42 +107,84 @@ foreach ($data as $key => $value) {
<p class="counter-value">Are you sure you want to delete cron job?</p> <p class="counter-value">Are you sure you want to delete cron job?</p>
</div> </div>
</td> </td>
</tr></table> </tr>
</table>
<table class="data-col2" width="800px"> <table class="data-col2" width="800px">
<tr><td colspan=5 class="cron" style="padding: 0 0 0 4px;"><b><?php echo $data[$key]['CMD'] ?></b></td></tr> <tr>
<td colspan=5 class="cron" style="padding: 0 0 0 4px;">
<b><?php echo $data[$key]['CMD'] ?></b>
</td>
</tr>
<tr> <tr>
<td style="vertical-align:top;" width="80px"> <td style="vertical-align:top;" width="80px">
<table> <table>
<tr><td class="cron-counter-name">Min</td></tr> <tr>
<tr><td class="cron-counter-value"><?php echo $data[$key]['MIN'] ?></tr> <td class="cron-counter-name">
Min
</td>
</tr>
<tr>
<td class="cron-counter-value">
<?php echo $data[$key]['MIN'] ?>
</td>
</tr>
</table> </table>
</td> </td>
<td style="vertical-align:top;" width="80px"> <td style="vertical-align:top;" width="80px">
<table> <table>
<tr><td class="cron-counter-name">Hour</td></tr> <tr>
<tr><td class="cron-counter-value"><?php echo $data[$key]['HOUR'] ?></tr> <td class="cron-counter-name">
Hour
</td>
</tr>
<tr>
<td class="cron-counter-value">
<?php echo $data[$key]['HOUR'] ?>
</td>
</tr>
</table> </table>
</td> </td>
<td style="vertical-align:top;" width="80px"> <td style="vertical-align:top;" width="80px">
<table> <table>
<tr><td class="cron-counter-name">Day</td></tr> <tr>
<tr><td class="cron-counter-value"><?php echo $data[$key]['DAY'] ?></tr> <td class="cron-counter-name">
Day
</td>
</tr>
<tr>
<td class="cron-counter-value">
<?php echo $data[$key]['DAY'] ?>
</td>
</tr>
</table> </table>
</td> </td>
<td style="vertical-align:top;" width="80px"> <td style="vertical-align:top;" width="80px">
<table> <table>
<tr><td class="cron-counter-name">Month</td></tr> <tr>
<tr><td class="cron-counter-value"><?php echo $data[$key]['MONTH'] ?></tr> <td class="cron-counter-name">
Month
</td>
</tr>
<tr>
<td class="cron-counter-value">
<?php echo $data[$key]['MONTH'] ?>
</td>
</tr>
</table> </table>
</td> </td>
<td style="vertical-align:top;"> <td style="vertical-align:top;">
<table> <table>
<tr><td class="cron-counter-name">Day of Week</td></tr> <tr>
<tr><td class="cron-counter-value"><?php echo $data[$key]['WDAY'] ?></tr> <td class="cron-counter-name">
Day of Week
</td>
</tr>
<tr>
<td class="cron-counter-value">
<?php echo $data[$key]['WDAY'] ?>
</td>
</tr>
</table> </table>
</td> </td>
</tr> </tr>
@ -126,15 +192,17 @@ foreach ($data as $key => $value) {
</td> </td>
</tr> </tr>
<?php <?php
} }
?> ?>
</table> </table>
<?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?> <?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
<table class="data-count"> <table class="data-count">
<tr> <tr>
<td> <td width="160px"></td>
<td>
<?php <?php
if ( $i == 1) { if ( $i == 1) {
echo "1 cron job "; echo "1 cron job ";
@ -146,6 +214,7 @@ foreach ($data as $key => $value) {
</tr> </tr>
</table> </table>
</form> </form>
<?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?> <?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:172px\"><tr><td></td></tr></table>"; ?> <?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:172px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:55px\"><tr><td></td></tr></table>"; ?> <?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:55px\"><tr><td></td></tr></table>"; ?>

View file

@ -1,15 +0,0 @@
<table class="sub-menu">
<tr>
<td style="padding: 14px 0 24px 0;" ><a class="add-name"><b>Adding Cron Job</b></a>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
}
}
?>
</td>
</tr>
</table>

View file

@ -1,41 +0,0 @@
<?php
if (!empty($_SESSION['error_msg'])) {
?>
<script type="text/javascript">
$(function() {
$( "#dialog:ui-dialog" ).dialog( "destroy" );
$( "#dialog-message" ).dialog({
modal: true,
buttons: {
Ok: function() {
$( this ).dialog( "close" );
}
}
});
});
</script>
<div id="dialog-message" title="Error">
<p><?php echo $_SESSION['error_msg'] ?>.</p>
</div>
<?php
unset($_SESSION['error_msg']);
}
?>
<table class="sub-menu">
<tr>
<td width="142px" style="padding: 16px 0 16px 6px">
<button style="width:120px; padding: 2px 0px 2px 0px;" onclick="location.href='/add/cron/'">Add Job</button>
<td><a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
<select style="margin:0 0 0 0px">
<option>apply to selected</option>
<option>rebuild</option>
<option>suspend</option>
<option>unsuspend</option>
<option>delete</option>
</select> <button> > </button></td>
</td>
<td style="text-align: right;"><input type="text" size="30" style="padding: 3px 80px 3px 0;"> <button> Search </button></td>
</tr><tr>
</tr>
</table>
<form id="vstobjects">

View file

@ -1,15 +0,0 @@
<table class="sub-menu">
<tr>
<td style="padding: 14px 0 24px 0;" ><a class="add-name"><b>Editing Cron Job</b></a>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<a class=\"add-error\"> → ".$_SESSION['error_msg']."</a>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<a class=\"add-ok\"> → ".$_SESSION['ok_msg']."</a>";
}
}
?>
</td>
</tr>
</table>

View file

@ -1,3 +1,33 @@
<table class="sub-menu" style="background: white;">
<tr>
<td style="padding: 12px 0 8px 6px">
<div style="float:left">
<button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/cron/'"> Add Cron Job </button>
</div>
<div style="text-align: right; float: right;">
<input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
<button> Search </button>
</div>
<div style="float:left; padding-left: 26px;">
<a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
<select style="margin:0 2px 0 0px;" >
<option>apply to selected</option>
<option>rebuild</option>
<option>update counters</option>
<option>suspend</option>
<option>unsuspend</option>
<option>delete</option>
</select>
<button style="width:27px;"> </button>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<form id="vstobjects">
<table class='data'> <table class='data'>
<?php <?php
@ -10,10 +40,6 @@ foreach ($data as $key => $value) {
$status = 'active'; $status = 'active';
$spnd_action = 'suspend'; $spnd_action = 'suspend';
} }
if (empty($data[$key]['CATCHALL'])) {
$data[$key]['CATCHALL'] = 'null';
}
?> ?>
<tr class="data-row"> <tr class="data-row">
@ -43,12 +69,11 @@ foreach ($data as $key => $value) {
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr> <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="object" ></td></tr>
<tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr> <tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo date("d M Y", strtotime($data[$key]['DATE'])) ?></td></tr>
<tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr> <tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
</table> </table>
</td> </td>
<td class="data-dotted" width="830px" style="vertical-align:top;"> <td class="data-dotted" width="830px" style="vertical-align:top;">
<table width="830px">
<table width="830px"><tr> <tr>
<td></td> <td></td>
<td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/cron/?job=<?php echo $data[$key]['JOB'] ?>"> edit</a></td> <td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/cron/?job=<?php echo $data[$key]['JOB'] ?>"> edit</a></td>
<td class="data-controls" width="70px"> <td class="data-controls" width="70px">
@ -58,42 +83,84 @@ foreach ($data as $key => $value) {
<p class="counter-value">Are you sure you want to delete cron job?</p> <p class="counter-value">Are you sure you want to delete cron job?</p>
</div> </div>
</td> </td>
</tr></table> </tr>
</table>
<table class="data-col2" width="800px"> <table class="data-col2" width="800px">
<tr><td colspan=5 class="cron" style="padding: 0 0 0 4px;"><b><?php echo $data[$key]['CMD'] ?></b></td></tr> <tr>
<td colspan=5 class="cron" style="padding: 0 0 0 4px;">
<b><?php echo $data[$key]['CMD'] ?></b>
</td>
</tr>
<tr> <tr>
<td style="vertical-align:top;" width="80px"> <td style="vertical-align:top;" width="80px">
<table> <table>
<tr><td class="cron-counter-name">Min</td></tr> <tr>
<tr><td class="cron-counter-value"><?php echo $data[$key]['MIN'] ?></tr> <td class="cron-counter-name">
Min
</td>
</tr>
<tr>
<td class="cron-counter-value">
<?php echo $data[$key]['MIN'] ?>
</td>
</tr>
</table> </table>
</td> </td>
<td style="vertical-align:top;" width="80px"> <td style="vertical-align:top;" width="80px">
<table> <table>
<tr><td class="cron-counter-name">Hour</td></tr> <tr>
<tr><td class="cron-counter-value"><?php echo $data[$key]['HOUR'] ?></tr> <td class="cron-counter-name">
Hour
</td>
</tr>
<tr>
<td class="cron-counter-value">
<?php echo $data[$key]['HOUR'] ?>
</td>
</tr>
</table> </table>
</td> </td>
<td style="vertical-align:top;" width="80px"> <td style="vertical-align:top;" width="80px">
<table> <table>
<tr><td class="cron-counter-name">Day</td></tr> <tr>
<tr><td class="cron-counter-value"><?php echo $data[$key]['DAY'] ?></tr> <td class="cron-counter-name">
Day
</td>
</tr>
<tr>
<td class="cron-counter-value">
<?php echo $data[$key]['DAY'] ?>
</td>
</tr>
</table> </table>
</td> </td>
<td style="vertical-align:top;" width="80px"> <td style="vertical-align:top;" width="80px">
<table> <table>
<tr><td class="cron-counter-name">Month</td></tr> <tr>
<tr><td class="cron-counter-value"><?php echo $data[$key]['MONTH'] ?></tr> <td class="cron-counter-name">
Month
</td>
</tr>
<tr>
<td class="cron-counter-value">
<?php echo $data[$key]['MONTH'] ?>
</td>
</tr>
</table> </table>
</td> </td>
<td style="vertical-align:top;"> <td style="vertical-align:top;">
<table> <table>
<tr><td class="cron-counter-name">Day of Week</td></tr> <tr>
<tr><td class="cron-counter-value"><?php echo $data[$key]['WDAY'] ?></tr> <td class="cron-counter-name">
Day of Week
</td>
</tr>
<tr>
<td class="cron-counter-value">
<?php echo $data[$key]['WDAY'] ?>
</td>
</tr>
</table> </table>
</td> </td>
</tr> </tr>
@ -101,15 +168,17 @@ foreach ($data as $key => $value) {
</td> </td>
</tr> </tr>
<?php <?php
} }
?> ?>
</table> </table>
<?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?> <?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
<table class="data-count"> <table class="data-count">
<tr> <tr>
<td> <td width="160px"></td>
<td>
<?php <?php
if ( $i == 1) { if ( $i == 1) {
echo "1 cron job "; echo "1 cron job ";
@ -121,6 +190,7 @@ foreach ($data as $key => $value) {
</tr> </tr>
</table> </table>
</form> </form>
<?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?> <?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:172px\"><tr><td></td></tr></table>"; ?> <?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:172px\"><tr><td></td></tr></table>"; ?>
<?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:55px\"><tr><td></td></tr></table>"; ?> <?php if ($i == 2) echo "<table class=\"data-spacer\" style=\"height:55px\"><tr><td></td></tr></table>"; ?>

View file

@ -1,15 +0,0 @@
<table class="sub-menu">
<tr>
<td width="142px" style="padding: 16px 0 16px 6px">
<button style="width:120px; padding: 2px 0px 2px 0px;" onclick="location.href='/add/cron/'">Add Job</button>
<td><a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
<select style="margin:0 0 0 0px">
<option>apply to selected</option>
<option>delete</option>
</select> <button> > </button></td>
</td>
<td style="text-align: right;"><input type="text" size="30" style="padding: 3px 80px 3px 0;"> <button> Search </button></td>
</tr><tr>
</tr>
</table>
<form id="vstobjects">