BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

wiki_browse.php 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php
  2. $Title = 'Browse wiki articles';
  3. if (!empty($_GET['letter'])) {
  4. $Letter = strtoupper(substr($_GET['letter'], 0, 1));
  5. if ($Letter !== '1') {
  6. $Title .= ' ('.$Letter.')';
  7. }
  8. }
  9. View::show_header($Title);
  10. $sql = "
  11. SELECT
  12. SQL_CALC_FOUND_ROWS
  13. ID,
  14. Title,
  15. Date,
  16. Author
  17. FROM wiki_articles
  18. WHERE MinClassRead <= '".$LoggedUser['EffectiveClass']."'";
  19. if ($Letter !== '1') {
  20. $sql .= " AND LEFT(Title,1) = '".db_string($Letter)."'";
  21. } else {
  22. $Letter = 'All';
  23. }
  24. $sql .= " ORDER BY Title";
  25. $DB->query($sql);
  26. ?>
  27. <div>
  28. <?php
  29. if ($Letter) { ?>
  30. <div class="header">
  31. <h2><?=$Title?>
  32. </h2>
  33. </div>
  34. <div class="box">
  35. <table width="100%" style="margin-bottom: 10px;">
  36. <tr class="colhead">
  37. <td>Article</td>
  38. <td>Last updated on</td>
  39. <td>Last edited by</td>
  40. </tr>
  41. <?php
  42. while (list($ID, $Title, $Date, $UserID) = $DB->next_record()) { ?>
  43. <tr>
  44. <td><a href="wiki.php?action=article&amp;id=<?=$ID?>"><?=$Title?></a></td>
  45. <td><?=$Date?>
  46. </td>
  47. <td><?=Users::format_username($UserID, false, false, false)?>
  48. </td>
  49. </tr>
  50. <?php } ?>
  51. </table>
  52. </div>
  53. <?php } ?>
  54. <div class="box pad center">
  55. <p>Search the wiki for user created tutorials and information.</p>
  56. <form class="search_form" name="wiki" action="wiki.php" method="get">
  57. <input type="hidden" name="action" value="search" />
  58. <input type="hidden" name="nojump" value="1" />
  59. <input type="search" name="search" size="80" />
  60. <input value="Search" type="submit" class="hidden" />
  61. </form>
  62. <br />
  63. <p>Additionally, you can manually browse through the articles by their first letter.</p>
  64. <span>
  65. <a href="wiki.php?action=browse&amp;letter=a">A</a>&nbsp;&nbsp;
  66. <a href="wiki.php?action=browse&amp;letter=b">B</a>&nbsp;&nbsp;
  67. <a href="wiki.php?action=browse&amp;letter=c">C</a>&nbsp;&nbsp;
  68. <a href="wiki.php?action=browse&amp;letter=d">D</a>&nbsp;&nbsp;
  69. <a href="wiki.php?action=browse&amp;letter=e">E</a>&nbsp;&nbsp;
  70. <a href="wiki.php?action=browse&amp;letter=f">F</a>&nbsp;&nbsp;
  71. <a href="wiki.php?action=browse&amp;letter=g">G</a>&nbsp;&nbsp;
  72. <a href="wiki.php?action=browse&amp;letter=h">H</a>&nbsp;&nbsp;
  73. <a href="wiki.php?action=browse&amp;letter=i">I</a>&nbsp;&nbsp;
  74. <a href="wiki.php?action=browse&amp;letter=j">J</a>&nbsp;&nbsp;
  75. <a href="wiki.php?action=browse&amp;letter=k">K</a>&nbsp;&nbsp;
  76. <a href="wiki.php?action=browse&amp;letter=l">L</a>&nbsp;&nbsp;
  77. <a href="wiki.php?action=browse&amp;letter=m">M</a>&nbsp;&nbsp;
  78. <a href="wiki.php?action=browse&amp;letter=n">N</a>&nbsp;&nbsp;
  79. <a href="wiki.php?action=browse&amp;letter=o">O</a>&nbsp;&nbsp;
  80. <a href="wiki.php?action=browse&amp;letter=p">P</a>&nbsp;&nbsp;
  81. <a href="wiki.php?action=browse&amp;letter=q">Q</a>&nbsp;&nbsp;
  82. <a href="wiki.php?action=browse&amp;letter=r">R</a>&nbsp;&nbsp;
  83. <a href="wiki.php?action=browse&amp;letter=s">S</a>&nbsp;&nbsp;
  84. <a href="wiki.php?action=browse&amp;letter=t">T</a>&nbsp;&nbsp;
  85. <a href="wiki.php?action=browse&amp;letter=u">U</a>&nbsp;&nbsp;
  86. <a href="wiki.php?action=browse&amp;letter=v">V</a>&nbsp;&nbsp;
  87. <a href="wiki.php?action=browse&amp;letter=w">W</a>&nbsp;&nbsp;
  88. <a href="wiki.php?action=browse&amp;letter=x">X</a>&nbsp;&nbsp;
  89. <a href="wiki.php?action=browse&amp;letter=y">Y</a>&nbsp;&nbsp;
  90. <a href="wiki.php?action=browse&amp;letter=z">Z</a>&nbsp;&nbsp;
  91. <a href="wiki.php?action=browse&amp;letter=1">All</a>&nbsp;&nbsp;
  92. </span>
  93. </div>
  94. </div>
  95. <?php
  96. View::show_footer();