$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); ?>
Article | Last Updated | Last edited by |
=$Title?> | =$Date?> | =format_username($UserID, $Username)?> |