function DocCodeParser($syntax, $parser = 1) { if ($parser == 2) { ob_start(); $code = str_replace('<' . '?php', '<' . '?', $syntax); $code = '?' . '>' . trim($code) . '<' . '?'; extract($GLOBALS, EXTR_SKIP); eval($code); $syntax = ob_get_contents(); ob_end_clean(); } elseif ($parser == 3) { $bbcode = initBBCodes(); $syntax = $bbcode->parse($syntax); } elseif ($parser == 0) { $syntax = htmlspecialchars($syntax, ENT_NOQUOTES); } return $syntax; }
$error[] = $lang->phrase('not_allowed'); } if (count($error) > 0) { errorLogin($error, 'forum.php' . SID2URL_1); } $result = $db->query("SELECT status, prefix FROM {$db->pre}topics WHERE id = {$row['topic_id']} LIMIT 1"); $topic = $db->fetch_assoc($result); $fc = cache_cat_bid(); $last = $fc[$row['board']]; forum_opt($last['opt'], $last['optvalue'], $last['id']); $memberdata = cache_memberdata(); if (empty($row['email']) && isset($memberdata[$row['name']])) { $row['name'] = $memberdata[$row['name']]; } $row['date'] = gmdate($lang->phrase('dformat1'), times($row['date'])); $bbcode = initBBCodes(); $bbcode->setSmileys($row['dosmileys']); $bbcode->setReplace($config['wordstatus']); if ($topic['status'] == 2) { $row['comment'] = $bbcode->ReplaceTextOnce($row['comment'], 'moved'); } $text = $bbcode->parse($row['comment'], 'plain'); if (!empty($my->notice)) { $notes = explode('[VSEP]', $my->notice); if (!is_array($notes)) { $notes = array($notes); } } else { $notes = array(); } $setnotice = $lang->get_text('notice');
$breadcrumb->Add($pre . $info['topic']); forum_opt($last['opt'], $last['optvalue'], $last['id']); echo $tpl->parse("header"); echo $tpl->parse("menu"); $start = $_GET['page'] * $config['topiczahl']; $start = $start - $config['topiczahl']; // Some speed optimisation $speeder = $info['posts'] + 1; // Speed up the first pages with less than 10 posts if ($speeder > $config['topiczahl']) { $searchsql = " LIMIT " . $start . "," . $config['topiczahl']; } else { $searchsql = " LIMIT " . $speeder; } $temp = pages($speeder, 'topiczahl', "showtopic.php?id=" . $info['id'] . "&"); $bbcode = initBBCodes(TRUE); $q = explode(' ', trim($q)); $memberdata = cache_memberdata(); $inner['index_bit'] = ''; $inner['vote_result'] = ''; $inner['related'] = ''; $mymodules->load('showtopic_top'); // prepare for vote if (!empty($info['vquestion'])) { $votes = 0; if (!$my->vlogin || $my->p['voting'] == 0 || $_GET['temp'] == 1) { $showresults = TRUE; } else { $showresults = FALSE; } $cachev = array();