query('SELECT * FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc(); $sleep = db::c()->query('SELECT `id` FROM `effects` WHERE `owner` = ?i AND `time` > ?i AND `type` = 3', $user['id'], time())->fetch_assoc(); if (!isset($_GET['page'])) { $ps = 0; } else { $ps = $_GET['page']; } $dostupPal = false; $dostupSovet = false; if (($user['align'] >= 1.7 && $user['align'] < 2) || $user['align'] == 2.4) { $dostupPal = true; } if (($user['align'] >= 1.98 && $user['align'] <= 1.99) || $user['admin'] == 1 || $user['align'] == 10) { $dostupSovet = true; $dostupPal = true; } $edit = ''; $search = ''; if (isset($_GET['do']) && $_GET['do'] != "search" && $_GET['do'] != "my_topics" && $_GET['do'] != "my_comments" && $_GET['do'] != "open" && $_GET['do'] != "close" && $_GET['do'] != "fix" && $_GET['do'] != "unfix") { echo ''; } elseif (isset($_GET['do']) && $_GET['do'] == "search") { $search .= '


'; } $news_topic = false; if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228043095) { $news_topic = true; } ?> Форум Бойцовского клуба
← на главную


Не авторизованы
"; } else { echo "Игрок : " . nick::id($user['id'])->full(1) . "
"; } ?>
Конференции
query('SELECT `min_align`, `max_align` FROM `forum` WHERE `id` = ?i', $_POST['selectt'])->fetch_assoc(); db::c()->query('UPDATE `forum` SET `parent` = ?i, `min_align` = "?s", `max_align` = "?s" WHERE `id` = ?i', $_POST['selectt'], $AlignTop['min_align'], $AlignTop['max_align'], $_POST['numt']); } if (!isset($_GET['conf']) && !isset($_GET['topic'])) { $_GET['conf'] = 1; } $Movemess = ($dostupPal == true) ? 1 : 0; $replasepost = ''; if ((isset($_GET['conf']) && is_numeric($_GET['conf'])) || (isset($_GET['konftop']) && is_numeric($_GET['konftop'])) || $Movemess == 1) { $data = db::c()->query('SELECT * FROM `forum` WHERE `parent` = 0 AND `type` = 1 ORDER BY `id` ASC'); while ($row = $data->fetch_assoc()) { if ($row['id'] == 228043095) { $news_topic = true; } if (($row['min_align'] == 0 && $row['max_align'] == 0) || ($user['align'] >= $row['min_align'] && $user['align'] <= $row['max_align']) || $user['align'] == '1.99' || $user['admin'] == '1' || $user['align'] == '10') { $replasepost .= ""; $min = $row['min_align'] == 0; $max = $row['max_align'] == 0; if (!isset($user['id']) || (($user['align'] < $row['min_align']) || ($user['align'] > $row['max_align']) && !$min && !$max) && $user['align'] != '2.99') { echo '   '; } else { echo '    '; } echo '' . $row['topic'] . '
'; } } } ?>

"<$1$2>", '/\[(left|center|right)\]/' => '

', '/\[\/(left|center|right)\]/' => '

', '/\[url\s?(src=)?\s?(.+?)\s?(target=(_blank|_self))?\](.+?)\[\/url\]/' => '$5', '/\[img width=([0-9]{1,4}) height=([0-9]{1,4})\](.+?)\[\/img\]/' => '', '/\[img\](.+?)\[\/img\]/' => '', '/\[quote\](.+?)\[\/quote\]/' => "
$1
", '/\[code\](.+?)\[\/code\]/' => "
$1
", // Смайлы '/\:smile0\:/' => '', '/\:baby\:/' => '', '/\:sniper\:/' => '', '/\:trup\:/' => '', '/\:beggar\:/' => '', '/\:rotate\:/' => '', '/\:hello\:/' => '', '/\:sten\:/' => '', '/\:shuffle\:/' => '', '/\:elix\:/' => '', '/\:smil\:/' => '', '/\:mdr\:/' => '', '/\:podz\:/' => '', '/\:dont\:/' => '', '/\:grust\:/' => '', '/\:boks\:/' => '', '/\:susel\:/' => '', '/\:dedmoroz\:/' => '', '/\:creator\:/' => '', '/\:no\:/' => '', '/\:horse\:/' => '', '/\:vamp\:/' => '', '/\:eek\:/' => '', '/\:sorry\:/' => '', '/\:friday\:/' => '', '/\:obm\:/' => '', '/\:smile\:/' => '', '/\:nail\:/' => '', '/\:gent\:/' => '', '/\:beer\:/' => '', '/\:inv\:/' => '', '/\:fire\:/' => '', '/\:dance1\:/' => '', '/\:maniac\:/' => '', '/\:kiss4\:/' => '', '/\:confused\:/' => '', '/\:kiss2\:/' => '', '/\:snowfight\:/' => '', '/\:row\:/' => '', '/\:naem\:/' => '', '/\:radio1\:/' => '', '/\:fie\:/' => '', '/\:love\:/' => '', '/\:sneeze\:/' => '', '/\:mol\:/' => '', '/\:showng\:/' => '', '/\:rocket\:/' => '', '/\:dustman\:/' => '', '/\:rupor\:/' => '', '/\:nnn\:/' => '', '/\:snegur\:/' => '', '/\:dance2\:/' => '', '/\:jeer\:/' => '', '/\:kiss\:/' => '', '/\:ponder\:/' => '', '/\:drink\:/' => '', '/\:angel\:/' => '', '/\:idea\:/' => '', '/\:lady\:/' => '', '/\:gun\:/' => '', '/\:pif\:/' => '', '/\:help\:/' => '', '/\:alch\:/' => '', '/\:kiss3\:/' => '', '/\:hug\:/' => '', '/\:lordhaos\:/' => '', '/\:rose\:/' => '', '/\:radio2\:/' => '', '/\:boks2\:/' => '', '/\:str\:/' => '', '/\:invis\:/' => '', '/\:rev\:/' => '', '/\:ok\:/' => '', '/\:alien\:/' => '', '/\:smash\:/' => '', '/\:super\:/' => '', '/\:love2\:/' => '', '/\:victory\:/' => '', '/\:kruger\:/' => '', '/\:agree\:/' => '', '/\:hi\:/' => '', '/\:privet\:/' => '', '/\:devil\:/' => '', '/\:naem2\:/' => '', '/\:tongue\:/' => '', '/\:red\:/' => '', '/\:doc\:/' => '', '/\:icon7\:/' => '', '/\:lightfly\:/' => '', '/\:owl\:/' => '', '/\:pirate\:/' => '', '/\:sword\:/' => '', '/\:bye\:/' => '', '/\:mad\:/' => '', '/\:fingal\:/' => '', '/\:nono\:/' => '', '/\:loveya\:/' => '', '/\:cry\:/' => '', '/\:superng\:/' => '', '/\:yes\:/' => '', '/\:crying\:/' => '', '/\:\'\(\:/' => '', '/\:flowers\:/' => '', '/\:tease\:/' => '', '/\:wink\:/' => '', '/\:sharp\:/' => '', '/\:nunu\:/' => '', '/\:angel2\:/' => '', '/\:naem3\:/' => '', '/\:lick\:/' => '', '/\:ninja\:/' => '', '/\:cat\:/' => '', '/\:smoke\:/' => '', '/\:chtoza\:/' => '', '/\:grace\:/' => '', '/\:tongue2\:/' => '', '/\:sorry2\:/' => '', '/\:yar\:/' => '', '/\:king2\:/' => '', '/\:carreat\:/' => '', '/\:hlw\:/' => '', '/\:grenade\:/' => '', '/\:bow\:/' => '', '/\:doc2\:/' => '', '/\:duel\:/' => '', '/\:mag\:/' => '', '/\:king\:/' => '', '/\:laugh\:/' => '', '/\:pal\:/' => '', '/\:nun\:/' => '', '/\:ura\:/' => '', ); $text = preg_replace(array_keys($bbCodes), array_values($bbCodes), $text); $text = close_dangling_tags($text); return $text; } function close_dangling_tags($html) { preg_match_all("#<([a-z]+)( .*)?(?!/)>#iU", $html, $result); $openedtags = $result[1]; preg_match_all("##iU", $html, $result); $closedtags = $result[1]; $len_opened = count($openedtags); if (count($closedtags) == $len_opened) { return $html; } $openedtags = array_reverse($openedtags); for ($i = 0; $i < $len_opened; $i++) { if (!in_array($openedtags[$i], $closedtags)) { if ($openedtags[$i] != 'br') { $html .= ''; } } else { unset($closedtags[array_search($openedtags[$i], $closedtags)]); } } return $html; } if (isset($_POST['add']) && isset($user['id'])) { $icon = htmlentities($_POST['icon'], ENT_NOQUOTES, 'utf8'); $text2 = htmlspecialchars($_POST['title'], ENT_NOQUOTES, 'utf8'); $text1 = parse_bb_code(preg_replace("/\n/", "
", $_POST['text'])); $minmax = db::c()->query('SELECT `min_align`, `max_align` FROM `forum` WHERE `id` = ?i', $_GET['conf'])->fetch_assoc(); $min_align = $minmax['min_align']; $max_align = $minmax['max_align']; if (!isset($_POST['text']) || !isset($_POST['title']) || $_POST['title'] == "" || $_POST['title'] == " " || $_POST['text'] == "" || $_POST['text'] == " ") { $error = "Заголовок или текст не могут быть пустыми!"; } elseif (($minmax['min_align'] == 0 && $minmax['max_align'] == 0) || ($user['align'] >= $minmax['min_align'] && $user['align'] <= $minmax['max_align']) || $dostupSovet) { if ($user['invis'] == 1) { $userPost = 'Невидимка'; } else { $userPost = nick::id($user['id'])->full(1); } if ($dostupPal == false) $text1 = strip_tags($text1, '
'); db::c()->query('INSERT INTO `forum` (`type`, `topic`, `text`, `parent`, `author`, `date`, `min_align`, `max_align`, `icon`) VALUES (2,"?s","?s",?i,"?s","?s","?s","?s","?s")', $text2, $text1, $_GET['conf'], $userPost, date('d.m.y H:i:s'), $min_align, $max_align, $icon); $topic_id = db::c()->getLastInsertId(); unset($_POST['text']); print ""; exit(); } else { $error = "Вы не можете писать в этой конференции!"; } unset($_POST['add']); } if (isset($_POST['add2']) && isset($user['id'])) { $text2 = htmlspecialchars($_POST['title'], ENT_NOQUOTES, 'utf8'); $text1 = parse_bb_code(preg_replace("/\n/", "
", $_POST['text'])); $minmax = db::c()->query('SELECT `min_align`,`max_align`, `close`, `parent` FROM `forum` WHERE `id` = ?i', $_GET['topic'])->fetch_assoc(); $min_align = $minmax['min_align']; $max_align = $minmax['max_align']; if (!isset($_POST['text']) || $_POST['text'] == "" || $_POST['text'] == " ") { $error = "Текст не может быть пустыми"; } elseif (!is_numeric($_GET['topic'])) { $error = "Не надо так делать"; } if (($minmax['min_align'] == 0 && $minmax['max_align'] == 0) || ($user['align'] >= $minmax['min_align'] && $user['align'] <= $minmax['max_align']) && $minmax['close'] == "0" || $dostupSovet) { if ($user['invis'] == 1) { $userPost = 'Невидимка'; } else { $userPost = nick::id($user['id'])->full(1); } if ($dostupPal == false) { $text1 = strip_tags($text1, '

'); } db::c()->query('INSERT INTO `forum` (`type`, `topic`, `text`, `parent`, `author`, `date`, `min_align`, `max_align`) VALUES (2,"?s","?s",?i,"?s","?s","?s","?s")', $text2, $text1, $_GET['topic'], $userPost, date('d.m.y H:i:s'), $min_align, $max_align); db::c()->query('UPDATE `forum` SET `updated` = now() WHERE `id` = ?i', $_GET['topic']); unset($_POST['text']); if (isset($_GET['page']) && (int)$_GET['page'] > 0) { $page_num = '&page=' . $_GET['page']; } else { $page_num = '&page=0'; } echo ''; exit(); } else { $error = "Вы не можете писать в этой конференции!"; } unset($_POST['add2']); } if (isset($_GET['dp']) && $dostupPal == true) { if ($_GET['dp'] > 100) { db::c()->query('DELETE FROM `forum` WHERE `id` = ?i OR `parent` = ?i', $_GET['dp'], $_GET['dp']); echo ""; exit(); } } if (isset($_GET['dt']) && $dostupPal == true) { if ($_GET['dt'] > 100) { db::c()->query('DELETE FROM `forum` WHERE `id` = ?i OR `parent` = ?i', $_GET['dt'], $_GET['dt']); echo ""; exit(); } } if (isset($_GET['com']) && isset($_GET['cpr']) && $dostupPal == true) { if ($user['invis'] == 1) { $addText = "
Невидимка: " . $_GET['cpr']; } else { $addText = nick::id($user['id'])->full(1). ": " . $_GET['cpr']; } db::c()->query('UPDATE `forum` SET `text` = CONCAT(`text`,"?s") WHERE `id` = ?i',$addText,$_GET['com']); echo ""; exit(); } if (isset($_GET['do']) && $dostupPal == true) { if ($_GET['do'] == "open") { db::c()->query('UPDATE `forum` SET `close` = 0 WHERE `id` = "?s"', $_GET['topic']); echo ""; exit(); } if ($_GET['do'] == "close") { $closeComment = "Обсуждение закрыл " . ($user['admin'] == 1) ? "Администратор" : nick::id($user['id'])->full(1); db::c()->query('UPDATE `forum` SET `close` = 1, `closepal` = "?s" WHERE `id` = "?s"', $closeComment, $_GET['topic']); echo ""; exit(); } if ($_GET['do'] == "fix") { db::c()->query('UPDATE `forum` SET `fix` = 1 WHERE `id` = "?s"', $_GET['topic']); echo ""; exit(); } if ($_GET['do'] == "unfix") { db::c()->query('UPDATE `forum` SET `fix` = 0 WHERE `id` = "?s"', $_GET['topic']); echo ""; exit(); } } if (!isset($_GET['conf'])) { $row = db::c()->query('SELECT * FROM `forum` WHERE `id` = "?s"', $_GET['topic'])->fetch_assoc(); if (($row['min_align'] == 0 && $row['max_align'] == 0) || ($user['align'] >= $row['min_align'] && $user['align'] <= $row['max_align']) || $user['admin'] == "1") { $top = $row['parent']; $parentCat = db::c()->query('SELECT * FROM `forum` WHERE `id` = ?i', $top)->fetch_assoc(); $icons = $row['icon']; ?>
query('SELECT `closepal`, `id` FROM `forum` WHERE `id` = "?s"', $_GET['topic'])->fetch_row(); if (((int)$par_top[1] != 0) || ((int)$_GET['konftop'] > 0)) { if ($row['close'] == 1) { $close = "Открыть"; $closed = 1; $closepal = $row['closepal']; } else { $close = "Закрыть"; } if ($row['fix'] == 1) { $fix = "Открепить"; } else { $fix = "Прикрепить"; } if ($dostupPal == true) { echo '
' . $close . ' | ' . $fix . '

'; echo "
"; if (isset($_POST['selectt'], $_POST['numt']) && $_POST['selectt'] != '' && $_POST['numt'] != '') { $error = "

Тема перемещена.

forum.php?topic=" . $_POST['numt'] . "&konftop=" . $_POST['selectt'] . ""; } } $pgs = db::c()->query('SELECT count(`id`) FROM `forum` WHERE `parent` = "?s"', $_GET['topic'])->fetch_assoc(); $pgs = $pgs[0] / 20; if ($pgs > 1) echo " Страницы : "; $pages_str = ''; $page = (int)$_GET['page'] > 0 ? (((int)$_GET['page'] + 1) > $pgs ? ($pgs - 1) : (int)$_GET['page']) : 0; $page = ceil($page); if ($pgs > 1) { for ($i = 0; $i < ceil($pgs); $i++) { if (($i > ($page - 5)) && ($i <= ($page + 4))) { $pages_str .= ($i == $page ? " " . ($i + 1) . "" : " " . ($i + 1) . ""); } } $pages_str .= ($page < $pgs - 5 ? " ..." : ""); $pages_str = ($page > 4 ? " « ... " : "") . $pages_str . (($page < ($pgs - 1) ? " » " : "")); } $FirstPage = (ceil($pgs) > 4 ? $_GET['page'] > 0 ? " Первая " : "" : ""); $LastPage = (ceil($pgs) > 4 ? (ceil($pgs) - 1) != $_GET['page'] ? " Последняя " : "" : ""); $pages_str = $FirstPage . $pages_str . $LastPage; echo $pages_str; if ($dostupSovet == true) $edit = ""; ?>
""
("")
"; echo " "; } echo "

"; echo " " . $row['text'] . "
"; $sort_type = 'ASC'; if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228043095) { $sort_type = 'DESC'; } if (empty($_GET['page'])) $_GET['page'] = ""; #$data = mysql_query("SELECT * FROM `forum` WHERE `parent` = '" . mysql_real_escape_string($_GET['topic']) . "' ORDER by `id` {$sort_type} LIMIT " . (int)($_GET['page'] * 20) . ",20"); $data = db::c()->query('SELECT * FROM `forum` WHERE `parent` = "?s" ORDER BY "?s" LIMIT ?i,20', $_GET['topic'], $sort_type, ($_GET['page'] * 20)); while ($row = $data->fetch_assoc()) { echo "
" . $row['author'] . " (" . $row['date'] . ") "; if ($dostupSovet == true) { $edit = ""; } if ($dostupPal == true && $news_topic == false) { echo " "; echo " "; } echo " $edit
"; echo " " . ($row['text']) . "
"; } if ($pgs > 1) { echo " Страницы : "; } echo $pages_str; $closed = ''; $closepal = ''; if (($closed == 1 && $_GET['topic'] != 228043095)) { echo "
" . $closepal . "


"; } else { if (empty($_GET['baned'])) $_GET['baned'] = 0; if ($user['align'] == 4 && $_GET['conf'] != 23) { $error = "

Персонажам со склонностью хаос запрещено писать на этом форуме!

"; } elseif ($user['baned'] == 1) { $error = "

Заблокированным персонажам запрещено писать на форуме!

"; } elseif ($user['level'] < 2) { $error = "

Персонажам до 2-го уровня запрещено писать на форуме!

"; } elseif (isset($sleep['id'])) { $error = "

Персонажам с заклинанием форумного молчания запрещено писать на форуме!

"; } elseif ($user['level'] > 1 && !isset($sleep['id'])) { ?>

Оставить комментарий


"; } } } else { echo "Тема удалена с форума, либо её не существует
"; } } } else { if (is_numeric($_GET['conf']) && $row = db::c()->query('SELECT * FROM `forum` WHERE `id` = ?i', $_GET['conf'])->fetch_assoc()) { if (($row['min_align'] == 0 && $row['max_align'] == 0) || ($user['align'] >= $row['min_align'] && $user['align'] <= $row['max_align']) || $dostupSovet) { ?>


'; $pgs = db::c()->query('SELECT count(`id`) FROM `forum` WHERE `parent` = ?i ORDER BY `fix` DESC, `updated` DESC', $_GET['conf'])->fetch_assoc(); $pgs = $pgs[0] / 20; $pages_str = ''; $page = (int)$_GET['page'] > 0 ? (((int)$_GET['page'] + 1) > $pgs ? ($pgs - 1) : (int)$_GET['page']) : 0; $page = ceil($page); if ($pgs > 1) { for ($i = 0; $i < ceil($pgs); $i++) { if (($i > ($page - 5)) && ($i <= ($page + 4))) { $pages_str .= ($i == $page ? " " . ($i + 1) . "" : " " . ($i + 1) . ""); } } $pages_str .= ($page < $pgs - 5 ? " ..." : ""); $pages_str = ($page > 4 ? " « ... " : "") . $pages_str . (($page < ($pgs - 1) ? " »" : "")); } $FirstPage = (ceil($pgs) > 4 ? $_GET['page'] > 0 ? " Первая " : "" : ""); $LastPage = (ceil($pgs) > 4 ? (ceil($pgs) - 1) != $_GET['page'] ? " Последняя " : "" : ""); $pages_str = $FirstPage . $pages_str . $LastPage; ?>
Страницы:
query('SELECT * FROM `forum` WHERE `parent` = "?s" ORDER BY `fix` DESC, `updated` DESC LIMIT ?i,20', $_GET['conf'], ($_GET['page'] * 20)); while ($row = $data->fetch_assoc()) { $logi = ''; $userlist = ''; $icons = $row['icon']; #$data2 = mysql_query("SELECT `author` FROM (SELECT `author`,`id` FROM `forum` WHERE `parent` = '" . mysql_real_escape_string($row['id']) . "' ORDER BY `id` DESC LIMIT 10) AS sTable ORDER BY id DESC LIMIT 1;"); $data2 = db::c()->query('SELECT `author` FROM (SELECT `author`,`id` FROM `forum` WHERE `parent` = ?i ORDER BY `id` DESC LIMIT 10) AS sTable ORDER BY id DESC', $row['id']); while ($row2 = $data2->fetch_assoc()) { $userlist = strip_tags($row2[0], ""); list ($username, $level) = split(" \[", $userlist); $logi .= $username; } $datacount = db::c()->query('SELECT count(*) AS CountNumber FROM `forum` WHERE `parent` = ?i', $row['id'])->fetch_assoc(); $count = $datacount["CountNumber"]; $lasttimedb = db::c()->query('SELECT `date` FROM `forum` WHERE `parent` = ?i ORDER BY `id` DESC', $row['id'])->fetch_assoc(); $lasttime = $lasttimedb['date']; echo "

" . ($row['fix'] ? "\"Закреплено\" " : "") . "" . ($i + 1) . "" : "" . ($i + 1) . ""); $pages_str1 .= ($page1 < $pgs1 - 5 ? " ..." : ""); } if ($pgs1 > 1) { $pages_str1 = "" . $pages_str1 . ""; } echo "'> {$row['topic']} " . $pages_str1 . " {$row['author']}"; if ($dostupPal == true && $row['id'] != 228043095) { echo " "; } echo "
" . $row['date'] . " " . strip_tags(substr($row['text'], 0, 250), "") . "
Ответов: " . $count . " (" . $lasttime . ")

"; } if ($pgs > 1) { echo "

Страницы :"; } echo $pages_str . "

"; if ($user['align'] == 4 && $_GET['conf'] != 23) { $error = "

Персонажам со склонностью хаос запрещено писать на этом форуме!

"; } elseif ($user['baned'] == 1) { $error = "

Заблокированным персонажам запрещено писать на форуме!

"; } elseif ($user['level'] < 2) { $error = "

Персонажам до 4-го уровня запрещено писать на форуме!

"; } elseif (isset($sleep['id'])) { $error = "

Персонажам с заклинанием форумного молчания запрещено писать на форуме!

"; } elseif ($user['level'] > 1 && !isset($sleep['id'])) { ?>

Добавить свой вопрос в форум


"; } } } else echo '
Ничего не найдено!
'; } ?>
    
 
(c) Ещё один клон БК...