2020-04-27 23:27:39 +02:00
|
|
|
<?php
|
2020-09-01 23:08:25 +02:00
|
|
|
require 'core.php';
|
2020-04-27 23:27:39 +02:00
|
|
|
|
|
|
|
init_class();
|
2020-10-05 23:32:39 +02:00
|
|
|
$user->requirelogin(false);
|
2020-09-01 23:08:25 +02:00
|
|
|
$id = $user->auth->getUserId();
|
|
|
|
$time = time();
|
2020-04-27 23:27:39 +02:00
|
|
|
|
2020-11-13 18:57:47 +01:00
|
|
|
if(!is_null($id)) {
|
2021-05-03 23:29:27 +02:00
|
|
|
$db->update(
|
|
|
|
DB_PREFIX."_profiles",
|
|
|
|
["online_time" => $time],
|
|
|
|
["id" => $id]
|
|
|
|
);
|
2020-11-13 18:57:47 +01:00
|
|
|
echo(json_encode(["id" => $id, "time" => $time, "sql" => $sql]));
|
2020-04-27 23:27:39 +02:00
|
|
|
}
|
|
|
|
?>
|