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