PHP Warning: Undefined array key

This commit is contained in:
Ivor Barhansky 2023-08-29 12:22:15 +03:00
parent 5f48c6f67d
commit 0e832dbbc2

View File

@ -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]);
@ -23,7 +23,7 @@ $url = explode('/', $url[0]);
<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;
@ -430,12 +429,14 @@ $url = explode('/', $url[0]);
}
//----------------------------------------- личный рейтинг
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') {
@ -505,6 +506,7 @@ $url = explode('/', $url[0]);
echo $html;
unset($html);
}
?>
</table>