index.php 698 B

123456789101112131415
  1. <?php
  2. echo file_get_contents('templates/header.template');
  3. $db = scandir('phar://'.getcwd().'/x86_64/omni.db');
  4. $dir1 = scandir(getcwd().'/i686');
  5. $dir2 = scandir(getcwd().'/x86_64');
  6. foreach($db as $file) {
  7. $desc = file_get_contents('phar://'.getcwd().'/x86_64/omni.db/'.$file.'/desc');
  8. $desc = substr($desc,strrpos($desc,'%DESC%')+7,strlen($desc)-strrpos($desc,'%DESC%')-(strlen($desc)-strpos($desc,'%CSIZE%'))-7);
  9. echo "<h2>$file</h2><p><h4>{$desc}</h4> :: Downloads<br/>";
  10. echo " => <a href='i686/$file-i686.pkg.tar.xz'>i686</a><br/>";
  11. echo " => <a href='x86_64/$file-x86-64.pkg.tar.xz'>x86-64</a><br/>";
  12. echo "</p>";
  13. }
  14. echo file_get_contents('templates/footer.template');
  15. ?>