index.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. $name = file_get_contents('name.txt');
  3. ?>
  4. <!doctype html>
  5. <html>
  6. <head>
  7. <link rel="icon" type="image/ico" href="favicon.ico">
  8. <title>[<?php echo $name;?>]</title>
  9. <style>
  10. #wrapper{
  11. margin-right: auto;
  12. margin-left: auto;
  13. width: 500px;
  14. }
  15. </style>
  16. </head>
  17. <body>
  18. <div id="wrapper">
  19. <h1>[<?php echo $name;?>] Repo Installation:</h1>
  20. Append this to /etc/pacman.conf
  21. <pre><?php echo file_get_contents('config.txt');?></pre>
  22. <?php
  23. $db = scandir('phar://'.getcwd().'/x86_64/omni.db');
  24. $dir1 = scandir(getcwd().'/i686');
  25. $dir2 = scandir(getcwd().'/x86_64');
  26. foreach($db as $file) {
  27. $desc = file_get_contents('phar://'.getcwd().'/x86_64/omni.db/'.$file.'/desc');
  28. $desc = substr($desc,strrpos($desc,'%DESC%')+7,strlen($desc)-strrpos($desc,'%DESC%')-(strlen($desc)-strpos($desc,'%CSIZE%'))-7);
  29. echo "<h2>$file</h2><p><h4>{$desc}</h4> :: Downloads<br/>";
  30. echo " => <a href='i686/$file-i686.pkg.tar.xz'>i686</a><br/>";
  31. echo " => <a href='x86_64/$file-x86-64.pkg.tar.xz'>x86_64</a><br/>";
  32. echo "</p>";
  33. }
  34. ?>
  35. </div>
  36. </body>
  37. </html>