"' . time() . '" AND `type` = "3" LIMIT 1')); 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 = ''; function nick3($id) { $user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '" . mysql_real_escape_string($id) . "' LIMIT 1")); $mm = ''; if (isset($user['id'])) { if ($user['baned'] == 1) { $mm .= ''; } if ($user['align'] > 0) { $mm .= ''; } if ($user['klan'] != '') { $mm .= ' '; } $mm .= '' . $user['login'] . ''; $mm .= ' [' . $user['level'] . ']'; } return $mm; } function ClanImage($clan_id) { $clanimg = mysql_fetch_assoc(mysql_query("SELECT `short` FROM `clans` WHERE `id` = '{$clan_id}' LIMIT 1")); if ($clanimg['short']) { $clanimg = $clanimg['short']; } else { $clanimg = "1x1"; } return $clanimg; } $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 "Игрок : " . nick3($user['id']) . "
"; } ?>
Конференции
= $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 = mysql_fetch_array(mysql_query("SELECT `min_align`, `max_align` FROM `forum` WHERE `id` = '" . mysql_real_escape_string($_GET['conf']) . "' LIMIT 1")); $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 = nick3($user['id']); } if ($dostupPal == true) { $text1 = $text1; } else { $text1 = strip_tags($text1, '
'); } mysql_query("INSERT INTO `forum` (`type`, `topic`, `text`, `parent`, `author`, `date`, `min_align`, `max_align`, `icon`) VALUES ('2', '" . mysql_real_escape_string($text2) . "', '" . $text1 . "', '" . mysql_real_escape_string($_GET['conf']) . "', '" . $userPost . "', '" . date('d.m.y H:i:s') . "', '" . mysql_real_escape_string($min_align) . "', '" . mysql_real_escape_string($max_align) . "', '" . mysql_real_escape_string($icon) . "')"); $topic_id = mysql_insert_id(); 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 = mysql_fetch_array(mysql_query("SELECT `min_align`,`max_align`, `close`, `parent` FROM `forum` WHERE `id` = '" . mysql_real_escape_string($_GET['topic']) . "' LIMIT 1")); $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 = nick3($user['id']); } if ($dostupPal == false) { $text1 = strip_tags($text1, '

'); } mysql_query("INSERT INTO `forum` (`type`, `topic`, `text`, `parent`, `author`, `date`, `min_align`, `max_align`) VALUES ('2', '" . mysql_real_escape_string($text2) . "', '" . $text1 . "', '" . mysql_real_escape_string($_GET['topic']) . "', '" . $userPost . "', '" . date("d.m.y H:i:s") . "', '" . mysql_real_escape_string($min_align) . "', '" . mysql_real_escape_string($max_align) . "')"); mysql_query('UPDATE `forum` SET `updated` = now() WHERE `id` = "' . mysql_real_escape_string($_GET['topic']) . '" LIMIT 1'); 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) { mysql_query("DELETE FROM `forum` WHERE `id` = '" . mysql_real_escape_string($_GET['dp']) . "' LIMIT 1"); mysql_query("DELETE FROM `forum` WHERE `parent` = '" . mysql_real_escape_string($_GET['dp']) . "'"); echo ""; exit(); } } if (isset($_GET['dt']) && $dostupPal == true) { if ($_GET['dt'] > 100) { mysql_query("DELETE FROM `forum` WHERE `id` = '" . mysql_real_escape_string($_GET['dt']) . "' LIMIT 1"); mysql_query("DELETE FROM `forum` WHERE `parent` = '" . mysql_real_escape_string($_GET['dt']) . "'"); echo ""; exit(); } } if (isset($_GET['com']) && isset($_GET['cpr']) && $dostupPal == true) { if ($user['invis'] == 1) { mysql_query("UPDATE `forum` SET `text` = CONCAT(`text`,'
Невидимка: " . mysql_real_escape_string($_GET['cpr']) . "') WHERE `id` = '" . mysql_real_escape_string($_GET['com']) . "' LIMIT 1"); } else { mysql_query("UPDATE `forum` SET `text` = CONCAT(`text`,'
" . mysql_real_escape_string(nick3($user['id'])) . ": " . mysql_real_escape_string($_GET['cpr']) . "') WHERE `id` = '" . mysql_real_escape_string($_GET['com']) . "' LIMIT 1"); } echo ""; exit(); } if (isset($_GET['do']) && $dostupPal == true) { if ($user['align'] >= 1.7 && $user['align'] < 2) { $palclose = 'паладином ' . nick3($user['id']); } elseif ((int)$user['admin'] == 1) { $palclose = 'Администрацией'; } if ($_GET['do'] == "open") { mysql_query("UPDATE `forum` SET `close` = '0' WHERE `id` = '" . mysql_real_escape_string($_GET['topic']) . "' LIMIT 1"); echo ""; exit(); } Обсуждение закрыто " . $palclose . " if ($_GET['do'] == "close") { mysql_query("UPDATE `forum` SET `close` = '1', `closepal` = 'Обсуждение закрыто " . $palclose . "' WHERE `id` = '" . mysql_real_escape_string($_GET['topic']) . "' LIMIT 1"); echo ""; exit(); } if ($_GET['do'] == "fix") { mysql_query("UPDATE `forum` SET `fix` = '1' WHERE `id` = '" . mysql_real_escape_string($_GET['topic']) . "' LIMIT 1"); echo ""; exit(); } if ($_GET['do'] == "unfix") { mysql_query("UPDATE `forum` SET `fix` = '0' WHERE `id` = '" . mysql_real_escape_string($_GET['topic']) . "' LIMIT 1"); echo ""; exit(); } } if (!isset($_GET['conf'])) { $row = mysql_fetch_array(mysql_query("SELECT * FROM `forum` WHERE `id` = '" . mysql_real_escape_string($_GET['topic']) . "'")); if (($row['min_align'] == 0 && $row['max_align'] == 0) || ($user['align'] >= $row['min_align'] && $user['align'] <= $row['max_align']) || $user['align'] == "1.99" || $user['align'] == 2.99) { $top = $row['parent']; $parentCat = mysql_fetch_array(mysql_query("SELECT * FROM `forum` WHERE `id` = '" . $top . "' LIMIT 1")); $icons = $row['icon']; ?>

Конференция ""

' . $error . ''; } ?>
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 = mysql_fetch_array(mysql_query("SELECT count(`id`) FROM `forum` WHERE `parent` = '" . mysql_real_escape_string($_GET['topic']) . "'")); $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 "
{$row['topic']} "; echo "
" . $row['author'] . "
(" . $row['date'] . ")
$edit "; if ($dostupPal == true && $news_topic == false) { echo " "; echo " "; } echo "

"; echo " " . $row['text'] . "
"; $sort_type = 'ASC'; if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228043095) { $sort_type = 'DESC'; } $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"); while ($row = mysql_fetch_array($data)) { 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 ($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 = mysql_fetch_array(mysql_query("SELECT * FROM `forum` WHERE `id` = '" . mysql_real_escape_string($_GET['conf']) . "'"))) { if (($row['min_align'] == 0 && $row['max_align'] == 0) || ($user['align'] >= $row['min_align'] && $user['align'] <= $row['max_align']) || $dostupSovet) { ?>


' . $error . ''; } ?> '; $pgs = mysql_fetch_array(mysql_query("SELECT count(`id`) FROM `forum` WHERE `parent` = '" . mysql_real_escape_string($_GET['conf']) . "' ORDER by `fix` DESC, `updated` DESC;")); $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; ?>
Страницы:

" . ($row['fix'] ? "\"Закреплено\" " : "") . " 0 ? (((int)$_GET['page'] + 1) > $pgs ? ($pgs - 1) : (int)$_GET['page']) : 0; $page1 = ceil($page1); if ($pgs1 > 1) { for ($i = 0; $i < ceil($pgs1); $i++) if (($i > ($page1 - 5)) && ($i <= ($page1 + 4))) $pages_str1 .= ($i == $page1 ? "" . ($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) Ещё один клон БК...