dispmoduleinfo.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. <tr align="left" bgcolor="FFFFCC">
  32. <td><h3>Title: </h3> <pre><?=$row['title'];?> </pre></td>
  33. </tr>
  34. <tr align="left" bgcolor="FFFFCC">
  35. <td><h3>Author: </h3> <pre><a href=search.php?author=<?=$row['author'];?>><?=$row['author'];?></a></pre></td>
  36. </tr>
  37. <tr align="left" bgcolor="FFFFCC">
  38. <td><h3>Dependencies: </h3> <pre><?=$row['depends'];?></pre></td>
  39. </tr>
  40. <tr align="left" bgcolor="FFFFCC">
  41. <td><h3>Description: </h3> <pre><?=$row['desc'];?></pre></td>
  42. </tr>
  43. </table><hr>
  44. <?php
  45. function checkerror($status, $msg)
  46. {
  47. if($status != 0) {
  48. echo "<div align=\"center\">" . $msg . "Contact ccan admin. </div>";
  49. exit();
  50. }
  51. }
  52. ?>