} if ($record['attachments'] > 0) { $subject = $subject . ' <img src="' . $_CONF['site_url'] . '/forum/images/document_sm.gif" alt=""/>'; } $firstposterName = $record['name']; $topicinfo = htmlspecialchars($record['subject']) . '::' . htmlspecialchars(preg_replace('#\\r?\\n#', '<br/>', substr(strip_tags($record['comment']), 0, $_FF_CONF['contentinfo_numchars']) . '...')); $topiclisting->set_var(array('folderimg' => $folderimg, 'folder_icon' => $folder_icon, 'folder_msg' => $folder_msg, 'topicinfo' => $topicinfo, 'topic_id' => $record['id'], 'subject' => $subject, 'author' => $record['uid'] > 1 ? '<a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $record['uid'] . '">' . $record['name'] . '</a>' : $record['name'], 'fullsubject' => $record['subject'], 'gotomsg' => $gotomsg, 'displaypageslink' => $displaypageslink, 'showuserlink' => $showuserlink, 'lastposter' => $lastposter, 'LANG_lastpost' => $LANG_GF02['msg188'], 'moved' => $moved, 'views' => $record['views'], 'replies' => $record['replies'], 'lastdate' => $lastdate, 'lastpostid' => $record['lpid'], 'LANG_BY' => $LANG_GF01['BY'], 'startdate' => $firstdate)); $topiclisting->parse('trow', 'topicrows', true); $displayCount++; } $topiclisting->set_var('pagenavigation', forum_pagination($base_url, $page, $numpages)); $topiclisting->set_var('page', $page); $topiclisting->set_var('num_pages', $numpages); if ($displayCount > 0) { $topiclisting->set_var('records_displayed', true); } $DisplayTime = $mytimer->stopTimer(); $topiclisting->set_var('page_generated_time', sprintf($LANG_GF02['msg179'], $DisplayTime)); if ($errMsg != '') { $topiclisting->set_var('no_topics_message', $errMsg); } $topiclisting->parse('output', 'topiclisting'); $pageBody .= $topiclisting->finish($topiclisting->get_var('output')); } $display = FF_siteHeader($LANG_GF01['INDEXPAGE']); $display .= FF_ForumHeader($forum, 0); $display .= $pageBody; $display .= FF_BaseFooter(); $display .= FF_siteFooter(); echo $display; exit;
if (file_exists($lFilename_large_complete)) { if (!@unlink($lFilename_large_complete)) { // ;og the problem but don't abort the script COM_errorLog('Unable to remove the following image from the article: ' . $lFilename_large_complete); } } } DB_delete($_TABLES['article_images'], 'ai_sid', DB_escapeString($sid)); DB_delete($_TABLES['comments'], 'sid', DB_escapeString($sid)); DB_delete($_TABLES['stories'], 'sid', DB_escapeString($sid)); // update RSS feed and Older Stories block COM_rdfUpToDateCheck(); COM_olderStuff(); return; } $display = FF_siteHeader(); // Check if the number of records was specified to show $page = isset($_GET['page']) ? COM_applyFilter($_GET['page'], true) : 0; $show = isset($_GET['show']) ? COM_applyFilter($_GET['show'], true) : 0; if (empty($show)) { $show = 20; } // Check if this is the first page. if (empty($page) || $page < 1) { $page = 1; } $display .= FF_Navbar($navbarMenu, $LANG_GF06['5']); $display .= COM_startBlock($LANG_GF02['msg193']); $p = new Template($_CONF['path'] . 'plugins/forum/templates/admin/'); $p->set_file(array('page' => 'migratestories.thtml', 'records' => 'migrate_records.thtml')); if (!empty($_GET['num_stories'])) {
if (!SEC_hasRights('forum.edit')) { $display = COM_siteHeader(); $display .= COM_startBlock($LANG_GF00['access_denied']); $display .= $LANG_GF00['admin_only']; $display .= COM_endBlock(); $display .= COM_siteFooter(true); echo $display; exit; } USES_forum_functions(); USES_forum_format(); USES_forum_admin(); $ip = isset($_REQUEST['ip']) ? COM_applyFilter($_REQUEST['ip']) : ''; $forum = isset($_REQUEST['forum']) ? COM_applyFilter($_REQUEST['forum'], true) : 0; $op = isset($_REQUEST['op']) ? COM_applyFilter($_REQUEST['op']) : ''; $dipslay = FF_siteHeader(); $display .= FF_Navbar($navbarMenu, $LANG_GF06['7']); $display .= COM_startBlock($LANG_GF96['gfipman']); if ($op == 'banip' && $ip != '') { if ($_POST['sure'] == 'yes') { DB_query("INSERT INTO {$_TABLES['ff_banned_ip']} (host_ip) VALUES ('" . DB_escapeString($ip) . "')"); $display .= FF_statusMessage($LANG_GF96['ipbanned'], $_CONF['site_admin_url'] . '/plugins/forum/ips.php', $LANG_GF96['ipbanned']); $display .= COM_endBlock(); $display .= FF_adminfooter(); $display .= FF_siteFooter(); echo $display; exit; } if ($_POST['sure'] != 'yes') { $ips_unban = new Template($_CONF['path'] . 'plugins/forum/templates/admin/'); $ips_unban->set_file('ips_unban', 'ips_unban.thtml');
$op = isset($_GET['op']) ? COM_applyFilter($_GET['op']) : 'lastx'; if (!in_array($op, array('newposts', 'popular', 'bookmarks', 'lastx'))) { $op = 'lastx'; } $pageTitle = ''; $pageBody = ''; switch ($op) { case 'newposts': $forum = 0; if (isset($_GET['forum'])) { $forum = COM_applyFilter($_GET['forum'], true); } list($pageTitle, $pageBody) = FF_newposts($forum); break; case 'popular': list($pageTitle, $pageBody) = FF_popular(); break; case 'bookmarks': list($pageTitle, $pageBody) = FF_bookmarks(); break; case 'lastx': list($pageTitle, $pageBody) = FF_lastx(); break; default: $pageBody .= 'Unknown option'; break; } $display = FF_siteHeader($pageTitle); $display .= $pageBody; $display .= FF_siteFooter(); echo $display;
$topicTemplate->set_var('full', 1); } else { if ($iframe) { $topicTemplate->set_var('iframe', 1); } else { $topicTemplate->set_var('full', 1); } } if (!$iframe) { $pageTitle = strip_tags(COM_checkWords($subject)); $canonical = $_CONF['site_url'] . '/forum/viewtopic.php?showtopic=' . $showtopic; if ($page > 1) { $canonical .= '&page=' . $page; } $headercode = '<link rel="canonical" href="' . $canonical . '" />'; $display .= FF_siteHeader($pageTitle, $headercode); $display .= FF_ForumHeader($forum, $showtopic); } else { list($cacheFile, $cacheURL) = COM_getStyleCacheLocation(); $csslink = $cacheURL; $topicTemplate->set_var('csslink', $csslink); $outputHandle = outputHandler::getInstance(); $topicTemplate->set_var(array('meta-header' => $outputHandle->renderHeader('meta'), 'css-header' => $outputHandle->renderHeader('style'), 'js-header' => $outputHandle->renderHeader('script'), 'raw-header' => $outputHandle->renderHeader('raw'), 'charset' => COM_getCharset())); } if (isset($_GET['lastpost']) && $_GET['lastpost']) { if ($page == 0) { $page = $numpages; } if (isset($_GET['onlytopic']) && $_GET['onlytopic'] == 1) { $order = $_FF_CONF['showtopic_review_order']; $page = 1;
function _ff_accessError() { global $LANG_GF01, $LANG_GF02; $display = FF_siteHeader(); $display .= '<br/>'; $display .= FF_BlockMessage($LANG_GF01['ACCESSERROR'], $LANG_GF02['msg03'], false); $display .= FF_siteFooter(); echo $display; exit; }
function moderator_error($type) { global $forum_id, $_CONF, $LANG_GF02, $LANG_GF01; $display = ''; if ($type == ACCESS_DENIED) { echo COM_refresh($_CONF['site_url'] . '/forum/index.php'); exit; } $display = FF_siteHeader(); $display .= FF_ForumHeader($forum_id, ''); $display .= alertMessage($LANG_GF02['msg166'], $LANG_GF01['WARNING'], '', true); $display .= FF_siteFooter(); echo $display; exit; }