Exemplo n.º 1
0
if (!empty($marksql)) {
    $result = $db->query("SELECT COUNT(*) FROM {$db->pre}topics WHERE board = '{$board}' {$marksql}");
    $vlasttopics = $db->fetch_num($result);
    $info['topics'] = $vlasttopics[0];
}
if ($info['forumzahl'] < 1) {
    $info['forumzahl'] = $config['forumzahl'];
}
if (ceil($info['topics'] / $info['forumzahl']) < $_GET['page']) {
    $_GET['page'] = 1;
}
$pages = pages($info['topics'], $info['forumzahl'], 'showforum.php?id=' . $board . '&amp;sort=' . $_GET['sort'] . '&amp;', $_GET['page']);
echo $tpl->parse("header");
echo $tpl->parse("menu");
($code = $plugins->load('showforum_forums_start')) ? eval($code) : null;
$subforums = BoardSelect($board);
($code = $plugins->load('showforum_forums_end')) ? eval($code) : null;
$inner['index_bit'] = '';
if ($info['topics'] > 0) {
    $start = $_GET['page'] * $info['forumzahl'];
    $start = $start - $info['forumzahl'];
    ($code = $plugins->load('showforum_query')) ? eval($code) : null;
    $result = $db->query("\n\tSELECT prefix, vquestion, posts, mark, id, board, topic, date, status, last, last_name, sticky, name\n\tFROM {$db->pre}topics\n\tWHERE board = '{$board}' {$marksql}\n\tORDER BY sticky DESC, last DESC\n\tLIMIT {$start}, {$info['forumzahl']}\n\t");
    $prefix_obj = $scache->load('prefix');
    $prefix_arr = $prefix_obj->get($board);
    $memberdata_obj = $scache->load('memberdata');
    $memberdata = $memberdata_obj->get();
    while ($row = $gpc->prepare($db->fetch_object($result))) {
        $pref = '';
        $showprefix = false;
        if (isset($prefix_arr[$row->prefix]) && $row->prefix > 0) {
Exemplo n.º 2
0
	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
error_reporting(E_ALL);
DEFINE('SCRIPTNAME', 'forum');
require_once "data/config.inc.php";
require_once "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$slog = new slog();
$my = $slog->logged();
if ($config['indexpage'] == SCRIPTNAME && !defined('IS_INCLUDED')) {
    header("HTTP/1.0 301 Moved Permanently");
    header('Location: index.php');
}
$lang->init($my->language);
$tpl = new tpl();
$my->p = $slog->Permissions();
$my->pb = $slog->GlobalPermissions();
echo $tpl->parse("header");
echo $tpl->parse("menu");
$memberdata = cache_memberdata();
$mymodules->load('forum_top');
BoardSelect();
$mymodules->load('forum_bottom');
$slog->updatelogged();
$zeitmessung = t2();
echo $tpl->parse("footer");
$phpdoc->Out();
$db->close();