2 /****************************************************************************/
4 /****************************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /****************************************************************************/
15 define('AT_INCLUDE_PATH', '../../../../include/');
16 require(AT_INCLUDE_PATH.'vitals.inc.php');
17 $fid = intval($_GET['fid']);
19 if (!isset($_GET['fid']) || !$fid) {
20 header('Location: list.php');
23 require(AT_INCLUDE_PATH.'../mods/_standard/forums/lib/forums.inc.php');
25 if (!valid_forum_user($fid)) {
26 require(AT_INCLUDE_PATH.'header.inc.php');
27 $msg->addError('FORUM_DENIED');
29 require(AT_INCLUDE_PATH.'footer.inc.php');
32 $_pages['mods/_standard/forums/forum/index.php']['title'] = get_forum_name($fid);
33 $_pages['mods/_standard/forums/forum/index.php']['parent'] = 'mods/_standard/forums/forum/list.php';
34 $_pages['mods/_standard/forums/forum/index.php']['children'] = array('mods/_standard/forums/forum/new_thread.php?fid='.$fid, 'search.php?search_within[]=forums');
36 $_pages['mods/_standard/forums/forum/new_thread.php?fid='.$fid]['title_var'] = 'new_thread';
37 $_pages['mods/_standard/forums/forum/new_thread.php?fid='.$fid]['parent'] = 'mods/_standard/forums/forum/index.php';
39 $_pages['search.php?search_within[]=forums']['title_var'] = 'search';
40 $_pages['search.php?search_within[]=forums']['parent'] = 'mods/_standard/forums/forum/index.php?fid='.$fid;
42 /* the last accessed field */
43 $last_accessed = array();
44 if ($_SESSION['valid_user'] && $_SESSION['enroll']) {
45 $sql = "SELECT post_id, last_accessed + 0 AS last_accessed, subscribe FROM ".TABLE_PREFIX."forums_accessed WHERE member_id=$_SESSION[member_id]";
46 $result = mysql_query($sql, $db);
47 while ($row = mysql_fetch_assoc($result)) {
48 $post_id = $row['post_id'];
49 unset($row['post_id']);
50 $last_accessed[$post_id] = $row;
55 require(AT_INCLUDE_PATH . 'header.inc.php');
57 require(AT_INCLUDE_PATH . '../mods/_standard/forums/html/forum.inc.php');
59 require(AT_INCLUDE_PATH . 'footer.inc.php');