staticall.php 2.0 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. <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. $modules = array_slice($argv, 4);
  23. sort($modules);
  24. foreach ($modules as $module) {
  25. $summary=extract_field('summary',$argv[1].$module);
  26. $with_deps="$tar_dir/with-deps/$module.tar.bz2";
  27. $no_deps="$tar_dir/$module.tar.bz2";
  28. $with_dep_size = round((filesize($argv[3]."/".$with_deps) + 1023) / 1024);
  29. $no_dep_size = round((filesize($argv[3]."/".$no_deps) + 1023) / 1024);
  30. ?>
  31. <tr>
  32. <td><?=$module?></td>
  33. <td><a href="info/<?=$module?>.html"><?=$summary?></a></td>
  34. <td align="right"><a href="<?=$with_deps?>"><?=$with_dep_size?>K</a> /
  35. <a href="<?=$no_deps?>"><?=$no_dep_size?>K</a></td>
  36. </tr>
  37. <?php
  38. }
  39. ?>
  40. </table>
  41. <h2> Contents of Junkcode: </h2>
  42. (This is contributed code which was dumped here: these gems may need some polishing.)
  43. <table align="center" width="80%" border="0" cellpadding="3" cellspacing="1">
  44. <?php
  45. $d = dir($argv[2]);
  46. $dirs = array();
  47. while (false !== ($entry = $d->read())) {
  48. if ($entry[0] != '.') {
  49. array_push($dirs, $entry);
  50. }
  51. }
  52. sort($dirs);
  53. foreach ($dirs as $dir) {
  54. $size = round((filesize($argv[3]."/junkcode/".$dir.".tar.bz2") + 1023) / 1024);
  55. echo "<tr><td><a href=\"junkcode/$dir.tar.bz2\">$dir.tar.bz2 (${size}K)</a></td>\n";
  56. echo "<td><a href=\"junkcode/$dir.html\">Browse contents...</a></td><tr>\n";
  57. }
  58. $d->close();
  59. ?>
  60. </table>
  61. <hr>
  62. </body></html>