\n"; echo "\n"; echo "\n".$settings['sitename']."\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n\n"; $item_id = isset($_GET['item_id']) && isnum($_GET['item_id']) ? $_GET['item_id'] : 0; if (isset($_GET['type'])) { switch ($_GET['type']) { case "A": if (!defined('ARTICLES_EXIST')) { redirect(BASEDIR."error.php?code=404"); } $result = dbquery("SELECT ta.article_subject, ta.article_article, ta.article_breaks, ta.article_datestamp, tu.user_id, tu.user_name, tu.user_status FROM ".DB_ARTICLES." ta INNER JOIN ".DB_ARTICLE_CATS." tac ON ta.article_cat=tac.article_cat_id LEFT JOIN ".DB_USERS." tu ON ta.article_name=tu.user_id WHERE ta.article_id='".intval($item_id)."' AND ta.article_draft='0' AND tac.article_cat_status='1' AND ".groupaccess("ta.article_visibility")." AND ".groupaccess("tac.article_cat_visibility")." LIMIT 0,1 "); $res = FALSE; if (dbrows($result)) { $data = dbarray($result); $res = TRUE; $article = str_replace("<--PAGEBREAK-->", "", parse_textarea($data['article_article'])); if ($data['article_breaks'] == "y") { $article = nl2br($article); } echo "".$data['article_subject']."
\n"; echo "".$locale['400'].$data['user_name'].$locale['401'].ucfirst(showdate("longdate", $data['article_datestamp']))."\n"; echo "
".$article."\n"; } if (!$res) { redirect($settings['opening_page']); } break; case "B": if (!defined('BLOG_EXIST')) { redirect(BASEDIR."error.php?code=404"); } $result = dbquery("SELECT tn.blog_subject, tn.blog_blog, tn.blog_extended, tn.blog_breaks, tn.blog_datestamp, tn.blog_visibility, tu.user_id, tu.user_name, tu.user_status FROM ".DB_BLOG." tn LEFT JOIN ".DB_USERS." tu ON tn.blog_name=tu.user_id WHERE blog_id='".intval($item_id)."' AND blog_draft='0' "); $res = FALSE; if (dbrows($result) != 0) { $data = dbarray($result); if (checkgroup($data['blog_visibility'])) { $res = TRUE; $blog = parse_textarea($data['blog_blog']); if ($data['blog_breaks'] == "y") { $blog = nl2br($blog); } if ($data['blog_extended']) { $blog_extended = parse_textarea($data['blog_extended']); if ($data['blog_breaks'] == "y") { $blog_extended = nl2br($blog_extended); } } else { $blog_extended = ""; } echo "".$data['blog_subject']."
\n"; echo "".$locale['400'].$data['user_name'].$locale['401'].ucfirst(showdate("longdate", $data['blog_datestamp']))."\n"; echo "
".$blog."\n"; if ($blog_extended) { echo "
\n".$locale['403']."\n
\n$blog_extended\n"; } } } if (!$res) { redirect($settings['opening_page']); } break; case "FQ": if (!defined('FAQ_EXIST')) { redirect(BASEDIR."error.php?code=404"); } $result = dbquery("SELECT ta.faq_question, ta.faq_answer, ta.faq_breaks, ta.faq_datestamp, tu.user_id, tu.user_name, tu.user_status FROM ".DB_FAQS." ta LEFT JOIN ".DB_USERS." tu ON ta.faq_name=tu.user_id WHERE ta.faq_id='".intval($item_id)."' AND ta.faq_status='1' AND ".groupaccess("ta.faq_visibility")." LIMIT 0,1 "); $res = FALSE; if (dbrows($result)) { $data = dbarray($result); $res = TRUE; $faq = str_replace("<--PAGEBREAK-->", "", parse_textarea($data['faq_answer'])); if ($data['faq_breaks'] == "y") { $faq = nl2br($faq); } echo "".$data['faq_question']."
\n"; echo "".$locale['400'].$data['user_name'].$locale['401'].ucfirst(showdate("longdate", $data['faq_datestamp']))."\n"; echo "
".$faq."\n"; } if (!$res) { redirect($settings['opening_page']); } break; case "F": if (!defined('FORUM_EXIST')) { redirect(BASEDIR."error.php?code=404"); } if ((isset($_GET['post']) && isnum($_GET['post'])) && (isset($_GET['nr']) && isnum($_GET['nr']))) { $result = dbquery("SELECT fp.post_message, fp.post_datestamp, fp.post_edittime, fp.post_author as post_author, fp.post_edituser, fu.user_name AS user_name, fu.user_status AS user_status, fe.user_name AS edit_name, fe.user_status AS edit_status, ft.thread_subject, ff.forum_access FROM ".DB_FORUM_THREADS." ft INNER JOIN ".DB_FORUM_POSTS." fp ON ft.thread_id = fp.thread_id INNER JOIN ".DB_FORUMS." ff ON ff.forum_id = ft.forum_id INNER JOIN ".DB_USERS." fu ON fu.user_id = fp.post_author LEFT JOIN ".DB_USERS." fe ON fe.user_id = fp.post_edituser WHERE ft.thread_id='".intval($item_id)."' AND fp.post_id = ".$_GET['post']); $res = FALSE; if (dbrows($result)) { $data = dbarray($result); if (checkgroup($data['forum_access'])) { $res = TRUE; echo $locale['500']." ".$settings['sitename']." :: ".$data['thread_subject']."

