Common code errors

This commit is contained in:
Igor Barkov [iwork] 2018-10-31 19:26:27 +02:00
parent 24acbd0d87
commit 9bc2a99b94

View File

@ -91,7 +91,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>
<b><span style="color: #8f0000;font-family: arial,serif;font-size: 10pt;">Конференции</span></b>
<br/>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
@ -155,7 +155,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
</table>
<br/>
</td>
<td rowspan="2" style="padding-left: 10;">
<td rowspan="2" style="padding-left: 10px;">
<?php
function parse_bb_code($text)
@ -423,10 +423,11 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
if (isset($_GET['com']) && isset($_GET['cpr']) && $dostupPal == true) {
if ($user['invis'] == 1) {
mysql_query("UPDATE `forum` SET `text` = CONCAT(`text`,'<br /><font color=red><b>Невидимка</b>: " . mysql_real_escape_string($_GET['cpr']) . "</font>') WHERE `id` = '" . mysql_real_escape_string($_GET['com']) . "' LIMIT 1");
$addText = "<br /><b>Невидимка</b>: " . $_GET['cpr'];
} else {
mysql_query("UPDATE `forum` SET `text` = CONCAT(`text`,'<br /><font color=red>" . mysql_real_escape_string(nick::id($user['id'])->full(1)) . ": " . mysql_real_escape_string($_GET['cpr']) . "</font>') WHERE `id` = '" . mysql_real_escape_string($_GET['com']) . "' LIMIT 1");
$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 "<script>window.location='?topic=" . $_GET['topic'] . "&rnd'</script>";
exit();
}
@ -520,7 +521,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
$pages_str = $FirstPage . $pages_str . $LastPage;
echo $pages_str;
if ($dostupSovet == true) $edit = "<a href=\"javascript:void(0);\" class='contact' id=\"{$row[id]}\"><img src=\"i/forum/edit.png\" /></a>";
if ($dostupSovet == true) $edit = "<a href=\"javascript:void(0);\" class='contact' id=\"{$row['id']}\"><img src=\"i/forum/edit.png\" /></a>";
?>
<div class="rc6 mBodyBlock" id="leaf<?= $row['id'] ?>">
@ -553,17 +554,17 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
}
#$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);
$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 "<div class=\"rc6 mBodyBlock\" id=\"leaf{$row['id']}\"><div ><div class=\"mesTopBar\">
<table width=\"100%\" >
<tr>
<td>
" . $row['author'] . " <font class=\"date\">(" . $row['date'] . ")</font>
" . $row['author'] . " <span class=\"date\">(" . $row['date'] . ")</span>
";
if ($dostupSovet == true) {
$edit = "<a href=\"javascript:void(0);\" class='contact' id=\"{$row[id]}\"><img src=\"i/forum/edit.png\" /></a>";
$edit = "<a href=\"javascript:void(0);\" class='contact' id=\"{$row['id']}\"><img src=\"i/forum/edit.png\" /></a>";
}
if ($dostupPal == true && $news_topic == false) {
@ -572,7 +573,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
}
echo " </td>
<td align='right'>
<a href='javascript:void(0);' class='quote_btn' onclick='return add_cites(\"{$row[id]}\");' alt=\"Цитата\" title=\"Цитата\">
<a href='javascript:void(0);' class='quote_btn' onclick='return add_cites(\"{$row['id']}\");' alt=\"Цитата\" title=\"Цитата\">
<img src=\"i/forum/icon13.gif\" />
</a>
$edit
@ -667,7 +668,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
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) {
?>
<td rowspan="2" style="padding-left: 10">
<td rowspan="2" style="padding-left: 10px">
<br/>
@ -758,7 +759,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
echo " <a href='?conf={$_GET['conf']}&dt={$row['id']}'><img src='i/clear.gif'></a>";
}
echo "<br /><span class=date>" . $row['date'] . "</span><font class=dsc> " . strip_tags(substr($row['text'], 0, 250), "") . "</font>
echo "<br /><span class=date>" . $row['date'] . "</span><span class=dsc> " . strip_tags(substr($row['text'], 0, 250), "") . "</span>
<br /><small>Ответов: <b>" . $count . "</b> <span title=\"Последний ответ: " . $logi . "\" style=\"border-bottom:1px dashed grey;cursor:help;font-size:10px;\">(" . $lasttime . ")</span></small>
</p></div>";
}
@ -841,13 +842,13 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
}
?>
<!-- End of text -->
<td style='padding-left: 3' align="right"><img src="i/register/forumru_03.jpg" width="139" height="144"
<td style='padding-left: 3px' align="right"><img src="i/register/forumru_03.jpg" width="139" height="144"
border="0"></td>
<td valign="top" background="i/register/nnn21_03_1.jpg">&nbsp;&nbsp;&nbsp;&nbsp;</td>
</tr>
<tr valign="top">
<td></td>
<td align="right" valign="center" style="padding-bottom:50"><img src="i/register/fr_15.jpg" width="128"
<td align="right" valign="center" style="padding-bottom:50px"><img src="i/register/fr_15.jpg" width="128"
height="236" border="0"></td>
<td width="23" valign="top" background="i/register/nnn21_03_1.jpg">&nbsp;</td>
</tr>