Your IP : 18.224.57.152


Current Path : /var/www/www-root/data/webdav/www/www.monolith-realty.ru/bitrix/modules/main/public/
Upload File :
Current File : /var/www/www-root/data/webdav/www/www.monolith-realty.ru/bitrix/modules/main/public/session.php

<?php
/**
 * @global CUser $USER
 */
define("NO_KEEP_STATISTIC", true);
define("NOT_CHECK_FILE_PERMISSIONS", true);

require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");

$status = "SESSION_EXPIRED";

if(check_bitrix_sessid())
{
	//still the same session
	$status = "OK";
}
elseif($USER->IsAuthorized())
{
	//the user got a new session, but has authorized by the stored cookie
	//change the sessid so the user can post a form successfully
	$request = \Bitrix\Main\Context::getCurrent()->getRequest();

	if($request->getCookie("UIDH") <> '')
	{
		$sessid = \Bitrix\Main\UI\SessionExpander::getSignedValue($request["k"]);
		if($sessid !== false)
		{
			bitrix_sessid_set($sessid);
			$status = "SESSION_CHANGED";
		}
	}
}

echo $status;
\Bitrix\Main\Application::getInstance()->end();