本文整理汇总了PHP中check_freetrix_sessid函数的典型用法代码示例。如果您正苦于以下问题:PHP check_freetrix_sessid函数的具体用法?PHP check_freetrix_sessid怎么用?PHP check_freetrix_sessid使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了check_freetrix_sessid函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
<?
define("NO_KEEP_STATISTIC", true);
define("NO_AGENT_STATISTIC", true);
define("NOT_CHECK_PERMISSIONS", true);
require($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_before.php");
$res = false;
if($USER->IsAuthorized() && check_freetrix_sessid())
{
$uid = $USER->GetID();
$isAdmin = $USER->CanDoOperation('edit_other_settings');
switch ($_REQUEST["action"])
{
case "save_filter":
CUtil::decodeURIComponent($_POST);
$arFields = array(
"USER_ID" => $uid,
"FILTER_ID" => $_POST['filter_id'],
"NAME" => $_POST["name"],
"LANGUAGE_ID" => LANG
);
$arFields["FIELDS"] = $_POST['fields'];
if(isset($_POST['common']))
$arFields["COMMON"] = $isAdmin ? $_POST['common'] : "N";
示例2: intval
$arFilter[$arr["FID"]."_0"] = ${"find_".$arr["FID"]."_0"};
}
elseif ($arr["FILTER_TYPE"]=="text")
{
$arFilter[$arr["FID"]] = ${"find_".$arr["FID"]};
$exact_match = (${"find_".$arr["FID"]."_exact_match"}=="Y") ? "Y" : "N";
$arFilter[$arr["FID"]."_exact_match"] = $exact_match;
}
else $arFilter[$arr["FID"]] = ${"find_".$arr["FID"]};
}
}
}
}
// если была нажата кнопка "—охранить изменени¤"
if (strlen($save)>0 && $REQUEST_METHOD=="POST" && (check_freetrix_sessid() || defined("FORM_NOT_CHECK_SESSID")))
{
// обновл¤ем записи
if (isset($RESULT_ID) && is_array($RESULT_ID))
{
foreach ($RESULT_ID as $rid)
{
$rid = intval($rid);
$var_STATUS_PREV = "STATUS_PREV_".$rid;
$var_STATUS = "STATUS_".$rid;
if (intval($$var_STATUS)>0 && $$var_STATUS_PREV!=$$var_STATUS)
{
CFormResult::SetStatus($rid, $$var_STATUS);
}
}
}
示例3: IncludeModuleLangFile
$isAdmin = $USER->CanDoOperation('edit_php');
IncludeModuleLangFile(__FILE__);
if(
$_SERVER['REQUEST_METHOD'] == 'POST'
&& $_POST["ajax"] === "y"
)
{
CUtil::JSPostUnescape();
require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_js.php");
if(
$_POST['query'] <> ''
&& $isAdmin
&& check_freetrix_sessid()
)
{
echo "<h2>".GetMessage("php_cmd_result")."</h2><p>";
eval($_POST['query']);
echo "</p>";
}
require($_SERVER["DOCUMENT_ROOT"].FX_ROOT."/modules/main/include/epilog_admin_js.php");
die();
}
$APPLICATION->SetTitle(GetMessage("php_cmd_title"));
require($_SERVER["DOCUMENT_ROOT"].FX_ROOT."/modules/main/include/prolog_admin_after.php");
?>
示例4: GetMessage
<?if(!check_freetrix_sessid()) return;?>
<?
IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/form/install/install.php");
$err_mess = "FILE: ".__FILE__."<br>LINE: ";
if($errors === false):
echo CAdminMessage::ShowNote(GetMessage("MOD_UNINST_OK"));
else:
for($i=0; $i<count($errors); $i++)
$alErrors .= $errors[$i]."<br>";
echo CAdminMessage::ShowMessage(Array("TYPE"=>"ERROR", "MESSAGE" =>GetMessage("MOD_UNINST_ERR"), "DETAILS"=>$alErrors, "HTML"=>true));
endif;
?>
<form action="<?echo $APPLICATION->GetCurPage()?>">
<input type="hidden" name="lang" value="<?echo LANG?>">
<input type="submit" name="" value="<?echo GetMessage("MOD_BACK")?>">
</form>
示例5: GetMessage
if ($arResult["USER"]["LAST_LOGIN"] != '') {
$arResult["MESSAGE_TEXT"] .= GetMessage("CC_MAIN_REG_INIT_MESSAGE_AUTH_SUCCESS") . "<br>";
$arResult["MESSAGE_CODE"][] = "E30";
} elseif ($arResult["USER"]["ACTIVE"] !== "Y") {
$arResult["MESSAGE_TEXT"] .= GetMessage("CC_MAIN_REG_INIT_MESSAGE_INACTIVE") . "<br>";
$arResult["MESSAGE_CODE"][] = "E03";
}
$salt = substr($arResult["USER"]["CHECKWORD"], 0, 8);
if ($arResult["~CHECKWORD"] == '') {
$arResult["MESSAGE_TEXT"] .= GetMessage("CC_MAIN_REG_INIT_MESSAGE_CHECKWORD_EMPTY") . "<br>";
$arResult["MESSAGE_CODE"][] = "E04";
} elseif ($arResult["USER"]["CONFIRM_CODE"] != $arResult["~CHECKWORD"] && $arResult["USER"]["CHECKWORD"] != $salt . md5($salt . $arResult["~CHECKWORD"])) {
$arResult["MESSAGE_TEXT"] .= GetMessage("CC_MAIN_REG_INIT_MESSAGE_CHECKWORD_WRONG");
$arResult["MESSAGE_CODE"][] = "E05";
}
if (empty($arResult["MESSAGE_CODE"]) && $_SERVER["REQUEST_METHOD"] == "POST" && strlen($_POST["confirm"]) > 0 && check_freetrix_sessid()) {
$arResult["USER"]["NAME"] = trim($_POST["NAME"]);
$arResult["USER"]["LAST_NAME"] = trim($_POST["LAST_NAME"]);
$arResult["USER"]["WORK_COMPANY"] = trim($_POST["WORK_COMPANY"]);
$arResult["USER"]["WORK_PHONE"] = trim($_POST["WORK_PHONE"]);
$arResult["PASSWORD"] = $_POST["PASSWORD"];
$arResult["CONFIRM_PASSWORD"] = $_POST["CONFIRM_PASSWORD"];
if ($arResult["USER"]["NAME"] == '') {
$arResult["MESSAGE_TEXT"] .= GetMessage("CC_MAIN_REG_INIT_MESSAGE_NAME_EMPTY") . "<br>";
$arResult["MESSAGE_CODE"][] = "E21";
$arResult["SHOW_FORM"] = true;
}
if ($arResult["USER"]["LAST_NAME"] == '') {
$arResult["MESSAGE_TEXT"] .= GetMessage("CC_MAIN_REG_INIT_MESSAGE_LAST_NAME_EMPTY") . "<br>";
$arResult["MESSAGE_CODE"][] = "E22";
$arResult["SHOW_FORM"] = true;
示例6: GetAccessArrTmp
function GetAccessArrTmp($path)
{
global $DOC_ROOT;
$io = CBXVirtualIo::GetInstance();
if($io->DirectoryExists($DOC_ROOT.$path))
{
@include($io->GetPhysicalName($DOC_ROOT.$path."/.access.php"));
return $PERM;
}
return Array();
}
// let's get array of access rights for whole folder
$CUR_PERM = GetAccessArrTmp($arParsedPath["PREV"]);
if($REQUEST_METHOD=="POST" && strlen($save)>0 && strlen($propeditmore)<=0 && check_freetrix_sessid())
{
$bNeedSectionFile = False;
$strSectionName = "";
if(strlen($sectionname)>0)
{
$strSectionName = "\$sSectionName = \"".CFileMan::EscapePHPString($sectionname)."\";\n";
$bNeedSectionFile = True;
}
$strDirProperties = "\$arDirProperties = array(\n";
$numpropsvals = IntVal($numpropsvals);
$bNeedComma = False;
for($i = 0; $i<$numpropsvals; $i++)
{
示例7: replacer
<?php
require $_SERVER["DOCUMENT_ROOT"] . "/freetrix/modules/main/include/prolog_admin_before.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/freetrix/modules/fileman/prolog.php";
if (!$USER->CanDoOperation('fileman_edit_existent_files') || !check_freetrix_sessid()) {
die;
}
require $_SERVER["DOCUMENT_ROOT"] . "/freetrix/modules/fileman/include.php";
require $_SERVER["DOCUMENT_ROOT"] . "/freetrix/modules/fileman/admin/fileman_spellChecker.php";
function replacer($str)
{
$str = CFileMan::SecurePathVar($str);
$str = preg_replace("/[^a-zA-Z0-9_\\.-\\+]/is", "_", $str);
return $str;
}
$word = isset($_POST['word']) ? $_POST['word'] : false;
$lang = replacer(isset($_GET['BXLang']) ? $_GET['BXLang'] : 'en');
$use_pspell = isset($_GET['use_pspell']) ? $_GET['use_pspell'] : true;
$use_custom_spell = isset($_GET['use_custom_spell']) ? $_GET['use_custom_spell'] : true;
$SC = new spellChecker();
$path = replacer($_SERVER["DOCUMENT_ROOT"] . COption::GetOptionString('fileman', "user_dics_path", "/freetrix/modules/fileman/u_dics"));
if (!is_dir($path)) {
mkdir($path, FX_DIR_PERMISSIONS);
}
$lang_path = $path . '/' . $lang;
if (!is_dir($lang_path)) {
mkdir($lang_path, FX_DIR_PERMISSIONS);
}
if (COption::GetOptionString('fileman', "use_separeted_dics", "Y") == "Y") {
$user_path = $lang_path . '/' . $USER->GetID();
if (!is_dir($user_path)) {
示例8: define
<?
define("NOT_CHECK_PERMISSIONS", true);
require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_before.php");
if(!CModule::IncludeModule("catalog"))
{
return;
}
if ($_SERVER["REQUEST_METHOD"]=="POST" && strlen($_POST["action"])>0 && check_freetrix_sessid())
{
$APPLICATION->RestartBuffer();
switch ($_POST["action"])
{
case "catalogSetAdd2Basket":
if (is_array($_POST["set_ids"]))
{
foreach($_POST["set_ids"] as $itemID)
{
$product_properties = true;
if (!empty($_POST["setOffersCartProps"]))
{
$product_properties = CIBlockPriceTools::GetOfferProperties(
$itemID,
$_POST["iblockId"],
$_POST["setOffersCartProps"]
);
}
$ratio = 1;
if ($_POST["itemsRatio"][$itemID])
示例9: require_once
<?
require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_before.php");
require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/fileman/prolog.php");
if (!$USER->CanDoOperation('fileman_view_file_structure') && !$USER->CanDoOperation('edit_other_settings'))
$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/fileman/include.php");
require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/fileman/classes/general/snippets.php");
if(CModule::IncludeModule("compression"))
CCompress::Disable2048Spaces();
if (isset($_GET['target']) && check_freetrix_sessid())
{
switch ($_GET['target'])
{
case "load":
CSnippets::LoadList(array(
'template' => $APPLICATION->UnJSEscape($_GET["templateID"]),
'bClearCache' => isset($_GET['clear_snippets_cache']) && $_GET['clear_snippets_cache'] == 'Y',
));
break;
case "add":
case "edit":
CUtil::JSPostUnEscape();
$code = isset($_REQUEST['code']) ? $_REQUEST['code'] : '';
if (CFileman::IsPHP($code) && !$USER->CanDoOperation('edit_php'))
return $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
CSnippets::Edit(array(
'bNew' => $_REQUEST['target'] == 'add',
示例10: array
$dbSites = CSite::GetList($b = "sort", $o = "asc", array("ACTIVE" => "Y"));
while ($arSite = $dbSites->Fetch())
{
$arSites[] = $arSite;
$arSiteList[] = $arSite['ID'];
}
$oAuthManager = new CSocServAuthManager();
$arOptions = $oAuthManager->GetSettings();
$aTabs = array(
array("DIV" => "edit1", "TAB" => GetMessage("MAIN_TAB_SET"), "ICON" => "", "TITLE" => GetMessage("MAIN_TAB_TITLE_SET")),
);
$tabControl = new CAdminTabControl("tabControl", $aTabs);
if($_SERVER["REQUEST_METHOD"] == "POST" && $_POST["Update"].$_POST["Apply"].$_POST["RestoreDefaults"] <> '' && check_freetrix_sessid())
{
if($_POST["RestoreDefaults"] <> '')
{
COption::RemoveOption($module_id);
}
else
{
COption::SetOptionString("socialservices", "use_on_sites", serialize($_POST["use_on_sites"]));
CAgent::RemoveModuleAgents("socialservices");
CAgent::AddAgent("CSocServAuthManager::SendSocialservicesMessages();", "socialservices", "N", 100, "", "Y", "");
CAgent::AddAgent("CSocServMessage::CleanUp();", "socialservices", "N", 86400, "", "Y", "");
foreach($arSiteList as $site)
{
$suffix = ($site <> ''? '_bx_site_'.$site:'');
示例11: IncludeModuleLangFile
if (!$USER->CanDoOperation('seo_tools'))
die(GetMessage("ACCESS_DENIED"));
use Freetrix\Seo\Engine;
use Freetrix\Main\IO\Path;
IncludeModuleLangFile(__FILE__);
\Freetrix\Main\Loader::includeModule('seo');
\Freetrix\Main\Loader::includeModule('socialservices');
CUtil::JSPostUnescape();
$engine = new Engine\Google();
if(isset($_REQUEST['action']) && check_freetrix_sessid())
{
$res = array();
$arDomain = null;
if(isset($_REQUEST['domain']) && strlen($_REQUEST['domain']) > 0)
{
$bFound = false;
$arDomains = \CSeoUtils::getDomainsList();
foreach($arDomains as $arDomain)
{
if($arDomain['DOMAIN'] == $_REQUEST['domain'] && rtrim($arDomain['SITE_DIR'], '/') == rtrim($_REQUEST['dir'], '/'))
{
$bFound = true;
break;
}
示例12: CAdminList
$lAdmin = new CAdminList($sTableID, $oSort);
$arFilterFields = Array(
"find",
"find_type",
"find_type_id",
"find_tmpl_id",
);
$lAdmin->InitFilter($arFilterFields);
if (!empty($find))$arFilter["~".strToUpper($find_type)] = $find;
if (!empty($find_type_id))
$arFilter["ID"] = $find_type_id;
if (!empty($find_tmpl_id))
$arFilter["MESSAGE_ID"] = $find_tmpl_id;
if(($arID = $lAdmin->GroupAction()) && $isAdmin && check_freetrix_sessid())
{
if($_REQUEST['action_target']=='selected')
{
$rsData = CEventType::GetListEx(array($by => $order), $arFilter, array("type" => "none"));
while($arRes = $rsData->Fetch())
$arID[] = $arRes['EVENT_NAME'];
}
foreach($arID as $ID)
{
if(strLen($ID) <= 0)
continue;
switch($_REQUEST['action'])
{
case "delete":
示例13: require_once
require_once(dirname(__FILE__)."/../include/prolog_admin_before.php");
require_once($_SERVER["DOCUMENT_ROOT"].FX_ROOT."/modules/main/prolog.php");
define("HELP_FILE", "settings/wizard_load.php");
require_once($_SERVER["DOCUMENT_ROOT"].FX_ROOT."/modules/main/classes/general/wizard.php");
if(!$USER->CanDoOperation('edit_php') && !$USER->CanDoOperation('view_other_settings'))
$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
$isAdmin = $USER->CanDoOperation('edit_php');
IncludeModuleLangFile(__FILE__);
$strError = $strOK = "";
do
{
if ( !($_SERVER["REQUEST_METHOD"]=="POST" && $_POST["action"]=="import" && $isAdmin && check_freetrix_sessid()) )
break;
if (!is_uploaded_file($_FILES["wizardFile"]["tmp_name"]))
{
$strError .= GetMessage("MAIN_WIZARD_LOAD_ERROR_LOAD");
break;
}
elseif(GetFileExtension(strtolower($_FILES["wizardFile"]["name"])) != "gz")
{
$strError .= GetMessage("MAIN_WIZARD_TAR_GZ");
break;
}
$wizardPath = $_SERVER["DOCUMENT_ROOT"].CWizardUtil::GetRepositoryPath();
示例14: strlen
if (isset($arFields["EXTERNAL_AUTH_ID"]) && strlen($arFields["EXTERNAL_AUTH_ID"]) > 0 && strlen($GLOBALS["eventLdapLangID"]) > 0)
{
$arFields["BACK_URL"] = "/";
$event = new CEvent;
$event->Send("LDAP_USER_CONFIRM", $GLOBALS["eventLdapLangID"], $arFields);
}
elseif ($GLOBALS["sendEmail"] == "Y" && $arFields["EMAIL"] != $GLOBALS["defaultUserEmail"] && strlen($GLOBALS["eventLangID"]) > 0)
{
$event = new CEvent;
$event->Send("USER_INVITE", $GLOBALS["eventLangID"], $arFields);
}
}
//Check and save data
if ($_SERVER["REQUEST_METHOD"] == "POST" && $tabStep > 2 && check_freetrix_sessid())
{
//Check
$csvImport = false;
$ldp = false;
if ($dataSource == "csv")
{
$csvFilePath = $_SERVER["DOCUMENT_ROOT"].Rel2Abs("/", $csvDataFile);
if (is_file($csvFilePath) && is_readable($csvFilePath))
{
$csvImport = new CSVUserImport($csvFilePath, $arDelimeters[$delimeter]);
$csvImport->SetUserGroups($userGroups);
$csvImport->IgnoreDuplicate($ignoreDuplicate == "Y");
$csvImport->SetCallback("_OnUserAdd");
$csvImport->SetImageFilePath($pathToImages);
示例15: ClearVars
ClearVars();
if(!$USER->CanDoOperation('edit_other_settings'))
$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
IncludeModuleLangFile(__FILE__);
$ID = intval($ID);
$hotKeyCodes = new CHotKeysCode;
$str_IS_CUSTOM = true;
$errMess = "";
$bVarsFromForm = false;
if($_SERVER['REQUEST_METHOD']=="POST" && ($_POST['save']<>"" || $_POST['apply']<>"") && check_freetrix_sessid())
{
$arFields = array(
"CLASS_NAME"=>$_REQUEST["CLASS_NAME"],
"CODE"=>$_REQUEST["CODE"],
"NAME"=>$_REQUEST["NAME"],
"COMMENTS" => $_REQUEST["COMMENTS"],
"TITLE_OBJ"=>$_REQUEST["TITLE_OBJ"],
"URL"=>$_REQUEST["URL"],
);
if($ID>0)
$res = $hotKeyCodes->Update($ID, $arFields);
else
{