index.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. include '../auth.php';
  3. header("Location: main.php");
  4. ?>
  5. <!--
  6. 2018/1/21 Aroz Mirror Edit Project
  7. -->
  8. <html>
  9. <head>
  10. <title>ArOZ Mirror</title>
  11. <meta charset="UTF-8">
  12. <link rel="stylesheet" href="../script/tocas/tocas.css">
  13. <script src="../script/tocas/tocas.js"></script>
  14. <script src="../script/jquery.min.js"></script>
  15. </head>
  16. <body>
  17. <br><br><br><br><br>
  18. <div class="ts text container">
  19. <div id="maindiv" class="ts segment">
  20. <h4><i class="caution sign icon"></i>ArOZ Module Warning</h4>
  21. <h6>Module Directory: <?php echo basename(__DIR__);?></h6>
  22. <p>This function might need Internet Access permission.
  23. <br>If you proceed to the module, it means you have agreed to give the module the following permissions:</p>
  24. <div class="ts secondary segment">
  25. <p><i class="checkmark icon"></i>Internet Connection Permission</p>
  26. <p><i class="checkmark icon"></i>Read System Time</p>
  27. <p><i class="checkmark icon"></i>Write data into localStorage</p>
  28. <p><i class="checkmark icon"></i>Responsible for all internet fee accounting to the module's internet access.</p>
  29. </div>
  30. <p>ArOZ Online BETA System cannot ensure your data is secured during the connection.
  31. <br>Please use this module with your own risk.
  32. <br>You can always change your mind by removing the setting in localStorage within your browser.
  33. </p>
  34. <p>Click the confirm button below to proceed.</p>
  35. <a onClick="ConfirmBtn();" class="ts small basic positive button">Confirm</a>
  36. <a href="../" class="ts small basic negative button">Cancel</a>
  37. </div>
  38. </div>
  39. <script>
  40. //This script is used to store the informatio of if the user confirmed before or not.
  41. if (localStorage.getItem("Mirror.Confirm") == null){
  42. //The user has never confirm before
  43. }else if(localStorage.getItem("Mirror.Confirm") == 'true'){
  44. $('#maindiv').html("<h4>Standby!</h4><br>Loading Weather Information from the network...<br>If you get stuck in this page, check if your network connection is working or not :)");
  45. if(navigator.onLine) {
  46. window.location.href = "main.php";
  47. }else{
  48. $('#maindiv').html("<h4>Something went Wrong!</h4><br>You need internet access to use this module.");
  49. }
  50. }
  51. function ConfirmBtn(){
  52. localStorage.setItem("Mirror.Confirm",'true');
  53. window.location.href="main.php";
  54. }
  55. </script>
  56. </body>
  57. </html>