diff --git a/includes/system.php b/includes/system.php index a6de2a21..e7b7e8a2 100755 --- a/includes/system.php +++ b/includes/system.php @@ -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")); } diff --git a/templates/system.php b/templates/system.php index 7259903b..608e96d4 100644 --- a/templates/system.php +++ b/templates/system.php @@ -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"); -} - ?>