当前位置: 首页>>代码示例>>PHP>>正文


PHP check_bitrix_sessid函数代码示例

本文整理汇总了PHP中check_bitrix_sessid函数的典型用法代码示例。如果您正苦于以下问题:PHP check_bitrix_sessid函数的具体用法?PHP check_bitrix_sessid怎么用?PHP check_bitrix_sessid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了check_bitrix_sessid函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: process

 /**
  * Main filtering loop also sets up global vars GET POST COOKIE and some $_SERVER keys
  */
 public function process()
 {
     global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_REQUEST_VARS;
     if ($this->currentUserHaveRightsForSkip()) {
         if ($_SERVER["REQUEST_METHOD"] === "POST" && check_bitrix_sessid() && empty($_POST['____SECFILTER_CONVERT_JS'])) {
             return;
         }
     }
     //Do not touch those variables who did not come from REQUEST
     $this->cleanGlobals();
     $originalPostVars = $_POST;
     $_GET = $this->safeizeArray($_GET, '$_GET');
     $_POST = $this->safeizeArray($_POST, '$_POST', '/^File\\d+_\\d+$/');
     $_COOKIE = $this->safeizeArray($_COOKIE, '$_COOKIE');
     $_SERVER = $this->safeizeServerArray($_SERVER);
     $_REQUEST = $_GET;
     foreach ($_POST as $k => $v) {
         $_REQUEST[$k] = $v;
     }
     foreach ($_COOKIE as $k => $v) {
         $_REQUEST[$k] = $v;
     }
     $HTTP_GET_VARS = $_GET;
     $HTTP_POST_VARS = $_POST;
     $HTTP_COOKIE_VARS = $_COOKIE;
     $HTTP_REQUEST_VARS = $_REQUEST;
     $this->restoreGlobals();
     $this->doPostProccessActions($originalPostVars);
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:32,代码来源:filter.php

示例2: checkToken

 /**
  * @return $this
  */
 protected function checkToken()
 {
     if (!check_bitrix_sessid('token_sid')) {
         $this->sendJsonResponse(array('status' => 'error_token_sid', 'token_sid' => bitrix_sessid()), 403);
     }
     return $this;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:10,代码来源:class.php

示例3: checkRequest

 protected function checkRequest()
 {
     if (!$this->getUser() || !$this->getUser()->getId() || !$this->getUser()->IsAuthorized() || $_SERVER['REQUEST_METHOD'] !== 'POST' || !check_bitrix_sessid() || !$this->helper->checkRights()) {
         $this->sendJsonAccessDeniedResponse();
     }
     $action = isset($_REQUEST['action']) && is_string($_REQUEST['action']) ? strtolower($_REQUEST['action']) : '';
     if (empty($action)) {
         $this->errors[] = array('code' => 0, 'message' => GetMessage('CRM_PRODUCT_SECTION_TREE_AJAX_ERROR_EMPTY_ACTION'));
     }
     if (!$this->errors) {
         switch ($action) {
             case 'getinitialtree':
             case 'getsubsections':
                 $this->action = $action;
                 $catalogId = isset($_REQUEST['catalogId']) ? intval($_REQUEST['catalogId']) : 0;
                 if ($catalogId <= 0) {
                     $this->errors[] = array('code' => 0, 'message' => GetMessage('CRM_PRODUCT_SECTION_TREE_AJAX_ERROR_REQUIRED_PARAMETER', array('#PARAM#' => 'catalogId')));
                 }
                 $this->catalogId = $catalogId;
                 $sectionId = isset($_REQUEST['sectionId']) ? intval($_REQUEST['sectionId']) : 0;
                 if ($sectionId <= 0) {
                     $this->errors[] = array('code' => 0, 'message' => GetMessage('CRM_PRODUCT_SECTION_TREE_AJAX_ERROR_REQUIRED_PARAMETER', array('#PARAM#' => 'sectionId')));
                 }
                 $this->sectionId = $sectionId;
                 break;
             default:
                 $this->errors[] = array('code' => 0, 'message' => GetMessage('CRM_PRODUCT_SECTION_TREE_AJAX_ERROR_UNKNOWN_ACTION', array('#ACTION#' => $_REQUEST['action'])));
         }
     }
     if ($this->errors) {
         $this->sendJsonErrorResponse();
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:33,代码来源:ajax.php

示例4: toEdit

 /**
  * @return array
  */
 protected function toEdit()
 {
     /** @global CUser $USER */
     global $USER;
     if (!$USER->IsAuthorized()) {
         return array('status' => 'error', 'error' => 'auth_error');
     }
     if (!check_bitrix_sessid()) {
         return array('status' => 'error', 'error' => 'sessid_check_failed');
     }
     if ($this->request['action'] !== 'otp_check_activate') {
         return array('status' => 'error', 'error' => 'unknown_action');
     }
     if (!CModule::includeModule('security')) {
         return array('status' => 'error', 'error' => 'security_not_installed');
     }
     try {
         $otp = Otp::getByUser($USER->getid());
         $binarySecret = pack('H*', $this->request->getPost('secret'));
         $otp->regenerate($binarySecret)->syncParameters($this->request->getPost('sync1'), $this->request->getPost('sync2'))->save();
         return array('status' => 'ok');
     } catch (\Bitrix\Security\Mfa\OtpException $e) {
         return array('status' => 'error', 'error' => $e->getMessage());
     }
 }
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:28,代码来源:class.php

示例5: OnBeforeProlog

	public static function OnBeforeProlog()
	{
		if (CSecuritySystemInformation::isCliMode())
			return;

		if(CSecurityFilterMask::Check(SITE_ID, $_SERVER["REQUEST_URI"]))
			return;

		if(self::currentUserHaveRightsForSkip())
		{
			if(
				check_bitrix_sessid()
				&& (
					!isset($_POST['____SECFILTER_CONVERT_JS'])
					|| !$_POST['____SECFILTER_CONVERT_JS']
				)
			)
			{
				return;
			}
		}

		$filter = new CSecurityFilter;
		$filter->process();
	}
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:25,代码来源:filter.php

示例6: execute

 public static function execute()
 {
     global $USER;
     $result = array();
     $error = false;
     if (!CModule::IncludeModule('voximplant')) {
         $error = 'Module voximplant is not installed.';
     } else {
         if (!is_object($USER) || !$USER->IsAuthorized()) {
             $error = GetMessage('ACCESS_DENIED');
         } else {
             if (!CVoxImplantMain::CheckAccess()) {
                 $error = GetMessage('ACCESS_DENIED');
             } else {
                 if (!check_bitrix_sessid()) {
                     $error = GetMessage('ACCESS_DENIED');
                 } else {
                     if ($_REQUEST["act"] == "edit") {
                         $result = self::executeEditPhones($error);
                     } else {
                         if ($_REQUEST["act"] == "getInfo") {
                             $result = self::executeGetInfo($error);
                         } else {
                             if ($_REQUEST["act"] == "option") {
                                 $result = self::executeSaveOption($error);
                             }
                         }
                     }
                 }
             }
         }
     }
     self::returnJson(array_merge(array('result' => $error === false ? 'ok' : 'error', 'error' => CharsetConverter::ConvertCharset($error, SITE_CHARSET, 'UTF-8')), $result));
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:34,代码来源:ajax.php

示例7: checkParams

    /**
     * проверяет заполнение обязательных параметров
     * @throws SystemException
     */
    protected function checkParams()
    {
        if ($this -> arParams['IBLOCK_ID'] <= 0)
            throw new Main\ArgumentNullException('IBLOCK_ID');

        if (check_bitrix_sessid())
        {
            return false;
        }
    }
开发者ID:akniyev,项目名称:arteva.ru,代码行数:14,代码来源:class.php

示例8: __construct

 public function __construct($title, $iblockId)
 {
     global $APPLICATION;
     $this->iblock_id = intVal($iblockId);
     \CModule::IncludeModule("iblock");
     if ($_REQUEST['work_start'] && check_bitrix_sessid()) {
         $this->lastID = intVal($_REQUEST['lastid']);
     }
     $this->arSelect = array("ID", "NAME", "CODE", "IBLOCK_ID");
     $this->title = $title;
     $APPLICATION->SetTitle($this->title);
 }
开发者ID:OpenBX,项目名称:obx.core,代码行数:12,代码来源:iblockassistant.php

示例9: ShowPanel

 function ShowPanel()
 {
     global $USER, $APPLICATION;
     if (defined("ADMIN_SECTION") && ADMIN_SECTION == true) {
         return;
     }
     if ($USER->IsAdmin()) {
         if ($_REQUEST['add_new_site_sol'] == 'sol' && check_bitrix_sessid()) {
             $dbrSites = CSite::GetList($by, $ord);
             $arSitesID = array();
             $arSitesPath = array();
             $siteCnt = 0;
             while ($arSite = $dbrSites->Fetch()) {
                 if ($arSite["ACTIVE"] == "Y") {
                     $siteCnt++;
                 }
                 $arSitesID[] = strtolower($arSite["ID"]);
                 $arSitesPath[] = strtolower($arSite["PATH"]);
             }
             $newSiteID = "";
             while (true) {
                 $newSiteID = chr(rand(ord("a"), ord("z"))) . chr(rand(ord("a"), ord("z")));
                 if (!in_array($newSiteID, $arSitesID) && !in_array("/site" . $newSiteID . "/", $arSitesPath) && !file_exists($_SERVER['DOCUMENT_ROOT'] . "/site" . $newSiteID)) {
                     break;
                 }
             }
             $culture = CultureTable::getRow(array('filter' => array("=FORMAT_DATE" => FORMAT_DATE, "=FORMAT_DATETIME" => FORMAT_DATETIME, "=FORMAT_NAME" => CSite::GetDefaultNameFormat(), "=CHARSET" => SITE_CHARSET)));
             if ($culture) {
                 $cultureId = $culture["ID"];
             } else {
                 $addResult = CultureTable::add(array("NAME" => $newSiteID, "CODE" => $newSiteID, "FORMAT_DATE" => FORMAT_DATE, "FORMAT_DATETIME" => FORMAT_DATETIME, "FORMAT_NAME" => CSite::GetDefaultNameFormat(), "CHARSET" => SITE_CHARSET));
                 $cultureId = $addResult->getId();
             }
             $arFields = array("LID" => $newSiteID, "ACTIVE" => "Y", "SORT" => 100, "DEF" => "N", "NAME" => $newSiteID, "DIR" => "/site_" . $newSiteID . "/", "SITE_NAME" => $newSiteID, "SERVER_NAME" => $_SERVER["SERVER_NAME"], "EMAIL" => COption::GetOptionString("main", "email_from"), "LANGUAGE_ID" => LANGUAGE_ID, "DOC_ROOT" => "", "CULTURE_ID" => $cultureId);
             $obSite = new CSite();
             $result = $obSite->Add($arFields);
             if ($result) {
                 LocalRedirect("/bitrix/admin/wizard_install.php?lang=" . LANGUAGE_ID . "&wizardName=bitrix:portal&wizardSiteID=" . $newSiteID . "&" . bitrix_sessid_get());
             } else {
                 echo $obSite->LAST_ERROR;
             }
         }
         $arMenu = array(array("ACTION" => "jsUtils.Redirect([], '" . CUtil::JSEscape(SITE_DIR) . "?add_new_site_sol=sol&" . bitrix_sessid_get() . "')", "TEXT" => "<b>" . GetMessage("SOL_BUTTON_TEST_TEXT", array("#BR#" => " ")) . "</b>", "TITLE" => GetMessage("SOL_BUTTON_TEST_TITLE")));
         $arSites = array();
         $dbrSites = CSite::GetList($by, $ord, array("ACTIVE" => "Y"));
         while ($arSite = $dbrSites->GetNext()) {
             $arSites[] = array("ACTION" => "jsUtils.Redirect([], '" . CUtil::JSEscape($arSite["DIR"]) . "');", "ICON" => $arSite["LID"] == SITE_ID ? "checked" : "", "TEXT" => $arSite["NAME"], "TITLE" => GetMessage("SOL_BUTTON_GOTOSITE") . " " . $arSite["NAME"]);
         }
         $arMenu[] = array("SEPARATOR" => true);
         $arMenu[] = array("TEXT" => GetMessage("SOL_BUTTON_GOTOSITE"), "MENU" => $arSites);
         $APPLICATION->AddPanelButton(array("HREF" => SITE_DIR . "?add_new_site_sol=sol&" . bitrix_sessid_get(), "ID" => "solutions_wizard", "ICON" => "bx-panel-install-solution-icon", "TYPE" => "BIG", "ALT" => GetMessage("SOL_BUTTON_TEST_TITLE"), "TEXT" => GetMessage("SOL_BUTTON_TEST_TEXT"), "MAIN_SORT" => 2520, "SORT" => 20, "MENU" => $arMenu, 'HINT' => array('TITLE' => str_replace('#BR#', ' ', GetMessage("SOL_BUTTON_TEST_TEXT")), 'TEXT' => GetMessage('SOL_BUTTON_TEST_TEXT_HINT')), 'HINT_MENU' => array('TITLE' => str_replace('#BR#', ' ', GetMessage("SOL_BUTTON_TEST_TEXT")), 'TEXT' => GetMessage('SOL_BUTTON_TEST_MENU_HINT'))));
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:53,代码来源:panel_button.php

示例10: DoUninstall

 public function DoUninstall()
 {
     if (!check_bitrix_sessid()) {
         return false;
     }
     UnRegisterModule($this->MODULE_ID);
     $modPath = $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/" . $this->MODULE_ID . "/install/components";
     $comPath = $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components";
     DeleteDirFiles($modPath, $comPath);
     DeleteDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/" . $this->MODULE_ID . "/install/images", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/images/maxposter");
     LocalRedirect("partner_modules.php?lang=" . LANGUAGE_ID);
     return true;
 }
开发者ID:ASDAFF,项目名称:Bitrix-Module,代码行数:13,代码来源:index.php

示例11: Run

 public function Run()
 {
     if ($_REQUEST['work_start'] && check_bitrix_sessid()) {
         if ($this->bCallback) {
             call_user_func($this->callback, $this);
         } else {
             $this->executeStep();
         }
         echo $this->getCurrentStatusString();
         die;
     }
     $GLOBALS['assistant_filter'] = $this->getFilterHtml();
 }
开发者ID:OpenBX,项目名称:obx.core,代码行数:13,代码来源:basicassistant.php

示例12: OnBeforePrologHandler

function OnBeforePrologHandler(){
    global $USER_FIELD_MANAGER;
    if (isset($_REQUEST['action_button']) && !isset($_REQUEST['action'])) {
			$_REQUEST['action'] = $_REQUEST['action_button'];
		}
		if (!isset($_REQUEST['action'])) {
			return;
		}
    $BID = (isset($_REQUEST['ID']) ? (int)$_REQUEST['ID'] : 0);
    if ($_REQUEST['action']=='parsing_in_list' && check_bitrix_sessid() &&
			\CModule::IncludeModule('iblock')) {
        ParserActions::doParsing($BID,$_REQUEST['IBLOCK_ID']);
    }
}
开发者ID:ASDAFF,项目名称:bitrix_parser,代码行数:14,代码来源:parser_actions.php

示例13: executeComponent

 public function executeComponent()
 {
     /** @global CMain $APPLICATION */
     global $APPLICATION;
     $action = $this->request['action'];
     $isEdit = $this->request->isPost() && $action && check_bitrix_sessid();
     if ($isEdit) {
         $this->arResult = $this->toEdit($action);
     } else {
         $APPLICATION->SetTitle(Loc::getMessage("SECURITY_USER_RECOVERY_CODES_TITLE"));
         $this->arResult = $this->toView($action);
     }
     $this->doPostAction($isEdit, $action);
 }
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:14,代码来源:class.php

示例14: CModuleOptions

 public function CModuleOptions($module_id, $arTabs, $arGroups, $arOptions, $need_access_tab = false)
 {
     $this->module_id = $module_id;
     $this->arTabs = $arTabs;
     $this->arGroups = $arGroups;
     $this->arOptions = $arOptions;
     $this->need_access_tab = $need_access_tab;
     if ($need_access_tab) {
         $this->arTabs[] = array('DIV' => 'edit_access_tab', 'TAB' => 'Права доступа', 'ICON' => '', 'TITLE' => 'Настройка прав доступа');
     }
     if ($_REQUEST['update'] == 'Y' && check_bitrix_sessid()) {
         $this->SaveOptions();
         if ($this->need_access_tab) {
             $this->SaveGroupRight();
         }
     }
     $this->GetCurOptionValues();
 }
开发者ID:Black-Core-Sec,项目名称:sd,代码行数:18,代码来源:CModuleOptions.php

示例15: executeComponent

 public function executeComponent()
 {
     /** @global CMain $APPLICATION */
     global $APPLICATION;
     $action = $this->request['action'];
     $isEdit = $this->request->isPost() && $action && check_bitrix_sessid();
     if ($isEdit) {
         $result = $this->toEdit($action);
         $result = CSecurityJsonHelper::encode($result);
         $APPLICATION->RestartBuffer();
         header('Content-Type: application/json', true);
         echo $result;
         die;
     } else {
         $APPLICATION->SetTitle(Loc::getMessage("SECURITY_USER_RECOVERY_CODES_TITLE"));
         $this->arResult = $this->toView($action);
         $this->IncludeComponentTemplate($this->templatePage);
     }
 }
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:19,代码来源:class.php


注:本文中的check_bitrix_sessid函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。