staticjunkcode.php 627 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. session_start();
  3. include('logo.html');
  4. include('menulist.html');
  5. include('static-configuration');
  6. ?>
  7. <h1> Contents of CCAN <?=$argv[1]?> </h1>
  8. <p>
  9. <table align="center" width="80%" border="0" cellpadding="3" cellspacing="1">
  10. <?php
  11. $d = dir($argv[1]);
  12. $files = array();
  13. while (false !== ($entry = $d->read())) {
  14. if ($entry[0] != '.') {
  15. array_push($files, $entry);
  16. }
  17. }
  18. $d->close();
  19. sort($files);
  20. foreach ($files as $file) {
  21. $size = round((filesize($argv[1]."/".$file) + 1023) / 1024);
  22. ?>
  23. <tr>
  24. <td><a href="<?=$argv[2]."/".$file?>"><?=$file?> (<?=$size?>K)</td>
  25. </tr>
  26. <?php
  27. }
  28. ?>
  29. </table>
  30. <hr>
  31. </body></html>