index.php 584 B

12345678910111213141516171819202122232425
  1. <?php
  2. $TAB = "UPDATES";
  3. // Main include
  4. include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php";
  5. // Check user
  6. if ($_SESSION["userContext"] != "admin") {
  7. header("Location: /list/user");
  8. exit();
  9. }
  10. // Data
  11. exec(HESTIA_CMD . "v-list-sys-hestia-updates json", $output, $return_var);
  12. $data = json_decode(implode("", $output), true);
  13. unset($output);
  14. exec(HESTIA_CMD . "v-list-sys-hestia-autoupdate plain", $output, $return_var);
  15. $autoupdate = $output["0"];
  16. unset($output);
  17. // Render page
  18. render_page($user, $TAB, "list_updates");
  19. // Back uri
  20. $_SESSION["back"] = $_SERVER["REQUEST_URI"];