staticall.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. session_start();
  3. include('logo.html');
  4. include('menulist.html');
  5. include('static-configuration');
  6. $tarballsize=round((filesize($argv[3]."/ccan.tar.bz2") + 1023) / 1024);
  7. ?>
  8. <h1> List of all CCAN modules: </h1>
  9. <p>
  10. Note that two downloads are offered: the first includes with all the
  11. other ccan modules this module uses, the second is a standalone
  12. download.
  13. </p>
  14. <p>
  15. Or you can just download the <a href="ccan.tar.bz2">tarball of everything including CCAN tools (<?=$tarballsize?>K)</a>.
  16. </p>
  17. <table align="center" width="80%" border="0" cellpadding="3" cellspacing="1">
  18. <th align="left">Name</th>
  19. <th align="left">Summary / Link to details</th>
  20. <th align="right">Download</th>
  21. <?php
  22. $d = dir($argv[1]);
  23. $modules = array();
  24. while (false !== ($entry = $d->read())) {
  25. if ($entry[0] != '.' && is_file($argv[1].$entry."/_info")) {
  26. array_push($modules, $entry);
  27. }
  28. }
  29. sort($modules);
  30. foreach ($modules as $module) {
  31. $summary=extract_field('summary',$argv[1].$module);
  32. $with_deps="$tar_dir/with-deps/$module.tar.bz2";
  33. $no_deps="$tar_dir/$module.tar.bz2";
  34. $with_dep_size = round((filesize($argv[3]."/".$with_deps) + 1023) / 1024);
  35. $no_dep_size = round((filesize($argv[3]."/".$no_deps) + 1023) / 1024);
  36. ?>
  37. <tr>
  38. <td><?=$module?></td>
  39. <td><a href="info/<?=$module?>.html"><?=$summary?></a></td>
  40. <td align="right"><a href="<?=$with_deps?>"><?=$with_dep_size?>K</a> /
  41. <a href="<?=$no_deps?>"><?=$no_dep_size?>K</a></td>
  42. </tr>
  43. <?php
  44. }
  45. $d->close();
  46. ?>
  47. </table>
  48. <h2> Contents of Junkcode: </h2>
  49. (This is contributed code which was dumped here: these gems may need some polishing.)
  50. <table align="center" width="80%" border="0" cellpadding="3" cellspacing="1">
  51. <?php
  52. $d = dir($argv[2]);
  53. $dirs = array();
  54. while (false !== ($entry = $d->read())) {
  55. if ($entry[0] != '.') {
  56. array_push($dirs, $entry);
  57. }
  58. }
  59. sort($dirs);
  60. foreach ($dirs as $dir) {
  61. $size = round((filesize($argv[3]."/junkcode/".$dir.".tar.bz2") + 1023) / 1024);
  62. echo "<tr><td><a href=\"junkcode/$dir.tar.bz2\">$dir.tar.bz2 (${size}K)</a></td>\n";
  63. echo "<td><a href=\"junkcode/$dir.html\">Browse contents...</a></td><tr>\n";
  64. }
  65. $d->close();
  66. ?>
  67. </table>
  68. <hr>
  69. </body></html>