]> git.ozlabs.org Git - ccan/blob - web/dispmoduleinfo.php
Handle global_lock properly in tdb_transaction_lock/unlock.
[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 <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="3" cellspacing="1">
13 <tr align="center" bgcolor="FFFFCC">
14 <td width="50%">
15         <?php 
16                 if(file_exists($tar_dir . $_GET['module'].".tar"))
17                         echo '<a href='. $tar_dir . $_GET['module'] . '.tar>Download</a>';
18         ?>
19 <td>
20         <?php 
21                 if(file_exists($tar_dir . $_GET['module']."_with_deps.tar"))
22                         echo '<a href='. $tar_dir . $_GET['module'] . '_with_deps.tar>Download Dependencies</a>';
23         ?>
24 </td>
25 </tr>
26 </table>
27 <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="8" cellspacing="1">
28 <tr align="left" bgcolor="FFFFCC">
29 <td><h3>Module: </h3> <pre><?=$row['module'];?></pre> </td>
30 </tr>
31
32 <tr align="left" bgcolor="FFFFCC">
33 <td><h3>Title: </h3> <pre><?=$row['title'];?> </pre></td>
34 </tr>
35                 
36 <tr align="left" bgcolor="FFFFCC"> 
37 <td><h3>Author: </h3> <pre><a href=search.php?author=<?=$row['author'];?>><?=$row['author'];?></a></pre></td>
38 </tr>
39
40 <tr align="left" bgcolor="FFFFCC">
41 <td><h3>Dependencies: </h3> <pre><?=$row['depends'];?></pre></td>
42 </tr>
43
44 <tr align="left" bgcolor="FFFFCC">
45 <td><h3>Description: </h3> <pre><?=$row['desc'];?></pre></td>
46 </tr>
47 </table><hr>
48
49 <?php 
50 function checkerror($status, $msg)
51 {
52         if($status != 0) {
53                     echo "<div align=\"center\">" . $msg . "Contact ccan admin. </div>";
54                     exit();
55         }
56
57 ?>