/*-------------------------------------------------------+ | PHP-Fusion Content Management System | Copyright (C) 2002 - 2011 Nick Jones | http://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: index.php | Author: Nick Jones (Digitanium) +--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../maincore.php"; require_once THEMES."templates/header.php"; include LOCALE.LOCALESET."forum/main.php"; if (!isset($lastvisited) || !isnum($lastvisited)) { $lastvisited = time(); } add_to_title($locale['global_200'].$locale['400']); opentable($locale['400']); echo "\n"; $forum_list = ""; $current_cat = ""; $result = dbquery( "SELECT f.*, f2.forum_name AS forum_cat_name, u.user_id, u.user_name, u.user_status FROM ".DB_FORUMS." f LEFT JOIN ".DB_FORUMS." f2 ON f.forum_cat = f2.forum_id LEFT JOIN ".DB_USERS." u ON f.forum_lastuser = u.user_id WHERE ".groupaccess('f.forum_access')." AND f.forum_cat!='0' GROUP BY forum_id ORDER BY f2.forum_order ASC, f.forum_order ASC" ); if (dbrows($result) != 0) { while ($data = dbarray($result)) { if ($data['forum_cat_name'] != $current_cat) { $current_cat = $data['forum_cat_name']; echo "\n\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } $moderators = ""; if ($data['forum_moderators']) { $mod_groups = explode(".", $data['forum_moderators']); foreach ($mod_groups as $mod_group) { if ($moderators) $moderators .= ", "; $moderators .= $mod_group<101 ? "".getgroupname($mod_group)."" : getgroupname($mod_group); } } $forum_match = "\|".$data['forum_lastpost']."\|".$data['forum_id']; if ($data['forum_lastpost'] > $lastvisited) { if (iMEMBER && ($data['forum_lastuser'] == $userdata['user_id'] || preg_match("({$forum_match}\.|{$forum_match}$)", $userdata['user_threads']))) { $fim = "".$locale["; } else { $fim = "".$locale["; } } else { $fim = "".$locale["; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n\n"; } else { echo showdate("forumdate", $data['forum_lastpost'])."
\n"; echo "".$locale['406'].profile_link($data['forum_lastuser'], $data['user_name'], $data['user_status'])."\n"; echo "\n"; } } } else { echo "\n\n\n"; } echo "
".$data['forum_cat_name']."".$locale['402']."".$locale['403']."".$locale['404']."
$fim".$data['forum_name']."
\n"; if ($data['forum_description'] || $moderators) { echo "".nl2br(parseubb($data['forum_description'])).($data['forum_description'] && $moderators ? "
\n" : ""); echo ($moderators ? "".$locale['411']."".$moderators."
\n" : "\n")."\n"; } echo "
".$data['forum_threadcount']."".$data['forum_postcount'].""; if ($data['forum_lastpost'] == 0) { echo $locale['405']."
".$locale['407']."
\n\n\n"; echo "\n\n

\n"; echo "".$locale[ - ".$locale['409']."
\n"; echo "".$locale[ - ".$locale['410']."\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n
\n"; closetable(); require_once THEMES."templates/footer.php"; ?>