index.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. include '../auth.php';
  3. ?>
  4. <meta name="apple-mobile-web-app-capable" content="yes" />
  5. <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
  6. <html>
  7. <head>
  8. <script type='text/javascript' charset='utf-8'>
  9. // Hides mobile browser's address bar when page is done loading.
  10. window.addEventListener('load', function(e) {
  11. setTimeout(function() { window.scrollTo(0, 1); }, 1);
  12. }, false);
  13. </script>
  14. <title>ArOZ Online β</title>
  15. <link rel="stylesheet" href="../script/tocas/tocas.css">
  16. <script src="../script/tocas/tocas.js"></script>
  17. <script src="../script/jquery.min.js"></script>
  18. </head>
  19. <body>
  20. <nav class="ts attached inverted borderless normal menu">
  21. <div class="ts narrow container">
  22. <a href="../" class="item">ArOZ Onlineβ</a>
  23. </div>
  24. </nav>
  25. <br>
  26. <div class="ts container">
  27. <div class="ts message">
  28. <div class="header">ArOZ Online BETA Modular Help Page</div>
  29. <p>This page is not the help page of the ArOZ Online Beta System. This is the combination of README.txt included in the modules.<br>
  30. Each modules has their own API or information that the developer want you to know. In this page, you can read them all without searching them one by one.</p>
  31. <p><i class="terminal icon"></i>For developer of modules, please place your README.txt under module_name/README.txt so this simple PHP script can scan them out, thanks :)</p>
  32. </div>
  33. <?php
  34. $function_exclude = ["Help","img","script"];
  35. $folders = glob("../*", GLOB_BRACE);
  36. foreach ($folders as $folder){
  37. if (in_array(str_replace("../","",$folder),$function_exclude) !== true && is_dir($folder)){
  38. //echo str_replace("../","",$folder) . '<br>';
  39. $foldername = str_replace("../","",$folder);
  40. if (file_exists($folder . '/README.txt')){
  41. $readme = file_get_contents($folder . '/README.txt');
  42. $readme = str_replace("&","&amp",$readme);
  43. $readme = str_replace(" ","&nbsp",$readme);
  44. $readme = str_replace("<","&lt",$readme);
  45. $readme = str_replace(">","&gt",$readme);
  46. //$readme = str_replace('"',"&quot",$readme);
  47. //$readme = str_replace("'","&apos",$readme);
  48. $readme = str_replace("(C)","<i class='copyright icon'></i>",$readme);
  49. $readme = str_replace("(R)","<i class='registered icon'></i>",$readme);
  50. $readme = str_replace("(CC)","<i class='creative commons icon'></i>",$readme);
  51. $readme = str_replace("![/img]","></img>",$readme);
  52. $readme = str_replace("![//img]","<img class='ts image' src=",$readme);
  53. $readme = str_replace("\n","<br>",$readme);
  54. echo '<div class="ts segment" style="font-family: monospace;"><i class="file text outline icon"></i>'.$foldername.'/README.txt<br>' . $readme . '</div><br>';
  55. }
  56. }
  57. }
  58. ?>
  59. </div>
  60. </body>
  61. </html>