ud
This commit is contained in:
@@ -0,0 +1,169 @@
|
||||
|*if !timer|
|
||||
|?timer=0|
|
||||
|*endif|
|
||||
|*if !scrollpos|
|
||||
|?scrollpos=0|
|
||||
|*endif|
|
||||
|
||||
|*if timer>"0"|
|
||||
|?BODY=onLoad='start_timer(1)'|
|
||||
|*endif|
|
||||
|
||||
|
||||
|LF_STANDARD|
|
||||
|?TREE=» <a class=tree href="/CMD_PROCESS_MONITOR">`LANG_PROCESS_MONITOR`</a>|
|
||||
|?HELP_SECTION=`ADMIN_HELPER`|
|
||||
|HTM_HEADER_FULL|
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var timer_on=false;
|
||||
|
||||
function do_reload(remaining)
|
||||
{
|
||||
timer_on=false;
|
||||
|
||||
document.reloadform.remaining.value="reloading ...";
|
||||
|
||||
var command = window.location.href.split("?");
|
||||
|
||||
if (remaining > 0)
|
||||
{
|
||||
|
||||
|*if OLDURL=""|
|
||||
window.location.href=command[0] + '?timer=' + remaining + "&scrollpos=" + document.body.scrollTop;
|
||||
|*else|
|
||||
window.location.href=command[0] + '?|OLDURL|&timer=' + remaining + "&scrollpos=" + document.body.scrollTop;
|
||||
|*endif|
|
||||
}
|
||||
else
|
||||
{
|
||||
//called by refresh button, timer shut off
|
||||
window.location.href=command[0] + '?|OLDURL|';
|
||||
}
|
||||
}
|
||||
|
||||
function print_option(val, selected)
|
||||
{
|
||||
var select_text="";
|
||||
|
||||
|*if timer>"0"|
|
||||
if (val == "|timer|")
|
||||
|*else|
|
||||
if (selected == "1")
|
||||
|*endif| {
|
||||
select_text="selected";
|
||||
}
|
||||
|
||||
|
||||
document.write('<option value="' + val + '" ' + select_text + '>' + val + '</option>\n');
|
||||
}
|
||||
|
||||
function tick_down()
|
||||
{
|
||||
if (!timer_on) return;
|
||||
|
||||
with (document.reloadform)
|
||||
{
|
||||
if (remaining.value <= 0)
|
||||
{
|
||||
do_reload(delay.value);
|
||||
return;
|
||||
}
|
||||
|
||||
remaining.value = remaining.value - 1;
|
||||
|
||||
setTimeout("tick_down()", 1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function stop_timer()
|
||||
{
|
||||
timer_on=false;
|
||||
}
|
||||
|
||||
function start_timer(autoloaded)
|
||||
{
|
||||
//its already on, ignore.
|
||||
//else we end up counting faster for each click.
|
||||
if (timer_on)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
timer_on=true;
|
||||
|
||||
with (document.reloadform)
|
||||
{
|
||||
remaining.value=delay.value;
|
||||
|
||||
setTimeout("tick_down()", 1000);
|
||||
}
|
||||
|
||||
|*if scrollpos>="0"|
|
||||
if (!autoloaded)
|
||||
{
|
||||
document.body.scrollTop = 297;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.body.scrollTop = |scrollpos|;
|
||||
}
|
||||
|*else|
|
||||
document.body.scrollTop = 297;
|
||||
|*endif|
|
||||
}
|
||||
|
||||
</script>
|
||||
<table class=list cellpadding=3 cellspacing=1>
|
||||
<form name="reloadform" action="/CMD_PROCESS_MONITOR" method=POST>
|
||||
<tr><td class=listtitle colspan=4>|LANG_PROCESS_MONITOR|</td></tr>
|
||||
<tr><td class=list align=right>Reload Delay (Seconds)</td><td class=list>
|
||||
<select class=selectclass name="delay">
|
||||
<option value=0>--</option>
|
||||
<script type="text/javascript">
|
||||
print_option("1", 0);
|
||||
print_option("2", 0);
|
||||
print_option("3", 0);
|
||||
print_option("4", 0);
|
||||
print_option("5", 1);
|
||||
print_option("10", 0);
|
||||
print_option("15", 0);
|
||||
print_option("30", 0);
|
||||
print_option("60", 0);
|
||||
</script>
|
||||
</select>
|
||||
</td>
|
||||
<td class=list2 align=center><input type=button value="|LANG_START|" onClick="start_timer(0)";> <input type=button value="|LANG_STOP|" onClick="stop_timer()"></td>
|
||||
<td class=list2 align=center><input type=text name="remaining" value="0" readonly size=12></td></tr>
|
||||
<tr><td class=listtitle colspan=4 align=right><input type=button value="|LANG_REFRESH|" onClick='do_reload(0);'</td></tr>
|
||||
</form>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<div style="font-family: courier; border: 1px solid;">|BOXINFO|</div><br>
|
||||
|
||||
|PROCESSES|
|
||||
|
||||
<br><center>
|
||||
|
||||
<form action="/CMD_PROCESS_MONITOR" method=POST>
|
||||
<table>
|
||||
|*if REQUIRE_ROOT_AUTH="yes"|
|
||||
<tr><td colspan=2 class=listtitle>|LANG_AUTH_TO_SEND|</td></tr>
|
||||
<tr>
|
||||
<td class=list align=right>|LANG_ROOT_PASS|</td>
|
||||
<td class=list><input type=password name=rootpass></td>
|
||||
</tr>
|
||||
<tr><td colspan=2 class=listtitle align=right><input type=submit value="|LANG_AUTH|"></td></tr>
|
||||
<input type=hidden name=authenticate value="yes">
|
||||
</table>
|
||||
|*else|
|
||||
<input type=submit value="|LANG_REMOVE_AUTH|">
|
||||
<input type=hidden name=authenticate value="no">
|
||||
|*endif|
|
||||
</form>
|
||||
</center>
|
||||
|
||||
|HTM_FOOTER_FULL|
|
||||
Reference in New Issue
Block a user