index.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. include '../auth.php';
  3. ?>
  4. <html>
  5. <head>
  6. <title>AOB Power Options</title>
  7. <link rel="stylesheet" href="../script/tocas/tocas.css">
  8. </head>
  9. <body>
  10. <?php
  11. $redirect = false;
  12. if (file_exists("../SystemAOB/functions/power/index.php")){
  13. $redirect = true;
  14. }else{
  15. $redirect = false;
  16. }
  17. ?>
  18. <br><br>
  19. <div class="ts container">
  20. Loading ArOZ Online Power Management Page<br><br>
  21. If you get stuck on this page, please make sure your browser support javascript.<br>
  22. Click <a href="../SystemAOB/functions/power/index.php">here</a> to redirect manually.
  23. </div>
  24. <script>
  25. var redirect = <?php echo $redirect ? "true" : "false";?>;
  26. if (redirect == false){
  27. alert("Error when launching power menu. SystemAOB/functions/power/index.php not found.");
  28. window.location.href = "../"; //Back to index
  29. }
  30. if (redirect == true){
  31. if (parent.isFunctionBar == true){
  32. //This module is launched inside vdi, use float window instead.
  33. var uid = Math.floor((Math.random() * 100) + 1);
  34. var target = "SystemAOB/functions/power/index.php?mode=embedded";
  35. parent.newEmbededWindow(target,'Power','power cord',"pow-" + uid, 590, 680, 0, 0);
  36. window.history.back();
  37. }else{
  38. //This module is launched inside sgl, use url redirect
  39. var target = "SystemAOB/functions/power/index.php";
  40. window.location.href="../" + target;
  41. }
  42. }
  43. </script>
  44. </body>
  45. </html>