more tests

This commit is contained in:
Igor Barkov (iwork) 2020-07-03 16:27:31 +03:00
parent 62d497149d
commit ff7d7ac86d

View File

@ -3,13 +3,13 @@ session_start();
require_once 'functions.php';
$login = urldecode(filter_input(INPUT_SERVER, 'QUERY_STRING'));
$uid = isset($_SESSION['uid']) ? $_SESSION['uid'] : null;
$uid = $_SESSION['uid'] ?? null;
//$user = db::c()->query('SELECT `id`,`login`,`married`,`win`,borndate,`align`,`admin`,`realname`,`info`,`prof1`,`prof2`,`email`,`ip`,`exp`,`stats`,`money`,`room`,`doblest`
// FROM `users`
// WHERE `login` = "?s" OR `id` = "?s"', $login, $login)->fetch_assoc();
$user = new User($_SESSION['uid']);
$own = db::c()->query('SELECT `align`,`admin` FROM `users` WHERE `id` = "?s"', $uid)->fetch_assoc();
$presents = db::c()->query('SELECT img, sender FROM `users_presents` WHERE expiration_date >= "?s" AND owner = ?i', date('Y-m-d'), $user['id']);
$presents = db::c()->query('SELECT img, sender FROM `users_presents` WHERE expiration_date >= "?s" AND owner = ?i', date('Y-m-d'), $user->id);
if (empty($user->id)): ?>
<!doctype html>