PHP Warning: Undefined array key
This commit is contained in:
parent
5f48c6f67d
commit
0e832dbbc2
166
reting_pers.php
166
reting_pers.php
@ -8,7 +8,7 @@ require_once __DIR__ . DIRECTORY_SEPARATOR . '_incl_data/autoload.php';
|
||||
Config::init();
|
||||
Database::init();
|
||||
$u = User::start();
|
||||
|
||||
$url[2] = '';
|
||||
$url = explode('?', $_SERVER["REQUEST_URI"]);
|
||||
$url = explode('/', $url[0]);
|
||||
|
||||
@ -16,14 +16,14 @@ $url = explode('/', $url[0]);
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
<title>Рейтинг персонажей браузерной онлайн игры Новый «Бойцовский клуб»</title>
|
||||
<meta name="description"
|
||||
content="ТОП-лист персонажей в игре БК ? на сегодняшний день. Сильнейшие маги, критоувороты, увороты, силовики, криты и танки на проекте новый «Бойцовский клуб». "/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.4, maximum-scale=1.0, user-scalable=yes"/>
|
||||
<link rel="stylesheet" type="text/css" href="/i/main.css">
|
||||
<link href="/i/move/design3.css" rel="stylesheet" type="text/css">
|
||||
<style type="text/css">
|
||||
<style>
|
||||
<!--
|
||||
@import url(https://fonts.googleapis.com/css?family=Philosopher&subset=latin,cyrillic);
|
||||
|
||||
@ -153,8 +153,8 @@ $url = explode('/', $url[0]);
|
||||
function MM_preloadImages() { //v3.0
|
||||
var d = document;
|
||||
if (d.images) {
|
||||
if (!d.MM_p) d.MM_p = new Array();
|
||||
var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
|
||||
if (!d.MM_p) d.MM_p = [];
|
||||
let i, j = d.MM_p.length, a = MM_preloadImages.arguments;
|
||||
for (i = 0; i < a.length; i++)
|
||||
if (a[i].indexOf("#") != 0) {
|
||||
d.MM_p[j] = new Image;
|
||||
@ -164,12 +164,12 @@ $url = explode('/', $url[0]);
|
||||
}
|
||||
|
||||
function MM_swapImgRestore() { //v3.0
|
||||
var i, x, a = document.MM_sr;
|
||||
let i, x, a = document.MM_sr;
|
||||
for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
|
||||
}
|
||||
|
||||
function MM_findObj(n, d) { //v4.01
|
||||
var p, i, x;
|
||||
let p, i, x;
|
||||
if (!d) d = document;
|
||||
if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
|
||||
d = parent.frames[n.substring(p + 1)].document;
|
||||
@ -183,8 +183,8 @@ $url = explode('/', $url[0]);
|
||||
}
|
||||
|
||||
function MM_swapImage() { //v3.0
|
||||
var i, j = 0, x, a = MM_swapImage.arguments;
|
||||
document.MM_sr = new Array;
|
||||
let i, j = 0, x, a = MM_swapImage.arguments;
|
||||
document.MM_sr = [];
|
||||
for (i = 0; i < (a.length - 2); i += 3)
|
||||
if ((x = MM_findObj(a[i])) != null) {
|
||||
document.MM_sr[j++] = x;
|
||||
@ -240,10 +240,9 @@ $url = explode('/', $url[0]);
|
||||
|
||||
<!-- Begin of text -->
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
<style>
|
||||
.rating, .rating tr, .rating tr td {
|
||||
font-family: Times New Roman;
|
||||
font-family: Georgia, Times, "Times New Roman", serif;
|
||||
font-size: 14px;
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
@ -273,7 +272,7 @@ $url = explode('/', $url[0]);
|
||||
}
|
||||
|
||||
.rating .p {
|
||||
padding: 0px 5px 0px 5px;
|
||||
padding: 0 5px 0 5px;
|
||||
}
|
||||
|
||||
.rating .btop {
|
||||
@ -312,7 +311,7 @@ $url = explode('/', $url[0]);
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
font-family: Times New Roman;
|
||||
font-family: Georgia, Times, "Times New Roman", serif;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin: 10px auto 5px;
|
||||
@ -359,7 +358,7 @@ $url = explode('/', $url[0]);
|
||||
$sp = mysql_query(
|
||||
'SELECT * FROM `aaa_reting_list` WHERE `date` = ' . date(
|
||||
'dmY'
|
||||
) . ' ORDER BY '.$bya.' LIMIT 10'
|
||||
) . ' ORDER BY ' . $bya . ' LIMIT 10'
|
||||
);
|
||||
|
||||
|
||||
@ -430,81 +429,84 @@ $url = explode('/', $url[0]);
|
||||
}
|
||||
|
||||
//----------------------------------------- личный рейтинг
|
||||
$spu = mysql_query(
|
||||
'SELECT * FROM `aaa_reting_list` WHERE `date` = "' . date(
|
||||
'dmY'
|
||||
) . '" AND `uid` = "' . $u->info['id'] . '" ORDER BY ' . $bya . ' LIMIT 1'
|
||||
);
|
||||
if ($u->info) {
|
||||
$spu = mysql_query(
|
||||
'SELECT * FROM `aaa_reting_list` WHERE `date` = "' . date(
|
||||
'dmY'
|
||||
) . '" AND `uid` = "' . $u->info['id'] . '" ORDER BY ' . $bya . ' LIMIT 1'
|
||||
);
|
||||
|
||||
while ($pl = mysql_fetch_array($spu)) {
|
||||
//
|
||||
if ($url[2] != 'exp' && $url[2] != 'wins') {
|
||||
$last_post = mysql_fetch_array(
|
||||
|
||||
while ($pl = mysql_fetch_array($spu)) {
|
||||
//
|
||||
if ($url[2] != 'exp' && $url[2] != 'wins') {
|
||||
$last_post = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `pos` FROM `aaa_reting_list` WHERE `uid` = "' . $pl['uid'] . '" AND `date` != "' . $pl['date'] . '" ORDER BY `id` DESC LIMIT 1'
|
||||
)
|
||||
);
|
||||
}
|
||||
//
|
||||
$i++;
|
||||
$vid = $pl['pos'];
|
||||
if (isset($last_post['pos']) && $url[2] != 'exp' && $url[2] != 'wins') {
|
||||
$last_post = $last_post['pos'];
|
||||
if ($last_post < $pl['pos']) {
|
||||
$vid = '<img src="//img.new-combats.tech/down_red.png" height="16"> <b>' . $pl['pos'] . '</b> <sup style=\'color:red;\'>-' . ($pl['pos'] - $last_post) . '</sup>';
|
||||
} elseif ($last_post > $pl['pos']) {
|
||||
$vid = '<img src="//img.new-combats.tech/up_green.png" height="16"> <b>' . $pl['pos'] . '</b> <sup style=\'color:green;\'>+' . ($last_post - $pl['pos']) . '</sup>';
|
||||
}
|
||||
}
|
||||
//
|
||||
$html .= "<tr style='border-right: 0px; border-left: 0px;'><td style='border-right: 0px; border-left: 0px;'><b style='color:red;'><big>Ваш рейтинг:</big></b></td><td style='border-right: 0px; border-left: 0px;'></td><td style='border-right: 0px; border-left: 0px;'></td><td style='border-right: 0px; border-left: 0px;'></td></tr>";
|
||||
$usr = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `pos` FROM `aaa_reting_list` WHERE `uid` = "' . $pl['uid'] . '" AND `date` != "' . $pl['date'] . '" ORDER BY `id` DESC LIMIT 1'
|
||||
'SELECT `id`,`login`,`level`,`align`,`align2`,`clan` FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
}
|
||||
//
|
||||
$i++;
|
||||
$vid = $pl['pos'];
|
||||
if (isset($last_post['pos']) && $url[2] != 'exp' && $url[2] != 'wins') {
|
||||
$last_post = $last_post['pos'];
|
||||
if ($last_post < $pl['pos']) {
|
||||
$vid = '<img src="//img.new-combats.tech/down_red.png" height="16"> <b>' . $pl['pos'] . '</b> <sup style=\'color:red;\'>-' . ($pl['pos'] - $last_post) . '</sup>';
|
||||
} elseif ($last_post > $pl['pos']) {
|
||||
$vid = '<img src="//img.new-combats.tech/up_green.png" height="16"> <b>' . $pl['pos'] . '</b> <sup style=\'color:green;\'>+' . ($last_post - $pl['pos']) . '</sup>';
|
||||
$clrt = '';
|
||||
if ('id' . $usr['id'] == $url[2]) {
|
||||
$clrt = ' bgcolor="#c3a878"';
|
||||
}
|
||||
$html .= "<tr" . $clrt . "><td class='vam p' style='font-size: 14pt;'><b>" . $vid . "</b><a name='" . $usr['id'] . "' /></td>
|
||||
<td class='vam al' style='padding-left: 20px;'><img src='//img.new-combats.tech/i/align/align" . $usr['align'] . ".gif' />";
|
||||
if ($usr['align2'] > 0) {
|
||||
$html .= '<img src="//img.new-combats.tech/i/align/align' . $usr['align2'] . '.gif" /> ';
|
||||
}
|
||||
if ($usr['clan'] > 0) {
|
||||
$html .= '<img src="//img.new-combats.tech/i/clan/' . $usr['clan'] . '.gif" /> ';
|
||||
}
|
||||
$html .= '<b>' . $usr['login'] . '</b> [' . $usr['level'] . '] <a href="/info/' . $usr['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" /></a></td>
|
||||
';
|
||||
if ($url[2] != 'exp' && $url[2] != 'wins') {
|
||||
$html .= '<td class=\'vam p\' style=\'font-size: 14pt;\'><b>' . round(
|
||||
$pl['global'], 2
|
||||
) . '</b></td>';
|
||||
} else {
|
||||
$html .= '<td class=\'vam p\' style=\'font-size: 14pt;\'>' . round(
|
||||
$pl['global'], 2
|
||||
) . '</td>';
|
||||
}
|
||||
|
||||
if ($url[2] == 'exp') {
|
||||
$html .= '<td class=\'vam p\' style=\'font-size: 14pt;\'><b>' . number_format(
|
||||
$pl['exp_real'], 0, ",", " "
|
||||
) . '</b></td></tr>';
|
||||
} elseif ($url[2] == 'wins') {
|
||||
$html .= '<td class=\'vam p\' style=\'font-size: 14pt;\'><b>' . number_format(
|
||||
$pl['win'], 0, ",", " "
|
||||
) . '</b></td></tr>';
|
||||
} else {
|
||||
$html .= '<td class=\'vam p\' style=\'font-size: 14pt;\'>' . number_format(
|
||||
$pl['exp_real'], 0, ",", " "
|
||||
) . '</td></tr>';
|
||||
}
|
||||
}
|
||||
//
|
||||
$html .= "<tr style='border-right: 0px; border-left: 0px;'><td style='border-right: 0px; border-left: 0px;'><b style='color:red;'><big>Ваш рейтинг:</big></b></td><td style='border-right: 0px; border-left: 0px;'></td><td style='border-right: 0px; border-left: 0px;'></td><td style='border-right: 0px; border-left: 0px;'></td></tr>";
|
||||
$usr = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`login`,`level`,`align`,`align2`,`clan` FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
$clrt = '';
|
||||
if ('id' . $usr['id'] == $url[2]) {
|
||||
$clrt = ' bgcolor="#c3a878"';
|
||||
}
|
||||
$html .= "<tr" . $clrt . "><td class='vam p' style='font-size: 14pt;'><b>" . $vid . "</b><a name='" . $usr['id'] . "' /></td>
|
||||
<td class='vam al' style='padding-left: 20px;'><img src='//img.new-combats.tech/i/align/align" . $usr['align'] . ".gif' />";
|
||||
if ($usr['align2'] > 0) {
|
||||
$html .= '<img src="//img.new-combats.tech/i/align/align' . $usr['align2'] . '.gif" /> ';
|
||||
}
|
||||
if ($usr['clan'] > 0) {
|
||||
$html .= '<img src="//img.new-combats.tech/i/clan/' . $usr['clan'] . '.gif" /> ';
|
||||
}
|
||||
$html .= '<b>' . $usr['login'] . '</b> [' . $usr['level'] . '] <a href="/info/' . $usr['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" /></a></td>
|
||||
';
|
||||
if ($url[2] != 'exp' && $url[2] != 'wins') {
|
||||
$html .= '<td class=\'vam p\' style=\'font-size: 14pt;\'><b>' . round(
|
||||
$pl['global'], 2
|
||||
) . '</b></td>';
|
||||
} else {
|
||||
$html .= '<td class=\'vam p\' style=\'font-size: 14pt;\'>' . round(
|
||||
$pl['global'], 2
|
||||
) . '</td>';
|
||||
}
|
||||
|
||||
if ($url[2] == 'exp') {
|
||||
$html .= '<td class=\'vam p\' style=\'font-size: 14pt;\'><b>' . number_format(
|
||||
$pl['exp_real'], 0, ",", " "
|
||||
) . '</b></td></tr>';
|
||||
} elseif ($url[2] == 'wins') {
|
||||
$html .= '<td class=\'vam p\' style=\'font-size: 14pt;\'><b>' . number_format(
|
||||
$pl['win'], 0, ",", " "
|
||||
) . '</b></td></tr>';
|
||||
} else {
|
||||
$html .= '<td class=\'vam p\' style=\'font-size: 14pt;\'>' . number_format(
|
||||
$pl['exp_real'], 0, ",", " "
|
||||
) . '</td></tr>';
|
||||
}
|
||||
|
||||
echo $html;
|
||||
unset($html);
|
||||
}
|
||||
|
||||
|
||||
echo $html;
|
||||
unset($html);
|
||||
?>
|
||||
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user