forked from root/threadr.lostcave.ddnss.de
added php logic
parent
871bf8cf4a
commit
b25ef05312
|
@ -17,9 +17,33 @@ echo "Done.";
|
|||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title> Strassenkind Status Page </title>
|
||||
<title> Strassenkind Server Status Page </title>
|
||||
<link rel="stylesheet" type="text/css" href="./common/content/style.css" />
|
||||
<?php
|
||||
if (!isset($_POST['ondemand'])) {
|
||||
echo "<meta http-equiv=\"refresh\" content=\"20\" />";
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<body class="status_page">
|
||||
<h1> Strassenkind Server Status </h1>
|
||||
<hr />
|
||||
<?php
|
||||
// run ondemand command list if demanded
|
||||
if (isset($_POST['ondemand'])) {
|
||||
foreach ($ondemand_commands as $command) {
|
||||
echo "<!-- $command\n";
|
||||
$output = system($command);
|
||||
echo "-->\n<pre class=\"commandLine\"> $command </pre>\n<pre class=\"commandLine\"> $output </pre>\n<hr />";
|
||||
}
|
||||
} else {
|
||||
//run status command list otherwise
|
||||
foreach ($status_commands as $command) {
|
||||
echo "<!-- $command\n";
|
||||
$output = system($command);
|
||||
echo "-->\n<pre class=\"commandLine\"> $command </pre>\n<pre class=\"commandLine\"> $output </pre>\n<hr />";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue