]> git.ozlabs.org Git - ccan/blob - web/staticmoduleinfo.php
crcsync byte-at-a-time test reveals flaws in buffer handling.
[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 Download:
23 <a href="../<?=$tar_dir?>/<?=basename($module)?>.tar.bz2">(standalone)</a>
24 <a href="../<?=$tar_dir?>/with-deps/<?=basename($module)?>.tar.bz2">(with all dependencies)</a>
25 </tr>
26 </table>
27
28 <p>
29 </p>
30
31 <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="8" cellspacing="1">
32 <tr align="left" bgcolor="FFFFCC">
33 <td><h3>Module: </h3> <?=$module?> </td>
34 </tr>
35
36 <tr align="left" bgcolor="FFFFCC">
37 <td><h3>Summary: </h3> <?=$summary?></td>
38 </tr>
39
40 <?php
41 if ($maintainer) {
42 ?>
43 <tr align="left" bgcolor="FFFFCC"> 
44 <td><h3>Maintainer: </h3> <?=$maintainer?></td>
45 </tr>
46 <?php
47 }
48
49 if ($author) {
50 ?>
51 <tr align="left" bgcolor="FFFFCC"> 
52 <td><h3>Author: </h3> <?=$author?></td>
53 </tr>
54 <?php
55 }
56
57 if ($dependencies) {
58 ?>
59 <tr align="left" bgcolor="FFFFCC">
60 <td><h3>Dependencies: </h3> <pre> <?php
61         foreach (preg_split("/\s+/", $dependencies) as $dep) {
62                 echo '<a href="'.substr($dep, 5).'.html">'.$dep.'</a> ';
63         }
64 ?></pre></td>
65 </tr>
66 <?php 
67 }
68 ?>
69 <tr align="left" bgcolor="FFFFCC">
70 <td><h3>Description: </h3> <?=$description;?> </td>
71 </tr>
72 <?php 
73 if ($example) {
74 ?>
75 <tr align="left" bgcolor="FFFFCC"> 
76 <td><h3>Example: </h3> <pre><?=$example?></pre></td>
77 </tr>
78 <?php
79 }
80
81 if ($licence) {
82 ?>
83 <tr align="left" bgcolor="FFFFCC"> 
84 <td><h3>Licence: </h3> <?=$licence?></td>
85 </tr>
86 <?php
87 }
88 ?>
89 </table><hr>
90 </body></html>