42 lines
1.3 KiB
PHP
42 lines
1.3 KiB
PHP
|
<?php
|
||
|
$command_file_name = "status_commands.txt";
|
||
|
$command_file = fopen($command_file_name, "r") or die("Could not read file $command_file_name. Aborting.");
|
||
|
$commands = explode(PHP_EOL, fread($command_file, filesize($command_file_name)));
|
||
|
fclose($command_file);
|
||
|
?>
|
||
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<meta http-equiv="refresh" content="20">
|
||
|
<link rel="stylesheet" type="text/css" href="common/nalquas_style.css">
|
||
|
<link rel="stylesheet" type="text/css" href="status.css">
|
||
|
<title> Status Page </title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="header">
|
||
|
<h1> Website Name </h1>
|
||
|
<p>
|
||
|
Motto here
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="navbar">
|
||
|
<a href="status.php"> Status </a>
|
||
|
<a href="#"> Link 2 </a>
|
||
|
<a href="#"> Link 3 </a>
|
||
|
</div>
|
||
|
|
||
|
<div class="grid">
|
||
|
<?php
|
||
|
foreach ($commands as $command) {
|
||
|
echo "<div class=\"panel\"><pre>$command</pre><br /> <pre>";
|
||
|
echo shell_exec($command);
|
||
|
echo"</pre></div>\n";
|
||
|
echo '<br />';
|
||
|
} ?>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|