\n"; echo "
\n"; echo "
".$locale['501'].$data['user_name'].$locale['502'].showdate("forumdate", $data['post_datestamp'])."
#".$_GET['nr']."

\n"; echo parse_textarea($data['post_message']); if ($data['edit_name'] != "") { echo "
\n
\n"; echo $locale['503'].$data['edit_name'].$locale['502'].showdate("forumdate", $data['post_edittime']); echo "
\n"; } echo "
\n"; echo "
\n"; } } if (!$res) { redirect($settings['opening_page']); } } else { $posts_per_page = 20; if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; } $result = dbquery("SELECT fp.post_message, fp.post_datestamp, fp.post_edittime, fp.post_author, fp.post_edituser, fu.user_name AS user_name, fu.user_status AS user_status, fe.user_name AS edit_name, fe.user_status AS edit_status, ft.thread_subject, ff.forum_access FROM ".DB_FORUM_THREADS." ft INNER JOIN ".DB_FORUM_POSTS." fp ON ft.thread_id = fp.thread_id INNER JOIN ".DB_FORUMS." ff ON ff.forum_id = ft.forum_id INNER JOIN ".DB_USERS." fu ON fu.user_id = fp.post_author LEFT JOIN ".DB_USERS." fe ON fe.user_id = fp.post_edituser WHERE ft.thread_id='".intval($item_id)."' ORDER BY fp.post_datestamp LIMIT ".$_GET['rowstart'].",$posts_per_page"); $res = FALSE; $i = 0; if (dbrows($result)) { while ($data = dbarray($result)) { if (checkgroup($data['forum_access'])) { $res = TRUE; if ($i == 0) { echo $locale['500']." ".$settings['sitename']." :: ".$data['thread_subject']."

\n"; } echo "
\n"; echo "
".$locale['501'].$data['user_name'].$locale['502'].showdate("forumdate", $data['post_datestamp'])."
#".($i + 1)."

\n"; echo parse_textarea($data['post_message']); if ($data['edit_name'] != '') { echo "
\n
\n"; echo $locale['503'].$data['edit_name'].$locale['502'].showdate("forumdate", $data['post_edittime']); echo "
\n"; } echo "
\n"; echo "
\n"; $i++; } } } if (!$res) { redirect($settings['opening_page']); } } break; case "N": if (!defined('NEWS_EXIST')) { redirect(BASEDIR."error.php?code=404"); } $result = dbquery("SELECT tn.news_subject, tn.news_news, tn.news_extended, tn.news_breaks, tn.news_datestamp, tn.news_visibility, tu.user_id, tu.user_name, tu.user_status FROM ".DB_NEWS." tn LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id WHERE news_id='".intval($item_id)."' AND news_draft='0'"); $res = FALSE; if (dbrows($result) != 0) { $data = dbarray($result); if (checkgroup($data['news_visibility'])) { $res = TRUE; $news = parse_textarea($data['news_news']); if ($data['news_breaks'] == "y") { $news = nl2br($news); } if ($data['news_extended']) { $news_extended = parse_textarea($data['news_extended']); if ($data['news_breaks'] == "y") { $news_extended = nl2br($news_extended); } } else { $news_extended = ""; } echo "".$data['news_subject']."
\n"; echo "".$locale['400'].$data['user_name'].$locale['401'].ucfirst(showdate("longdate", $data['news_datestamp']))."\n"; echo "
".$news."\n"; if ($news_extended) { echo "
\n".$locale['402']."\n
\n$news_extended\n"; } } } if (!$res) { redirect($settings['opening_page']); } break; case "T": if ($settings['enable_terms'] == 1) { echo "".$settings['sitename']." ".$locale['600']."
\n"; echo "".$locale['601']." ".ucfirst(showdate("longdate", $settings['license_lastupdate']))."\n"; echo "
".parse_textarea(\PHPFusion\QuantumFields::parse_label($settings['license_agreement']))."\n"; } else { redirect($settings['opening_page']); } break; case "P": echo "".$settings['sitename']." ".$locale['700']."
\n"; echo "
".parse_textarea(\PHPFusion\QuantumFields::parse_label($settings['privacy_policy']))."\n"; break; } } else { redirect($settings['opening_page']); } echo "\n"; if (ob_get_length() !== FALSE) { ob_end_flush(); }