2024-01-13 03:24:42 +03:00
|
|
|
<?php
|
|
|
|
// Start session as any user
|
2023-08-30 05:16:15 +03:00
|
|
|
// ATTENTION: FOR DEBUG PURPOSES ONLY!
|
2023-10-31 21:57:17 +03:00
|
|
|
|
2024-01-13 03:24:42 +03:00
|
|
|
|
|
|
|
|
|
|
|
if ($IS_FRONTEND)
|
|
|
|
die("this file must not be included!");
|
|
|
|
|
2023-10-31 21:57:17 +03:00
|
|
|
// Includes
|
2023-08-30 05:16:15 +03:00
|
|
|
require_once("../_auth.php");
|
|
|
|
require_once("../_utils.php");
|
2023-10-31 21:57:17 +03:00
|
|
|
require_once("../_errorslist.php");
|
2023-08-30 05:16:15 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-31 21:57:17 +03:00
|
|
|
if (Utils_ThisFileIsRequested(__FILE__)) {
|
2023-08-30 05:16:15 +03:00
|
|
|
require_once("../_json.php");
|
|
|
|
|
|
|
|
if (!$Config["debug"])
|
2023-10-31 21:57:17 +03:00
|
|
|
JSON_ReturnError(code: E_UNS_INTERNAL, desc: "you need to enable debug mode in configuration file first");
|
2023-08-30 05:16:15 +03:00
|
|
|
|
|
|
|
if (!isset($_REQUEST["id"]))
|
2023-12-20 06:08:13 +03:00
|
|
|
JSON_ReturnError(code: E_UIN_INSUFARGS, desc: "valid id must be specified");
|
2023-08-30 05:16:15 +03:00
|
|
|
|
|
|
|
$_SESSION["userid"] = intval($_REQUEST["id"]);
|
2023-10-31 21:57:17 +03:00
|
|
|
JSON_ReturnData($_SESSION);
|
2023-08-30 05:16:15 +03:00
|
|
|
}
|
|
|
|
?>
|