dispmoduleinfo.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. if (!file_exists($repopath . $ccan_home_dir.$_GET['module']."/".$_GET['module'].".tar")) {
  12. chdir($repopath);
  13. exec("tar -cvvf ".$ccan_home_dir. $_GET['module']. "/". $_GET['module'].".tar ". $ccan_home_dir.$_GET['module'], $status);
  14. chdir("..");
  15. }
  16. if (!file_exists($repopath . $ccan_home_dir.$_GET['module']."/".$_GET['module']."_dep.tar")) {
  17. chdir($repopath);
  18. exec($create_dep_tar." ".$ccan_home_dir.$_GET['module'], $status);
  19. chdir("..");
  20. }
  21. ?>
  22. <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="3" cellspacing="1">
  23. <tr align="center" bgcolor="FFFFCC">
  24. <td width="50%"><a href=<?=$repopath . $ccan_home_dir.$_GET['module']?>/<?=$_GET['module']?>.tar>Download</a></td>
  25. <td><a href=<?=$repopath . $ccan_home_dir.$_GET['module']?>/<?=$_GET['module']?>_dep.tar>Download Dependencies</a></td>
  26. </tr>
  27. </table>
  28. <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="8" cellspacing="1">
  29. <tr align="left" bgcolor="FFFFCC">
  30. <td><h3>Module: </h3> <pre><?=$row['module'];?></pre> </td>
  31. </tr>
  32. <tr align="left" bgcolor="FFFFCC">
  33. <td><h3>Title: </h3> <pre><?=$row['title'];?> </pre></td>
  34. </tr>
  35. <tr align="left" bgcolor="FFFFCC">
  36. <td><h3>Author: </h3> <pre><a href=search.php?author=<?=$row['author'];?>><?=$row['author'];?></a></pre></td>
  37. </tr>
  38. <tr align="left" bgcolor="FFFFCC">
  39. <td><h3>Description: </h3> <pre><?=$row['desc'];?></pre></td>
  40. </tr>
  41. </table><hr>