staticall.php 1.9 KB

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