Exemple #1
0
        </body></html>';
    echo $HTMLOUT;
    echo $HTMLOUT;
    exit;
}
$ovfid = isset($_GET["forid"]) ? (int) $_GET["forid"] : 0;
if (!is_valid_id($ovfid)) {
    stderr('Error', 'Invalid ID!');
}
$res = sql_query("SELECT name FROM over_forums WHERE id=" . sqlesc($ovfid)) or sqlerr(__FILE__, __LINE__);
$arr = mysqli_fetch_assoc($res) or stderr('Sorry', 'No forums with that ID!');
sql_query("UPDATE users SET forum_access = " . TIME_NOW . " WHERE id=" . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__);
if ($INSTALLER09['forums_online'] == 0) {
    $HTMLOUT .= stdmsg('Warning', 'Forums are currently in maintainance mode');
}
// $HTMLOUT .= begin_main_frame();
$HTMLOUT .= "<div class='navigation'>\n\t\t\t\t<a href='index.php'>" . $INSTALLER09["site_name"] . "</a> \n\t\t\t\t&gt;\n\t\t\t\t<a href='forums.php'>Forums</a>\n\t\t\t\t<br><img src='templates/1/pic/carbon/nav_bit.png' alt=''>\n\t\t\t\t<span class='active'>" . htmlsafechars($arr["name"]) . "</span>\n\t\t\t\t</div> <br />";
$HTMLOUT .= begin_main_div();
$HTMLOUT .= begin_head_div();
$HTMLOUT .= begin_head_label("collapse" . $ovfid . "");
$HTMLOUT .= "<img src='templates/1/pic/carbon/collapse.png' alt='[+/-]' title='[+/-]' />";
$HTMLOUT .= "&nbsp;&nbsp;<strong>" . htmlsafechars($arr["name"]) . "</strong><span class='desc'></span>";
$HTMLOUT .= end_head_label();
$HTMLOUT .= end_div();
$HTMLOUT .= begin_body_div("collapse" . $ovfid . "");
$HTMLOUT .= "\n\t<table border='0' cellspacing='0' cellpadding='5' class='tborder clear'>\n";
$HTMLOUT .= show_forums($ovfid);
$HTMLOUT .= end_table();
//  $HTMLOUT .= end_main_frame();
echo stdhead("Forums", true, $stdhead) . $HTMLOUT . stdfoot($stdfoot);
exit;
Exemple #2
0
$menu3 = $last == $num ? "</div>" : "<a class='pagination_page' href='{$INSTALLER09['baseurl']}/forums.php?action=viewforum&amp;forumid={$forumid}&amp;page=" . ($page + 1) . "'>Next&nbsp;&gt;&gt;</a></div>";
$offset = $first - 1;
$topics_res = sql_query("SELECT t.id, t.user_id, t.views, t.locked, t.sticky" . ($Multi_forum['configs']['use_poll_mod'] ? ', t.poll_id' : '') . ", t.num_ratings, t.rating_sum, t.topic_name, t.anonymous,  u1.id AS uid1, u1.enabled, u1.class, u1.donor, u1.chatpost,  u1.warned, u1.leechwarn, u1.pirate, u1.king, u1.username, r.last_post_read, p.id AS p_id,p2.icon, p.user_id AS p_userid, p.anonymous as p_anon, p.added AS p_added, (SELECT COUNT(id) FROM posts WHERE topic_id=t.id) AS p_count, u2.id AS uid2, u2.enabled, u2.class, u2.donor, u2.chatpost,  u2.warned, u2.leechwarn, u2.pirate, u2.king, u2.username AS u2_username " . "FROM topics AS t " . "LEFT JOIN users AS u1 ON u1.id=t.user_id " . "LEFT JOIN read_posts AS r ON r.user_id = " . sqlesc($userid) . " AND r.topic_id = t.id " . "LEFT JOIN posts AS p ON p.id = (SELECT MAX(id) FROM posts WHERE topic_id = t.id) " . "LEFT JOIN posts AS p2 ON p2.id = (SELECT MIN(id) FROM posts WHERE topic_id = t.id) " . "LEFT JOIN users AS u2 ON u2.id = p.user_id " . "WHERE t.forum_id=" . sqlesc($forumid) . " ORDER BY t.sticky, t.last_post DESC LIMIT {$offset}, {$perpage}") or sqlerr(__FILE__, __LINE__);
// subforums
$r_subforums = sql_query("SELECT id FROM forums where place=" . sqlesc($forumid)) or sqlerr(__FILE__, __LINE__);
$subforums = mysqli_num_rows($r_subforums);
//$HTMLOUT .= begin_main_frame();
$HTMLOUT .= "<div class='row'><div class='col-sm-12 col-sm-offset-0'>";
$HTMLOUT .= "<div class='navigation'>\n\t\t\t\t<a href='index.php'>" . $INSTALLER09["site_name"] . "</a> \n\t\t\t\t&gt;\n\t\t\t\t<a href='forums.php'>Forums</a>\n\t\t\t\t<br><img src='templates/1/pic/carbon/nav_bit.png' alt=''>\n\t\t\t\t<span class='active'>" . htmlsafechars($arr["forum_name"]) . "</span>\n\t\t\t\t</div> <br />";
if ($INSTALLER09['forums_online'] == 0) {
    $HTMLOUT .= stdmsg('Warning', 'Forums are currently in maintainance mode');
}
if ($subforums > 0) {
    $HTMLOUT .= begin_main_div();
    $HTMLOUT .= begin_head_div();
    $HTMLOUT .= begin_head_label("collapse" . $forumid . "");
    $HTMLOUT .= "<img src='templates/1/pic/carbon/collapse.png' alt='[+/-]' title='[+/-]' />";
    $HTMLOUT .= "&nbsp;&nbsp;<strong>" . htmlsafechars($arr["forum_name"]) . "</strong><span class='desc'></span>";
    $HTMLOUT .= end_head_label();
    $HTMLOUT .= end_div();
    $HTMLOUT .= begin_body_div("collapse" . $forumid . "");
    $HTMLOUT .= "<!--<table border='1' cellspacing='0' cellpadding='5' width='{$Multi_forum['configs']['forum_width']}'>-->\n<br />\n<table border='0' cellspacing='0' cellpadding='5' class='tborder clear'>\n";
    $HTMLOUT .= show_forums($forumid, true);
    $HTMLOUT .= end_table();
}
$HTMLOUT .= "<div class='float_left'>";
$HTMLOUT .= $menu1 . $mlb . $menu2 . $mlb . $menu3;
$HTMLOUT .= "</div>";
// start new topic
$newtopicarr = get_forum_access_levels($forumid) or die;
$maypost = $CURUSER['class'] >= $newtopicarr["write"] && $CURUSER['class'] >= $newtopicarr["create"];