Change link naming to vastly prefer -with-deps download.
[ccan] / web / staticmoduleinfo.php
1 <?php
2 session_start();
3 include('logo.html');
4 include('menulist.html');
5 include('static-configuration');
6 $module=$argv[1];
7
8 $maintainer=extract_field('maintainer',$module);
9 $author=extract_field('author',$module);
10 $summary=extract_field('summary',$module);
11 $description=htmlize_field('description',$module);
12 $example=extract_field('example',$module);
13 $dependencies=htmlspecialchars(shell_exec('tools/ccan_depends --direct '.$module));
14 $licence=extract_field('licence',$module);
15 ?>
16 <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="3" cellspacing="1">
17 <tr align="center" bgcolor="FFFFCC">
18 <td>
19 <a href="<?=$repo_base.$module?>">Browse Source</a>
20 </td>
21 <td>
22 <a href="../<?=$tar_dir?>/with-deps/<?=basename($module)?>.tar.bz2">Download</a>
23 <a href="../<?=$tar_dir?>/<?=basename($module)?>.tar.bz2">(without any required ccan dependencies)</a>
24 </tr>
25 </table>
26
27 <p>
28 </p>
29
30 <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="8" cellspacing="1">
31 <tr align="left" bgcolor="FFFFCC">
32 <td><h3>Module: </h3> <?=$module?> </td>
33 </tr>
34
35 <tr align="left" bgcolor="FFFFCC">
36 <td><h3>Summary: </h3> <?=$summary?></td>
37 </tr>
38
39 <?php
40 if ($maintainer) {
41 ?>
42 <tr align="left" bgcolor="FFFFCC"> 
43 <td><h3>Maintainer: </h3> <?=$maintainer?></td>
44 </tr>
45 <?php
46 }
47
48 if ($author) {
49 ?>
50 <tr align="left" bgcolor="FFFFCC"> 
51 <td><h3>Author: </h3> <?=$author?></td>
52 </tr>
53 <?php
54 }
55
56 if ($dependencies) {
57 ?>
58 <tr align="left" bgcolor="FFFFCC">
59 <td><h3>Dependencies: </h3> <pre> <?php
60         foreach (preg_split("/\s+/", $dependencies) as $dep) {
61                 echo '<a href="'.substr($dep, 5).'.html">'.$dep.'</a> ';
62         }
63 ?></pre></td>
64 </tr>
65 <?php 
66 }
67 ?>
68 <tr align="left" bgcolor="FFFFCC">
69 <td><h3>Description: </h3> <?=$description;?> </td>
70 </tr>
71 <?php 
72 if ($example) {
73 ?>
74 <tr align="left" bgcolor="FFFFCC"> 
75 <td><h3>Example: </h3> <pre><?=$example?></pre></td>
76 </tr>
77 <?php
78 }
79
80 if ($licence) {
81 ?>
82 <tr align="left" bgcolor="FFFFCC"> 
83 <td><h3>Licence: </h3> <?=$licence?></td>
84 </tr>
85 <?php
86 }
87 ?>
88 </table><hr>
89 </body></html>