allerta-vvf/server/online_check.php

18 lines
324 B
PHP
Raw Normal View History

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();
$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)) {
$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
}
?>