<? $Letter = strtoupper(substr($_GET['letter'],0,1)); $sql = "SELECT SQL_CALC_FOUND_ROWS w.ID, w.Title, w.Date, w.Author, u.Username FROM wiki_articles AS w LEFT JOIN users_main AS u ON u.ID=w.Author WHERE w.MinClassRead <= '".$LoggedUser['Class']."'"; if($Letter!=='1') { $sql .= " AND UPPER(LEFT(w.Title,1)) = '".db_string($Letter)."'"; } else { $Letter = 'All'; } $sql .= " ORDER BY Title"; $DB->query($sql); $Title = 'Browse articles'; if($Letter) { $Title.= ' ('.$Letter.')'; } show_header($Title); ?> <div class="thin"> <? if($Letter) { ?> <h2>Browse articles (<?=$Letter?>)</h2> <table width="100%" style="margin-bottom:10px;"> <tr class="colhead"> <td>Article</td> <td>Last Updated</td> <td>Last edited by</td> </tr> <? while(list($ID, $Title, $Date, $UserID, $Username) = $DB->next_record()) {?> <tr> <td><a href="wiki.php?action=article&id=<?=$ID?>"><?=$Title?></a></td> <td><?=$Date?></td> <td><?=format_username($UserID, $Username)?></td> </tr> <? } ?> </table> <? } ?> <div class="box pad center"> <p>Search the wiki for user created tutorials and information.</p> <form action="wiki.php" method="get"> <input type="hidden" name="action" value="search"> <input type="hidden" name="nojump" value="1" /> <input type="text" name="search" size="80" /> <input value="Search" type="submit" class="hidden" /> </form> <br /> <p>Additionally you can manually browse through the articles by their first letter.</p> <span> <a href="wiki.php?action=browse&letter=a">A</a> <a href="wiki.php?action=browse&letter=b">B</a> <a href="wiki.php?action=browse&letter=c">C</a> <a href="wiki.php?action=browse&letter=d">D</a> <a href="wiki.php?action=browse&letter=e">E</a> <a href="wiki.php?action=browse&letter=f">F</a> <a href="wiki.php?action=browse&letter=g">G</a> <a href="wiki.php?action=browse&letter=h">H</a> <a href="wiki.php?action=browse&letter=i">I</a> <a href="wiki.php?action=browse&letter=j">J</a> <a href="wiki.php?action=browse&letter=k">K</a> <a href="wiki.php?action=browse&letter=l">L</a> <a href="wiki.php?action=browse&letter=m">M</a> <a href="wiki.php?action=browse&letter=n">N</a> <a href="wiki.php?action=browse&letter=o">O</a> <a href="wiki.php?action=browse&letter=p">P</a> <a href="wiki.php?action=browse&letter=q">Q</a> <a href="wiki.php?action=browse&letter=r">R</a> <a href="wiki.php?action=browse&letter=s">S</a> <a href="wiki.php?action=browse&letter=t">T</a> <a href="wiki.php?action=browse&letter=u">U</a> <a href="wiki.php?action=browse&letter=v">V</a> <a href="wiki.php?action=browse&letter=w">W</a> <a href="wiki.php?action=browse&letter=x">X</a> <a href="wiki.php?action=browse&letter=y">Y</a> <a href="wiki.php?action=browse&letter=z">Z</a> <a href="wiki.php?action=browse&letter=1">All</a> </span> </div> </div> <? show_footer(); ?>