]> git.ozlabs.org Git - ccan/blob - web/staticmoduleinfo.php
tdb2: direct access during transactions.
[ccan] / web / staticmoduleinfo.php
1 <?php
2 session_start();
3 include('logo.html');
4 include('menulist.html');
5 include('static-configuration');
6 $module_path=$argv[1];
7 $module=basename($module_path);
8 $maintainer=extract_field('maintainer',$module_path);
9 $author=extract_field('author',$module_path);
10 $summary=extract_field('summary',$module_path);
11 $description=htmlize_field('description',$module_path);
12 $example=extract_field('example',$module_path);
13 $dependencies=htmlspecialchars(shell_exec('tools/ccan_depends --direct '.$module_path));
14 $extdepends=htmlspecialchars(shell_exec('tools/ccan_depends --compile --non-ccan '.$module_path));
15 $licence=extract_field('licence',$module_path);
16 $license=extract_field('license',$module_path);
17 ?>
18 <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="3" cellspacing="1">
19 <tr align="center" bgcolor="FFFFCC">
20 <td>
21 <a href="<?=$repo_base.$module?>">Browse Source</a>
22 </td>
23 <td>
24 <a href="../<?=$tar_dir?>/with-deps/<?=$module?>.tar.bz2">Download</a>
25 <a href="../<?=$tar_dir?>/<?=$module?>.tar.bz2">(without any required ccan dependencies)</a>
26 </tr>
27 </table>
28
29 <p>
30 </p>
31
32 <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="8" cellspacing="1">
33 <tr align="left" bgcolor="FFFFCC">
34 <td><h3>Module: </h3> <?=$module?> </td>
35 </tr>
36
37 <tr align="left" bgcolor="FFFFCC">
38 <td><h3>Summary: </h3> <?=$summary?></td>
39 </tr>
40
41 <?php
42 if ($maintainer) {
43 ?>
44 <tr align="left" bgcolor="FFFFCC"> 
45 <td><h3>Maintainer: </h3> <?=$maintainer?></td>
46 </tr>
47 <?php
48 }
49
50 if ($author) {
51 ?>
52 <tr align="left" bgcolor="FFFFCC"> 
53 <td><h3>Author: </h3> <?=$author?></td>
54 </tr>
55 <?php
56 }
57
58 if ($dependencies) {
59 ?>
60 <tr align="left" bgcolor="FFFFCC">
61 <td><h3>Dependencies: </h3> <pre> <?php
62         foreach (preg_split("/\s+/", $dependencies) as $dep) {
63                 echo '<a href="'.substr($dep, 5).'.html">'.$dep.'</a> ';
64         }
65 ?></pre></td>
66 </tr>
67 <?php 
68 }
69
70 if ($extdepends) {
71 ?>
72 <tr align="left" bgcolor="FFFFCC">
73 <td><h3>External dependencies: </h3> <?php
74         foreach (split("\n", $extdepends) as $dep) {
75                 $fields=preg_split("/\s+/", $dep);
76                 echo $fields[0].' ';
77                 if (count($fields) > 1)
78                         echo '(version '.$fields[1].') ';
79                 echo '<br>';
80         }
81 ?></td>
82 </tr>
83 <?php 
84 }
85 ?>
86 <tr align="left" bgcolor="FFFFCC">
87 <td><h3>Description: </h3> <?=$description;?> </td>
88 </tr>
89 <?php 
90 if ($example) {
91 ?>
92 <tr align="left" bgcolor="FFFFCC"> 
93 <td><h3>Example: </h3> <pre><?=$example?></pre></td>
94 </tr>
95 <?php
96 }
97
98 if ($licence) {
99 ?>
100 <tr align="left" bgcolor="FFFFCC"> 
101 <td><h3>License: </h3> <?=$licence?></td>
102 </tr>
103 <?php
104 }
105
106 if ($license) {
107 ?>
108 <tr align="left" bgcolor="FFFFCC"> 
109 <td><h3>License: </h3> <?=$license?></td>
110 </tr>
111 <?php
112 }
113 ?>
114 </table><hr>
115 </body></html>