Идиотская неработающая проверка.

This commit is contained in:
Igor Barkov (iwork) 2020-09-30 16:00:53 +03:00
parent 2f723e02b8
commit 823817728e
5 changed files with 21 additions and 7 deletions

View File

@ -1,7 +1,9 @@
<?php
session_start();
if (!($_SESSION['uid'] >0)) header("Location: index.php");
if (empty($_SESSION['uid'])) {
header("Location: index.php");
exit;
}
include "config.php";
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
$in_haos = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_status` WHERE `id` = '{$user['id']}' LIMIT 1;"));
@ -104,7 +106,7 @@
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '601',`online`.`room` = '601' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
mysql_query("UPDATE `cit_haos_status` SET room='1' WHERE id = '{$user['id']}'; ");
header('location: c_haos_in.php');
};
}
}
$in_haos = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_status` WHERE `id` = '{$user['id']}' LIMIT 1;"));
?>

View File

@ -1,7 +1,10 @@
<?php
session_start();
if (!($_SESSION['uid'] >0)) header("Location: index.php");
if (empty($_SESSION['uid'])) {
header("Location: index.php");
exit;
}
include "config.php";
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
$in_haos = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_status` WHERE `id` = '{$user['id']}' LIMIT 1;"));

View File

@ -1,7 +1,10 @@
<?php
session_start();
if (!($_SESSION['uid'] >0)) header("Location: index.php");
if (empty($_SESSION['uid'])) {
header("Location: index.php");
exit;
}
include "config.php";
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
$in_park = mysql_fetch_array(mysql_query("SELECT * FROM `cit_park` WHERE `id` = '{$user['id']}' LIMIT 1;"));

View File

@ -1,7 +1,10 @@
<?php
session_start();
if (!($_SESSION['uid'] >0)) header("Location: index.php");
if (empty($_SESSION['uid'])) {
header("Location: index.php");
exit;
}
include "config.php";

View File

@ -1,7 +1,10 @@
<?php
session_start();
if (!($_SESSION['uid'] >0)) header("Location: index.php");
if (empty($_SESSION['uid'])) {
header("Location: index.php");
exit;
}
include "config.php";
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
include "functions.php";