online fix
This commit is contained in:
parent
072057d86c
commit
f0ede8a311
@ -33,7 +33,7 @@ if ($username && $password) {
|
|||||||
$_SESSION['sid'] = session_id();
|
$_SESSION['sid'] = session_id();
|
||||||
|
|
||||||
$onl = db::c()->query('SELECT user_id FROM online WHERE user_id = "?s"', $data['id'])->fetch_assoc();
|
$onl = db::c()->query('SELECT user_id FROM online WHERE user_id = "?s"', $data['id'])->fetch_assoc();
|
||||||
if (isset($onl['id'])) {
|
if (isset($onl['user_id'])) {
|
||||||
db::c()->query('UPDATE online SET date = ?i WHERE user_id = "?s"', time(), $data['id']);
|
db::c()->query('UPDATE online SET date = ?i WHERE user_id = "?s"', time(), $data['id']);
|
||||||
} else {
|
} else {
|
||||||
db::c()->query('INSERT INTO online (user_id, date, room) VALUES (?i, ?i, ?i)', $data['id'], time(), $data['room']);
|
db::c()->query('INSERT INTO online (user_id, date, room) VALUES (?i, ?i, ?i)', $data['id'], time(), $data['room']);
|
||||||
|
Loading…
Reference in New Issue
Block a user