$last = $fc[$info['board']];
$topforums = get_headboards($fc, $last, true);
$prefix = '';
if ($info['prefix'] > 0) {
    $prefix_obj = $scache->load('prefix');
    $prefix_arr = $prefix_obj->get($info['board']);
    if (isset($prefix[$info['prefix']])) {
        $prefix = $prefix_arr[$info['prefix']]['value'];
        $prefix = $lang->phrase('showtopic_prefix_title');
    }
}
$breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x);
$breadcrumb->Add($prefix . $info['topic'], "showtopic.php?id=" . $info['id'] . SID2URL_x);
$breadcrumb->Add($lang->phrase('teamcp'));
echo $tpl->parse("header");
forum_opt($last);
if ($my->vlogin && $my->mp[0] == 1) {
    ($code = $plugins->load('managetopic_start')) ? eval($code) : null;
    if ($action == "delete") {
        if ($my->mp[0] == 1 && $my->mp[4] == 0) {
            errorLogin($lang->phrase('not_allowed'), 'showtopic.php?id=' . $info['id'] . SID2URL_x);
        }
        echo $tpl->parse("menu");
        echo $tpl->parse("admin/topic/delete");
    } elseif ($action == "delete2") {
        if ($my->mp[0] == 1 && $my->mp[4] == 0) {
            errorLogin($lang->phrase('not_allowed'), 'showtopic.php?id=' . $info['id'] . SID2URL_x);
        }
        if ($config['updatepostcounter'] == 1 && $last['count_posts'] == 1) {
            $result = $db->query("SELECT COUNT(*) AS posts, name FROM {$db->pre}replies WHERE guest = '0' AND topic_id = '{$info['id']}' GROUP BY name", __LINE__, __FILE__);
            while ($row = $db->fetch_assoc($result)) {
 $error = array();
 if ($db->num_rows($result) < 1) {
     $error[] = $lang->phrase('query_string_error');
 }
 $my->p = $slog->Permissions($row['board']);
 if ($my->p['forum'] == 0) {
     $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)) {
Example #3
0
} elseif ($_GET['action'] == "board_rules") {
    $my->p = $slog->Permissions($_GET['id']);
    $catbid = $scache->load('cat_bid');
    $fc = $catbid->get();
    if (!isset($fc[$_GET['id']])) {
        error($lang->phrase('query_string_error'));
    }
    $info = $fc[$_GET['id']];
    if ($info['message_active'] == '0') {
        error($lang->phrase('no_board_rules_specified'));
    }
    ($code = $plugins->load('misc_board_rules_start')) ? eval($code) : null;
    $topforums = get_headboards($fc, $info);
    $breadcrumb->Add($info['name'], "showforum.php?id=" . $info['id'] . SID2URL_x);
    $breadcrumb->Add($lang->phrase('board_rules'));
    forum_opt($info);
    echo $tpl->parse("header");
    echo $tpl->parse("menu");
    ($code = $plugins->load('misc_board_rules_prepared')) ? eval($code) : null;
    echo $tpl->parse("misc/board_rules");
    ($code = $plugins->load('misc_board_rules_end')) ? eval($code) : null;
} elseif ($_GET['action'] == "error") {
    $my->p = $slog->Permissions();
    $errid = $gpc->get('id', int);
    if ($errid != 400 && $errid != 404 && $errid != 401 && $errid != 403 && $errid != 500) {
        $errid = 0;
    }
    ($code = $plugins->load('misc_error_prepared')) ? eval($code) : null;
    $breadcrumb->Add($lang->phrase('htaccess_error_' . $_GET['id']));
    echo $tpl->parse("header");
    echo $tpl->parse("misc/error");
$result = $db->query('
SELECT id, prefix, topic, board, posts, status
FROM ' . $db->pre . 'topics
WHERE id = "' . $_GET['id'] . '"
LIMIT 1
', __LINE__, __FILE__);
$info = $db->fetch_assoc($result);
if ($info['id'] < 1 || $db->num_rows($result) != 1) {
    error($lang->phrase('query_string_error'));
}
$info['topic'] = $gpc->prepare($info['topic']);
$my->p = $slog->Permissions($info['board']);
$cat_bid_obj = $scache->load('cat_bid');
$fc = $cat_bid_obj->get();
$last = $fc[$info['board']];
forum_opt($last, 'postreplies');
$prefix = '';
if ($info['prefix'] > 0) {
    $prefix_obj = $scache->load('prefix');
    $prefix_arr = $prefix_obj->get($info['board']);
    if (isset($prefix_arr[$info['prefix']])) {
        $prefix = $prefix_arr[$info['prefix']]['value'];
        $prefix = $lang->phrase('showtopic_prefix_title');
    }
}
get_headboards($fc, $last);
$breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x);
$breadcrumb->Add($prefix . $info['topic'], 'showtopic.php?id=' . $_GET['id'] . SID2URL_x);
$breadcrumb->Add($lang->phrase('addreply_title'));
if ($info['status'] != 0) {
    error($lang->phrase('topic_closed'));
Example #5
0
SELECT r.topic, r.board, r.name, r.comment, r.topic_id, r.dosmileys, r.dowords, t.posts, r.topic_id, r.date, t.prefix, r.id, r.edit, t.vquestion, r.tstart, t.status, r.guest
FROM ' . $db->pre . 'replies AS r 
	LEFT JOIN ' . $db->pre . 'topics AS t ON r.topic_id = t.id 
WHERE r.id = "' . $_GET['id'] . '" 
LIMIT 1
', __LINE__, __FILE__);
if ($db->num_rows($result) != 1) {
    error(array($lang->phrase('query_string_error')));
}
$info = $gpc->prepare($db->fetch_assoc($result));
$my->p = $slog->Permissions($info['board']);
$my->mp = $slog->ModPermissions($info['board']);
$cat_bid_obj = $scache->load('cat_bid');
$fc = $cat_bid_obj->get();
$last = $fc[$info['board']];
forum_opt($last, 'edit');
$prefix_obj = $scache->load('prefix');
$prefix_arr = $prefix_obj->get($info['board']);
$prefix = '';
if ($info['prefix'] > 0) {
    if (isset($prefix_arr[$info['prefix']])) {
        $prefix = $prefix_arr[$info['prefix']]['value'];
        $prefix = $lang->phrase('showtopic_prefix_title');
    }
}
get_headboards($fc, $last);
$breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x);
$breadcrumb->Add($prefix . $info['topic'], 'showtopic.php?id=' . $info['topic_id'] . SID2URL_x);
$breadcrumb->Add($lang->phrase('edit'));
echo $tpl->parse("header");
if ($info['status'] != 0) {
Example #6
0
$catbid = $scache->load('cat_bid');
$fc = $catbid->get();
$last = $fc[$info['board']];
if ($last['topiczahl'] < 1) {
    $last['topiczahl'] = $config['topiczahl'];
}
$prefix = '';
if ($info['prefix'] > 0) {
    $prefix_obj = $scache->load('prefix');
    $prefix_arr = $prefix_obj->get($info['board']);
    if (isset($prefix_arr[$info['prefix']])) {
        $prefix = $prefix_arr[$info['prefix']]['value'];
        $prefix = $lang->phrase('showtopic_prefix_title');
    }
}
forum_opt($last, 'pdf');
$start = $_GET['page'] * $last['topiczahl'];
$start = $start - $last['topiczahl'];
// Some speed optimisation
$speeder = $info['posts'] + 1;
if ($speeder > $last['topiczahl']) {
    $searchsql = " LIMIT " . $start . "," . $last['topiczahl'];
} else {
    $searchsql = " LIMIT " . $speeder;
}
BBProfile($bbcode);
$memberdata_obj = $scache->load('memberdata');
$memberdata = $memberdata_obj->get();
$pdf = new PDF();
$pdftitle = html_entity_decode($config['fname'] . ": " . $prefix . $info['topic']);
$pdf->SetCompression($config['pdfcompress']);
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$board = $gpc->get('id', int);
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$my->p = $slog->Permissions($board);
$catbid = $scache->load('cat_bid');
$fc = $catbid->get();
if (empty($board) || !isset($fc[$board])) {
    error($lang->phrase('query_string_error'));
}
$last = $fc[$board];
forum_opt($last, 'posttopics');
if ($config['tpcallow'] == 1 && $my->p['attachments'] == 1) {
    $p_upload = 1;
} else {
    $p_upload = 0;
}
get_headboards($fc, $last);
$breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x);
$breadcrumb->Add($lang->phrase('newtopic_title'));
($code = $plugins->load('newtopic_start')) ? eval($code) : null;
if ($_GET['action'] == "startvote") {
    $result = $db->query("SELECT id, vquestion, name, board FROM {$db->pre}topics WHERE id = '{$_GET['topic_id']}' LIMIT 1", __LINE__, __FILE__);
    $info = $db->fetch_assoc($result);
    $my->mp = $slog->ModPermissions($info['board']);
    $temp = $gpc->get('temp', int, 2);
    if ($temp < 2) {
Example #8
0
SELECT r.topic, r.board, r.name, r.comment, r.topic_id, r.dosmileys, r.dowords, t.posts, r.topic_id, r.date, t.prefix, r.id, r.edit, t.vquestion, r.tstart, t.status
FROM ' . $db->pre . 'replies AS r 
	LEFT JOIN ' . $db->pre . 'topics AS t ON r.topic_id = t.id 
WHERE r.id = "' . $_GET['id'] . '" 
LIMIT 1
', __LINE__, __FILE__);
if ($db->num_rows($result) != 1) {
    error(array($lang->phrase('query_string_error')));
}
$info = $gpc->prepare($db->fetch_assoc($result));
$my->p = $slog->Permissions($info['board']);
$my->mp = $slog->ModPermissions($info['board']);
$cat_bid_obj = $scache->load('cat_bid');
$fc = $cat_bid_obj->get();
$last = $fc[$info['board']];
forum_opt($last['opt'], $last['optvalue'], $last['id'], 'edit');
$prefix_obj = $scache->load('prefix');
$prefix = $prefix_obj->get($info['board']);
$pre = '';
if ($info['prefix'] > 0) {
    if (isset($prefix[$info['prefix']])) {
        $pre = $prefix[$info['prefix']];
        $pre = $lang->phrase('showtopic_prefix_title');
    }
}
get_headboards($fc, $last);
$breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x);
$breadcrumb->Add($pre . $info['topic'], 'showtopic.php?id=' . $info['topic_id'] . SID2URL_x);
$breadcrumb->Add($lang->phrase('edit'));
echo $tpl->parse("header");
if ($info['status'] != 0) {
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$catbid = $scache->load('cat_bid');
$fc = $catbid->get();
if (empty($board) || !isset($fc[$board])) {
    error($lang->phrase('query_string_error'));
}
$info = $fc[$board];
if ($info['forumzahl'] < 1) {
    $info['forumzahl'] = $config['forumzahl'];
}
$my->p = $slog->Permissions($info['id']);
$my->mp = $slog->ModPermissions($info['id']);
forum_opt($info['opt'], $info['optvalue'], $info['id']);
$breadcrumb->Add($lang->phrase('teamcp'));
echo $tpl->parse("header");
if ($my->vlogin && $my->mp[0] == 1) {
    ($code = $plugins->load('manageforum_start')) ? eval($code) : null;
    if ($_GET['action'] == "index") {
        if ($_GET['type'] == 'open') {
            $marksql = ' AND status = "1" ';
        } elseif ($_GET['type'] == 'close') {
            $marksql = ' AND status = "0" ';
        } else {
            // 'close' or 'move'
            $marksql = '';
        }
        ($code = $plugins->load('manageforum_filter_query')) ? eval($code) : null;
        if (!empty($marksql)) {
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$board = $gpc->get('id', int);
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$my->p = $slog->Permissions($board);
$catbid = $scache->load('cat_bid');
$fc = $catbid->get();
if (empty($board) || !isset($fc[$board])) {
    error($lang->phrase('query_string_error'));
}
$last = $fc[$board];
forum_opt($last['opt'], $last['optvalue'], $last['id'], 'posttopics');
if ($config['tpcallow'] == 1 && $my->p['attachments'] == 1) {
    $p_upload = 1;
} else {
    $p_upload = 0;
}
get_headboards($fc, $last);
$breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x);
$breadcrumb->Add($lang->phrase('newtopic_title'));
($code = $plugins->load('newtopic_start')) ? eval($code) : null;
if ($_GET['action'] == "startvote") {
    $my->mp = $slog->ModPermissions($board);
    if (empty($_GET['temp'])) {
        $_GET['temp'] = $_POST['temp'];
    }
    if ($_GET['temp'] < 1) {
Example #11
0
$catbid = $scache->load('cat_bid');
$fc = $catbid->get();
$last = $fc[$info['board']];
if ($last['topiczahl'] < 1) {
    $last['topiczahl'] = $config['topiczahl'];
}
$pre = '';
if ($info['prefix'] > 0) {
    $prefix_obj = $scache->load('prefix');
    $prefix = $prefix_obj->get($info['board']);
    if (isset($prefix[$info['prefix']])) {
        $pre = $prefix[$info['prefix']];
        $pre = $lang->phrase('showtopic_prefix_title');
    }
}
forum_opt($last['opt'], $last['optvalue'], $last['id'], 'pdf');
$start = $_GET['page'] * $last['topiczahl'];
$start = $start - $last['topiczahl'];
// Some speed optimisation
$speeder = $info['posts'] + 1;
if ($speeder > $last['topiczahl']) {
    $searchsql = " LIMIT " . $start . "," . $last['topiczahl'];
} else {
    $searchsql = " LIMIT " . $speeder;
}
BBProfile($bbcode);
$memberdata_obj = $scache->load('memberdata');
$memberdata = $memberdata_obj->get();
$pdf = new PDF();
$pdftitle = html_entity_decode($config['fname'] . ": " . $pre . $info['topic']);
$pdf->SetCompression($config['pdfcompress']);
$result = $db->query('
SELECT id, prefix, topic, board, posts, status 
FROM ' . $db->pre . 'topics 
WHERE id = "' . $_GET['id'] . '" 
LIMIT 1
', __LINE__, __FILE__);
$info = $db->fetch_assoc($result);
if ($info['id'] < 1 || $db->num_rows($result) != 1) {
    error($lang->phrase('query_string_error'));
}
$info['topic'] = $gpc->prepare($info['topic']);
$my->p = $slog->Permissions($info['board']);
$cat_bid_obj = $scache->load('cat_bid');
$fc = $cat_bid_obj->get();
$last = $fc[$info['board']];
forum_opt($last['opt'], $last['optvalue'], $last['id'], 'postreplies');
$pre = '';
if ($info['prefix'] > 0) {
    $prefix_obj = $scache->load('prefix');
    $prefix = $prefix_obj->get($info['board']);
    if (isset($prefix[$info['prefix']])) {
        $pre = $prefix[$info['prefix']];
        $pre = $lang->phrase('showtopic_prefix_title');
    }
}
get_headboards($fc, $last);
$breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x);
$breadcrumb->Add($pre . $info['topic'], 'showtopic.php?id=' . $_GET['id'] . SID2URL_x);
$breadcrumb->Add($lang->phrase('addreply_title'));
if ($info['status'] != 0) {
    error($lang->phrase('topic_closed'));