index.php 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. include '../auth.php';
  3. ?>
  4. <html>
  5. <head>
  6. <meta name="apple-mobile-web-app-capable" content="yes" />
  7. <meta name="viewport" content="width=device-width, initial-scale=0.8, shrink-to-fit=no">
  8. <html>
  9. <head>
  10. <script type='text/javascript' charset='utf-8'>
  11. // Hides mobile browser's address bar when page is done loading.
  12. window.addEventListener('load', function(e) {
  13. setTimeout(function() { window.scrollTo(0, 1); }, 1);
  14. }, false);
  15. </script>
  16. <meta charset="UTF-8">
  17. <script src="../script/jquery.min.js"></script>
  18. <link rel="stylesheet" href="../script/tocas/tocas.css">
  19. <script type='text/javascript' src="../script/tocas/tocas.js"></script>
  20. <title>SYSTEM ArOZβ</title>
  21. </head>
  22. <body>
  23. <div class="ts pointing secondary menu">
  24. <a class="item" href="../"><i class="chevron left icon"></i></a>
  25. <a class="active item" href="";><i class="server icon"></i>SYSTEM</a>
  26. <a class="item" href="status.php"><i class="area chart icon"></i>Status</a>
  27. </div>
  28. <div class="ts container">
  29. <!-- Warning Bar -->
  30. <div class="ts segment">
  31. <h4><i class="caution sign icon"></i>Warning!</h4>
  32. <p>These are the build in system manage and read/write functions. Wrong settings or operations may lead to system errors and data damage.<br>
  33. Please make sure you know what you are doing before modifying any of the settings or using the functions listed below.</p>
  34. </div>
  35. <!-- Function bar -->
  36. <div class="ts top attached info padded message">
  37. <div class="ts secondary fitted menu">
  38. <div class="item">
  39. <strong>System Functions Currently Available&nbsp;</strong>
  40. <span></span>
  41. </div>
  42. <div class="right item">
  43. <button class="ts mini basic secondary button">New Function</button>
  44. </div>
  45. </div>
  46. </div>
  47. <table class="ts bottom attached selectable table">
  48. <tbody>
  49. <?php
  50. $dirs = array_filter(glob('functions/*'), 'is_dir');
  51. //print_r( $dirs);
  52. $template = '<tr>
  53. <td class="collapsing">
  54. <i class="sitemap icon"></i> %MODULENAME%
  55. </td>
  56. <td>%DESCRIPTION%</td>
  57. <td class="right aligned collapsing"><a href="%PATH%"><i class="cogs icon"></i>Control Panel</a></td>
  58. </tr>';
  59. foreach ($dirs as $dir){
  60. $modulename = basename($dir);
  61. $box = str_replace("%MODULENAME%",$modulename,$template);
  62. $box = str_replace("%DESCRIPTION%","Function Group: %PATH%",$box);
  63. $box = str_replace("%PATH%",$dir,$box);
  64. echo $box;
  65. }
  66. $fdirs = array_filter(glob('functions/*.php'),"is_file");
  67. $template2 = '<tr>
  68. <td>
  69. <i class="code icon"></i>%MODULENAME%
  70. </td>
  71. <td>Stand Alone Function: %PATH%</td>
  72. <td class="right aligned"><a href="%PATH%" target="_blank"><i class="external icon"></i>Launch</a><a href="viewraw.php?filename=%PATH%"><i class="eye icon"></i>View Raw</a></td>
  73. </tr>';
  74. foreach ($fdirs as $file){
  75. $box = str_replace('%MODULENAME%',str_replace(".php","",basename($file)),$template2);
  76. $box = str_replace('%PATH%',$file,$box);
  77. echo $box;
  78. }
  79. ?>
  80. <tr>
  81. <td>
  82. <i class="book icon"></i> README
  83. </td>
  84. <td>Read more on how to use system functions in your modules.</td>
  85. <td class="right aligned"><a><i class="book icon"></i>Read Doc</a></td>
  86. </tr>
  87. </tbody>
  88. </table>
  89. </div>
  90. </body>
  91. </html>