2023-08-30 05:16:15 +03:00
|
|
|
<?php // Start session as any user
|
|
|
|
// ATTENTION: FOR DEBUG PURPOSES ONLY!
|
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-10-31 21:57:17 +03:00
|
|
|
JSON_ReturnError(code: E_UIN_WRONGID, desc: "valid id must be specified");
|
2023-08-30 05:16:15 +03:00
|
|
|
|
|
|
|
if (!isset($_SESSION["userid"]))
|
|
|
|
session_start();
|
|
|
|
|
|
|
|
$_SESSION["userid"] = intval($_REQUEST["id"]);
|
2023-10-31 21:57:17 +03:00
|
|
|
JSON_ReturnData($_SESSION);
|
2023-08-30 05:16:15 +03:00
|
|
|
}
|
|
|
|
?>
|