staticmoduleinfo.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. session_start();
  3. include('logo.html');
  4. include('menulist.html');
  5. include('static-configuration');
  6. $module=$argv[1];
  7. $maintainer=extract_field('maintainer',$module);
  8. $author=extract_field('author',$module);
  9. $summary=extract_field('summary',$module);
  10. $description=htmlize_field('description',$module);
  11. $example=extract_field('example',$module);
  12. $dependencies=htmlspecialchars(shell_exec('tools/ccan_depends --direct '.$module));
  13. $licence=extract_field('licence',$module);
  14. ?>
  15. <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="3" cellspacing="1">
  16. <tr align="center" bgcolor="FFFFCC">
  17. <td>
  18. <a href="<?=$repo_base.$module?>">Browse Source</a>
  19. </td>
  20. <td>
  21. Download:
  22. <a href="../<?=$tar_dir?>/<?=basename($module)?>.tar.bz2">(standalone)</a>
  23. <a href="../<?=$tar_dir?>/with-deps/<?=basename($module)?>.tar.bz2">(with all dependencies)</a>
  24. </tr>
  25. </table>
  26. <p>
  27. </p>
  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> <?=$module?> </td>
  31. </tr>
  32. <tr align="left" bgcolor="FFFFCC">
  33. <td><h3>Summary: </h3> <?=$summary?></td>
  34. </tr>
  35. <?php
  36. if ($maintainer) {
  37. ?>
  38. <tr align="left" bgcolor="FFFFCC">
  39. <td><h3>Maintainer: </h3> <?=$maintainer?></td>
  40. </tr>
  41. <?php
  42. }
  43. if ($author) {
  44. ?>
  45. <tr align="left" bgcolor="FFFFCC">
  46. <td><h3>Author: </h3> <?=$author?></td>
  47. </tr>
  48. <?php
  49. }
  50. if ($dependencies) {
  51. ?>
  52. <tr align="left" bgcolor="FFFFCC">
  53. <td><h3>Dependencies: </h3> <pre> <?php
  54. foreach (preg_split("/\s+/", $dependencies) as $dep) {
  55. echo '<a href="'.substr($dep, 5).'.html">'.$dep.'</a> ';
  56. }
  57. ?></pre></td>
  58. </tr>
  59. <?php
  60. }
  61. ?>
  62. <tr align="left" bgcolor="FFFFCC">
  63. <td><h3>Description: </h3> <?=$description;?> </td>
  64. </tr>
  65. <?php
  66. if ($example) {
  67. ?>
  68. <tr align="left" bgcolor="FFFFCC">
  69. <td><h3>Example: </h3> <pre><?=$example?></pre></td>
  70. </tr>
  71. <?php
  72. }
  73. if ($licence) {
  74. ?>
  75. <tr align="left" bgcolor="FFFFCC">
  76. <td><h3>Licence: </h3> <?=$licence?></td>
  77. </tr>
  78. <?php
  79. }
  80. ?>
  81. </table><hr>
  82. </body></html>