示例#1
0
<?php

/**
 * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL)
 * @copyright (C) 2000-2010 ilch.de
 * @version $Id$
 */
defined('main') or die('no direct access');
// check ob ein fehler aufgetreten ist.
check_forum_failure($forum_failure);
$title = $allgAr['title'] . ' :: Forum :: ' . $aktTopicRow['name'] . ' :: Beitr&auml;ge zeigen';
$hmenu = $extented_forum_menu . '<a class="smalfont" href="index.php?forum">Forum</a><b> &raquo; </b>' . aktForumCats($aktForumRow['kat']) . '<b> &raquo; </b><a class="smalfont" href="index.php?forum-showtopics-' . $fid . '">' . $aktForumRow['name'] . '</a><b> &raquo; </b>';
$hmenu .= $aktTopicRow['name'] . $extented_forum_menu_sufix;
$design = new design($title, $hmenu, 1);
$design->header();
// Topic Hits werden eins hochgesetzt.
db_query('UPDATE `prefix_topics` SET `hit` = `hit` + 1 WHERE `id` = "' . $tid . '"');
// mehrere seiten fals gefordert
$limit = $allgAr['Fpanz'];
// Limit
$page = $menu->getA(3) == 'p' ? $menu->getE(3) : 1;
$MPL = db_make_sites($page, "WHERE tid = " . $tid, $limit, 'index.php?forum-showposts-' . $tid, 'posts');
$anfang = ($page - 1) * $limit;
$antworten = '';
if ($aktTopicRow['stat'] == 1 and $forum_rights['reply'] == true or ($_SESSION['authright'] <= '-7' or $forum_rights['mods'] == true)) {
    $antworten = '<b>[ <a href="index.php?forum-newpost-' . $tid . '">' . $lang['answer'] . '</a> ]</b>';
}
$class = 'Cmite';
$tpl = new tpl('forum/showpost');
$ar = array('SITELINK' => $MPL, 'tid' => $tid, 'ANTWORTEN' => $antworten, 'TOPICNAME' => $aktTopicRow['name']);
$tpl->set_ar_out($ar, 0);
示例#2
0
<?php

#   Copyright by: Manuel
#   Support: www.ilch.de
defined('main') or die('no direct access');
if ($forum_rights['mods'] == FALSE) {
    $forum_failure[] = 'Keine Berechtigung dieses Forum zu moderiren';
}
check_forum_failure($forum_failure);
$title = $allgAr['title'] . ' :: Forum :: ' . aktForumCats($aktForumRow['kat'], 'title') . ' :: ' . $aktForumRow['name'];
$hmenu = $extented_forum_menu . '<a class="smalfont" href="index.php?forum">Forum</a><b> &raquo; </b>' . aktForumCats($aktForumRow['kat']) . '<b> &raquo; </b>' . $aktForumRow['name'] . $extented_forum_menu_sufix;
$design = new design($title, $hmenu, 1);
$design->header();
$csrfCheck = chk_antispam('forum_edit_forum', true);
if ((isset($_POST['del']) or isset($_POST['shift']) or isset($_POST['status'])) and (empty($_POST['in']) or isset($_POST['in']) and (!is_array($_POST['in']) or count($_POST['in']) < 1))) {
    wd('index.php?forum-editforum-' . $fid, 'Es wurden keine Themen gew&auml;hlt.', 2);
} elseif (isset($_POST['status']) && $csrfCheck) {
    foreach ($_POST['in'] as $k => $v) {
        $k = escape($k, 'integer');
        $astat = db_result(db_query("SELECT stat FROM prefix_topics WHERE id = " . $k), 0, 0);
        $nstat = $astat == 1 ? 0 : 1;
        db_query("UPDATE `prefix_topics` SET stat = '" . $nstat . "' WHERE id = " . $k);
    }
    wd('index.php?forum-showtopics-' . $fid, 'Status ge&auml;ndert', 2);
} elseif (!$csrfCheck || empty($_POST['del']) && empty($_POST['shift'])) {
    $limit = $allgAr['Ftanz'];
    // Limit
    $page = $menu->getA(3) == 'p' ? $menu->getE(3) : 1;
    $MPL = db_make_sites($page, "WHERE fid = '{$fid}'", $limit, '?forum-editforum-' . $fid, 'topics');
    $anfang = ($page - 1) * $limit;
    $q = "SELECT a.id, a.name, a.rep, a.erst, a.hit, a.art, a.stat, b.time, b.erst as last, b.id as pid\r\n   FROM prefix_topics a\r\n  \tLEFT JOIN prefix_posts b ON a.last_post_id = b.id\r\n  \tWHERE a.fid = {$fid}\r\n   \tORDER BY a.art DESC, b.time DESC\r\n   \tLIMIT " . $anfang . "," . $limit;