fix rest api, need to change every variable to readable

This commit is contained in:
Ibnu Maksum
2024-04-01 13:01:21 +07:00
parent ee73621c85
commit 254fd4ccf7
4 changed files with 26 additions and 16 deletions

View File

@ -32,10 +32,14 @@ class Admin
global $db_password;
if (isset($aid)) {
$time = time();
setcookie('aid', $aid . '.' . $time . '.' . sha1($aid . '.' . $time . '.' . $db_password), time() + 86400 * 7);
$token = $aid . '.' . $time . '.' . sha1($aid . '.' . $time . '.' . $db_password);
setcookie('aid', $token, time() + 86400 * 7);
return $token;
}
return '';
}
public static function removeCookie()
{
if (isset($_COOKIE['aid'])) {