]> git.ozlabs.org Git - ccan/blob - web/dispmoduleinfo.php
b6f0817286c6b6c48bdbf31aa7e247071111b44e
[ccan] / web / dispmoduleinfo.php
1 <?php
2 session_start();
3 include('logo.html');
4 include('menulist.html');
5 include('configuration');
6 include('search.html');
7 $handle = sqlite3_open($db) or die("Could not open database");
8 $query = "select * from search where module=\"".$_GET['module']."\"";
9 $result = sqlite3_query($handle, $query) or die("Error in query: ".sqlite3_error($handle));
10 $row = sqlite3_fetch_array($result);
11
12 if (!file_exists($repopath . $ccan_home_dir.$_GET['module']."/".$_GET['module'].".tar")) {
13         chdir($repopath);
14         exec("tar -cvvf ".$ccan_home_dir. $_GET['module']. "/". $_GET['module'].".tar ". $ccan_home_dir.$_GET['module'], $status);
15         chdir("..");
16 }
17
18 if (!file_exists($repopath . $ccan_home_dir.$_GET['module']."/".$_GET['module']."_dep.tar")) {
19         chdir($repopath);
20         exec($create_dep_tar." ".$ccan_home_dir.$_GET['module'], $status);
21         chdir("..");
22 }
23
24
25 ?>
26 <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="3" cellspacing="1">
27 <tr align="center" bgcolor="FFFFCC">
28 <td width="50%"><a href=<?=$repopath . $ccan_home_dir.$_GET['module']?>/<?=$_GET['module']?>.tar>Download</a></td>
29 <td><a href=<?=$repopath . $ccan_home_dir.$_GET['module']?>/<?=$_GET['module']?>_dep.tar>Download Dependencies</a></td>
30 </tr>
31 </table>
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> <pre><?=$row['module'];?></pre> </td>
35 </tr>
36
37 <tr align="left" bgcolor="FFFFCC">
38 <td><h3>Title: </h3> <pre><?=$row['title'];?> </pre></td>
39 </tr>
40                 
41 <tr align="left" bgcolor="FFFFCC"> 
42 <td><h3>Author: </h3> <pre><a href=search.php?author=<?=$row['author'];?>><?=$row['author'];?></a></pre></td>
43 </tr>
44
45 <tr align="left" bgcolor="FFFFCC">
46 <td><h3>Description: </h3> <pre><?=$row['desc'];?></pre></td>
47 </tr>
48 </table><hr>