1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

removed logic from system template

This commit is contained in:
glaszig 2019-08-19 01:10:28 +01:00
parent 680fa1de87
commit 2c64ff0b3e
2 changed files with 9 additions and 9 deletions

View File

@ -91,6 +91,15 @@ function DisplaySystem()
'tr_TR.UTF-8' => 'Türkçe'
);
if (isset($_POST['system_reboot'])) {
$status->addMessage("System Rebooting Now!", "warning", false);
$result = shell_exec("sudo /sbin/reboot");
}
if (isset($_POST['system_shutdown'])) {
$status->addMessage("System Shutting Down Now!", "warning", false);
$result = shell_exec("sudo /sbin/shutdown -h now");
}
echo renderTemplate("system", compact("arrLocales", "status", "system"));
}

View File

@ -25,15 +25,6 @@ if ($cpuload > 90) {
$cpuload_status = "success";
}
if (isset($_POST['system_reboot'])) {
$status->addMessage("System Rebooting Now!", "warning", false);
$result = shell_exec("sudo /sbin/reboot");
}
if (isset($_POST['system_shutdown'])) {
$status->addMessage("System Shutting Down Now!", "warning", false);
$result = shell_exec("sudo /sbin/shutdown -h now");
}
?>
<div class="row">
<div class="col-lg-12">