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