Больше бреда богу бреда!

This commit is contained in:
lopar 2018-02-13 23:05:30 +02:00
parent d149b3c381
commit c4def8fa3c

192
forum.php
View File

@ -1,4 +1,4 @@
<?
<?php
session_start();
include('config.php');
@ -71,14 +71,14 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//Dtd HTML 4.01 transitional//EN">
<!DOCTYPE HTML>
<html>
<head>
<title>Форум Бойцовского клуба</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/forum.css"/>
<link rel="stylesheet" type="text/css" href="css/wysibb/theme/default/wbbtheme.css"/>
<link type='text/css' href='css/contact.css' rel='stylesheet' media='screen'/>
<link rel="stylesheet" href="css/forum.css"/>
<link rel="stylesheet" href="css/wysibb/theme/default/wbbtheme.css"/>
<link rel='stylesheet' href="css/contact.css" media='screen'/>
<script type="text/javascript" language="JavaScript" src="js/jquery.min.js"></script>
<script type="text/javascript" language="JavaScript" src="js/jquery.wysibb-1.3.0.js"></script>
<script type="text/javascript" language="JavaScript" src='js/forum.js'></script>
@ -87,11 +87,10 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="i/register/sitebk_02.jpg" scope="col">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign=top>
<td align="center">
<a href="index.php" title="Главная Бойцовского клуба"><img src="static/images/logo/290x187.png" width="290"
height="187" border="0"/></a>
<a href="/"> на главную</a>
</td>
</tr>
</table>
@ -103,88 +102,21 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
var $wsize = document.body.clientWidth;
if ($wsize >= 800) $wsize = Math.floor($wsize * 0.8);
document.write('<table cellspacing="0" cellpadding="0" bgcolor="#f2e5b1" border="0" width="' + ($wsize - 20 ) + '">');
function drwfl(name, id, level, align, klan) {
var s = '';
if (align && align != "0" && align != '') {
s += '<img src="i/align_' + align + '.gif" width=12 height=15 />';
}
if (klan) {
s += '<img src="i/klan/' + kln + '.gif" width="24" height="15" />';
}
s += '&nbsp;<b>' + name + '</b>';
if (level > 0 && level != '') {
s += "&nbsp;[" + level + "]";
}
if (id > 1 && id != '') {
s += '&nbsp;<a href="/inf.php?' + id + '" target="_blank"><img src="i/inf.gif" width="12" height="11" /></a>';
}
document.write(s);
}
function add_cites($leaf_id) {
var $full_div = $("div#leaf" + $leaf_id);
var $athor = $full_div.text();
var $clean;
$clean = $athor.replace(/drwfl\(([^)]+)\)/, '');
var $user = /[^\[]+\[\d+\]/.exec($clean);
if (!$user) {
$user = /[^\(]+/.exec($clean);
} else {
$user = ('' + $user).replace(/\(.*/, '');
}
;
$user = ('' + $user).replace(/\s+$/, '');
$user = ('' + $user).replace(/^\s+/, '');
var $time = /[\([\d\.:\s]+\)/.exec($clean);
var $user_time_text = $user + " " + $time + "\n";
var $text = $("span", $full_div).text();
$text = $text.replace(/&gt;/g, ">");
$text = $text.replace(/&lt;/g, "<");
$text = $text.replace(/&nbsp;\s?/g, " ");
$text = $text.replace(/<br\s*\/?>/ig, '\n');
$text = $user_time_text + $text;
$text = $text.replace(/\s+$/g, '').replace(/^/mg, "> ");
if (/^\s+$/.test($("#answer").val())) {
$("#answer").val('');
}
;
$("#answer").val($("#answer").val() + "[quote]\r\n" + $text + "[/quote]\n\n");
$("#answer").focus();
}
$(function () {
$("a.cite").show();
return false;
});
<? if($dostupPal == true) { ?>
function replasetopic(reptopic, numtopic) {
objSel = document.getElementById('seltopic' + numtopic);
if (reptopic != objSel.options[objSel.selectedIndex].value) {
document.getElementById('selectt').value = objSel.options[objSel.selectedIndex].value;
document.getElementById('numt').value = numtopic;
document.repltopic.submit();
}
}
<? } ?>
</script>
</td>
</tr>
<tr valign="top">
<td width="29" rowspan="2" background="i/register/n21_08_1.jpg">
<td width="29" rowspan="2">
<p><img src="i/register/fr_08.jpg" width="29" height="256" alt=""/></p>
</td>
<td style="background: url('i/register/fr_04.jpg') left top no-repeat;" width="200">
<br/>
<?
<?php
if (!$user['id']) {
echo "<b>Не авторизованы</b><br />";
} else {
@ -194,7 +126,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
<br/>
<b><span style="color: #8f0000;font-family: arial;font-size: 10pt;">Конференции</span></b>
<br/>
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="i/register/ram12_34.gif">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" scope="col">
<img src="i/register/ram12_33.gif" width="12" height="11" alt=""/>
@ -205,7 +137,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
</td>
</tr>
</table>
<?
<?php
if (isset($_POST['selectt'], $_POST['numt']) && $_POST['selectt'] != '' && $_POST['numt'] != '') {
$AlignTop = mysql_fetch_array(mysql_query('SELECT `min_align`, `max_align` FROM `forum` WHERE `id` = "' . mysql_real_escape_string($_POST['selectt']) . '" LIMIT 1'));
@ -220,7 +152,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
$replasepost = '';
if ((isset($_GET['conf']) && is_numeric($_GET['conf'])) || (isset($_GET['konftop']) && is_numeric($_GET['konftop'])) || $Movemess == 1) {
$data = mysql_query("SELECT * FROM `forum` WHERE `parent` = 0 AND `type` = 1 ORDER by `id` ASC");
$data = mysql_query("SELECT * FROM `forum` WHERE `parent` = 0 AND `type` = 1 ORDER BY `id` ASC");
while ($row = mysql_fetch_array($data)) {
if ($row['id'] == 228043095) {
$news_topic = true;
@ -257,7 +189,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
<br/>
</td>
<td rowspan="2" style="padding-left: 10;">
<?
<?php
function parse_bb_code($text)
{
@ -550,7 +482,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
echo "<script>window.location='?topic=" . $_GET['topic'] . "&rnd'</script>";
exit();
}
<font color=red>Обсуждение закрыто " . $palclose . "</font>
if ($_GET['do'] == "close") {
mysql_query("UPDATE `forum` SET `close` = '1', `closepal` = '<font color=red>Обсуждение закрыто " . $palclose . "</font>' WHERE `id` = '" . mysql_real_escape_string($_GET['topic']) . "' LIMIT 1");
echo "<script>window.location='?topic=" . $_GET['topic'] . "&rnd'</script>";
@ -649,7 +581,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
<img height=15 src=\"i/forum/icon{$icons}.gif\" width=15 border=0 /><a href='?'>{$row['topic']}</a>
</span>";
echo "<div class=\"auth_str\">" . $row['author'] . "
<div class=\"date_abs\">(" . $row['date'] . ")</div> <a href='#' class='cite' onclick=\"javascript:add_cites({$row['id']});\" title=\"Цитата\">
<div class=\"date_abs\">(" . $row['date'] . ")</div> <a href='#' class='cite' onclick=\"add_cites({$row['id']});\" title=\"Цитата\">
<img src=\"i/forum/icon13.gif\" />
</a>
$edit
@ -705,7 +637,8 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
echo "<img src=i/ico/news.gif width=\"16\" height=\"16\" /> Страницы : ";
}
echo $pages_str;
$closed=''; $closepal='';
$closed = '';
$closepal = '';
if (($closed == 1 && $_GET['topic'] != 228043095)) {
echo "<br /><div align=center>" . $closepal . "</div><br /><br />";
@ -741,10 +674,10 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
<td align="center">
<textarea class="inup" id="answer" rows="12" name="text"
cols="84" wrap="virtual"
onselect="javascript: storeCaret(this);"
onclick="javascript: storeCaret(this);"
onkeyup="javascript: storeCaret(this);"
onchange="javascript: storeCaret(this);"></textarea>
onselect="storeCaret(this);"
onclick="storeCaret(this);"
onkeyup="storeCaret(this);"
onchange="storeCaret(this);"></textarea>
</td>
</tr>
</table>
@ -799,7 +732,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
echo '<br />';
$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 = 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;
@ -817,33 +750,34 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
$LastPage = (ceil($pgs) > 4 ? (ceil($pgs) - 1) != $_GET['page'] ? "<a href='?conf=" . $_GET['conf'] . "&konftop=" . htmlspecialchars($_GET['conf']) . "&page=" . (ceil($pgs) - 1) . "'> Последняя </a>" : "" : "");
$pages_str = $FirstPage . $pages_str . $LastPage;
?>
<table width=100% cellspacing=5 cellpadding=5>
<tr>
<td><img src="i/ico/news.gif" width="16" height="16" /> Страницы:<?=$pages_str?></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="i/register/ram12_34.gif">
<tr>
<td align="left" scope="col"><img src="i/register/ram12_33.gif" width="12" height="11" /></td>
<td scope="col"></td>
<td width="18" align="right" scope="col"><img src="i/register/ram12_35.gif" width="13" height="11" /></td>
</tr>
</table>
<table width=100% cellspacing=5 cellpadding=5>
<tr>
<td><img src="i/ico/news.gif" width="16" height="16"/> Страницы:<?= $pages_str ?></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="i/register/ram12_34.gif">
<tr>
<td align="left" scope="col"><img src="i/register/ram12_33.gif" width="12" height="11"/></td>
<td scope="col"></td>
<td width="18" align="right" scope="col"><img src="i/register/ram12_35.gif" width="13" height="11"/>
</td>
</tr>
</table>
<?php
$data = mysql_query("SELECT * FROM `forum` WHERE `parent` = '" . mysql_real_escape_string($_GET['conf']) . "' ORDER by `fix` DESC, `updated` DESC LIMIT " . (INT)($_GET['page'] * 20) . ",20;");
$data = mysql_query("SELECT * FROM `forum` WHERE `parent` = '" . mysql_real_escape_string($_GET['conf']) . "' ORDER BY `fix` DESC, `updated` DESC LIMIT " . (INT)($_GET['page'] * 20) . ",20;");
while ($row = mysql_fetch_array($data)) {
$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 = 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;");
while ($row2 = mysql_fetch_array($data2)) {
$userlist = strip_tags($row2[0], "");
list ($username, $level) = split(" \[", $userlist);
$logi .= $username;
}
$datacount = mysql_fetch_array(mysql_query("SELECT count(*) as CountNumber FROM `forum` WHERE `parent` = '" . mysql_real_escape_string($row['id']) . "';"));
$datacount = mysql_fetch_array(mysql_query("SELECT count(*) AS CountNumber FROM `forum` WHERE `parent` = '" . mysql_real_escape_string($row['id']) . "';"));
$count = $datacount["CountNumber"];
$lasttimedb = mysql_fetch_array(mysql_query("SELECT `date` FROM `forum` WHERE `parent` = '" . mysql_real_escape_string($row['id']) . "' ORDER by `id` DESC LIMIT 1;"));
$lasttimedb = mysql_fetch_array(mysql_query("SELECT `date` FROM `forum` WHERE `parent` = '" . mysql_real_escape_string($row['id']) . "' ORDER BY `id` DESC LIMIT 1;"));
$lasttime = $lasttimedb['date'];
echo "<div class=\"mBodyBlock rounded rc6\">
<p class=pleft>" . ($row['fix'] ? "<IMG src=\"i/ico/fixed.gif\" alt=\"Закреплено\" title=\"Закреплено\" border=0> " : "") . "<a href='?topic=" . $row['id'];
@ -905,12 +839,8 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
<table>
<tr>
<td colspan="2">
<h4>Добавить свой вопрос в форум</h4>Тема сообщения <input type="text"
class="inup"
name="title"
size="57"
maxlength="65"
value=""/>
<h4>Добавить свой вопрос в форум</h4>
<input type="text" class="inup" name="title" size="57" maxlength="65" placeholder="Тема сообщения">
</td>
</tr>
<tr>
@ -920,46 +850,18 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
onselect="storeCaret(this);"
onclick="storeCaret(this);"
onkeyup="storeCaret(this);"
onchange="storeCaret(this);"></textarea>
onchange="storeCaret(this);" placeholder="Введите сообщение..."></textarea>
<input type=hidden value=0 name=n>
<input type=hidden value=1025804759 name=id>
<input type=hidden name=redirect>
</td>
</tr>
<INPUT type=hidden value=0 name=n>
<INPUT type=hidden value=1025804759 name=id>
<INPUT type=hidden name=redirect>
<tr>
<td colspan="2">
<table width="100%">
<tr>
<td>
<input type="radio" name="icon" value="13" checked><img
src="i/forum/icon13.gif" height="15" width="15"> &nbsp;
<input type="radio" name="icon" value="14"><img
src="i/forum/icon14.gif" height="15" width="15"> &nbsp;
<input type="radio" name="icon" value="6"><img
src="i/forum/icon6.gif" height="15" width="15"> &nbsp;
<input type="radio" name="icon" value="9"><img
src="i/forum/icon9.gif" height="15" width="15"> &nbsp;
<input type="radio" name="icon" value="1"><img
src="i/forum/icon1.gif" height="15" width="15"> &nbsp;
<input type="radio" name="icon" value="10"><img
src="i/forum/icon10.gif" height="15" width="15"> &nbsp;
<input type="radio" name="icon" value="11"><img
src="i/forum/icon11.gif" height="15" width="15"><br/>
<input type="radio" name="icon" value="12"><img
src="i/forum/icon12.gif" height="15" width="15"> &nbsp;
<input type="radio" name="icon" value="2"><img
src="i/forum/icon2.gif" height="15" width="15"> &nbsp;
<input type="radio" name="icon" value="3"><img
src="i/forum/icon3.gif" height="15" width="15"> &nbsp;
<input type="radio" name="icon" value="4"><img
src="i/forum/icon4.gif" height="15" width="15"> &nbsp;
<input type="radio" name="icon" value="5"><img
src="i/forum/icon5.gif" height="15" width="15"> &nbsp;
<input type="radio" name="icon" value="7"><img
src="i/forum/icon7.gif" height="15" width="15"> &nbsp;
<input type="radio" name="icon" value="8"><img
src="i/forum/icon8.gif" height="15" width="15">
<br/>
<input type="hidden" name="icon" value="13">
</td>
<td align="right">
<input type="submit" class="btn" value="Добавить" name="add"/>
@ -1014,7 +916,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
</tr>
</table>
<? if ($dostupPal == true) { ?>
<?php if ($dostupPal == true) { ?>
<form name='repltopic' method='post' action="">
<input type='hidden' id='selectt' name='selectt'/>
<input type='hidden' id='numt' name='numt'/>