本文整理汇总了PHP中CUtil::decodeURIComponent方法的典型用法代码示例。如果您正苦于以下问题:PHP CUtil::decodeURIComponent方法的具体用法?PHP CUtil::decodeURIComponent怎么用?PHP CUtil::decodeURIComponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUtil
的用法示例。
在下文中一共展示了CUtil::decodeURIComponent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Authorize
public function Authorize()
{
// var_dump( $skip_check_user_data);
$GLOBALS["APPLICATION"]->RestartBuffer();
if(isset($_REQUEST["vk_session"]["user"]["id"]))
{
global $skip_check_user_data;
if(self::CheckUserData($_REQUEST["vk_session"]["sig"]) || $skip_check_user_data)
{
CUtil::decodeURIComponent($_REQUEST);
$u_id = $_REQUEST["vk_session"]["user"]["id"];
$arFields = array(
'EXTERNAL_AUTH_ID' => self::ID,
'WORK_NOTES' => self::ID, //это для того, чтоб можно было избавится от EXTERNAL_AUTH_ID и разрешить авторизовываться несколькими способами одновременно
'XML_ID' => $u_id,
'LOGIN' => "id".$u_id,
'NAME'=> $_REQUEST["vk_session"]["user"]["first_name"],
'LAST_NAME'=> $_REQUEST["vk_session"]["user"]["last_name"],
);
if($this->AuthorizeUser($arFields)){
if($skip_check_user_data){
return true;
}
die("OK");
}
}
}
die("FAILURE");
}
示例2: Authorize
public function Authorize()
{
$GLOBALS["APPLICATION"]->RestartBuffer();
if(isset($_REQUEST["mailru_sess"]["sig"]) && isset($_REQUEST["mailru_user"]["uid"]))
{
if(self::CheckUserData($_REQUEST["mailru_sess"]["sig"]))
{
CUtil::decodeURIComponent($_REQUEST);
$arFields = array(
'EXTERNAL_AUTH_ID' => self::ID,
'XML_ID' => $_REQUEST["mailru_user"]["uid"],
'LOGIN' => $_REQUEST["mailru_user"]["email"],
'EMAIL' => $_REQUEST["mailru_user"]["email"],
'NAME'=> $_REQUEST["mailru_user"]["first_name"],
'LAST_NAME'=> $_REQUEST["mailru_user"]["last_name"],
);
if($this->AuthorizeUser($arFields))
die("OK");
}
}
die("FAILURE");
}
示例3: array
if ($res) {
if ($apply != "") {
$_SESSION["SESS_ADMIN"]["FAVORITES_EDIT_MESSAGE"] = array("MESSAGE" => GetMessage("fav_edit_success"), "TYPE" => "OK");
LocalRedirect("favorite_edit.php?ID=" . $ID . "&lang=" . LANG);
} else {
LocalRedirect($_REQUEST["addurl"] != "" ? $_REQUEST["addurl"] : "favorite_list.php?lang=" . LANG);
}
} else {
if ($e = $APPLICATION->GetException()) {
$message = new CAdminMessage(GetMessage("fav_edit_error"), $e);
}
$bVarsFromForm = true;
}
}
if ($_REQUEST["encoded"] == "Y") {
CUtil::decodeURIComponent($_REQUEST["name"]);
}
$str_NAME = htmlspecialcharsbx($_REQUEST["name"]);
$str_URL = htmlspecialcharsbx($_REQUEST["addurl"]);
$str_C_SORT = 100;
$str_COMMON = 'N';
$str_USER_ID = $USER->GetID();
$str_LANGUAGE_ID = LANGUAGE_ID;
if ($ID > 0) {
$fav = CFavorites::GetByID($ID);
if (!($fav_arr = $fav->ExtractFields("str_"))) {
$ID = 0;
}
}
if ($bVarsFromForm) {
$DB->InitTableVarsForEdit("b_favorite", "", "str_");
示例4: checkActions
private function checkActions()
{
if ($this->request["ENTITY_XML_ID"] !== $this->feed->getEntity()->getXmlId()) {
return null;
}
$post = array_merge($this->request->getQueryList()->toArray(), $this->request->getPostList()->toArray());
$action = strtolower($post["comment_review"] == "Y" ? strtolower($post['REVIEW_ACTION']) == "edit" ? "edit" : "add" : $post['REVIEW_ACTION']);
if (!in_array($action, array("add", 'del', 'hide', 'show', 'edit'))) {
return null;
}
$actionErrors = new ErrorCollection();
$arPost = array();
if (!check_bitrix_sessid()) {
$actionErrors->addOne(new Error(Loc::getMessage("F_ERR_SESSION_TIME_IS_UP"), self::ERROR_ACTION));
} else {
if (!$this->checkCaptcha($actionErrors)) {
$actionErrors->addOne(new Error(Loc::getMessage("POSTM_CAPTCHA"), self::ERROR_ACTION));
} else {
if ($post["AJAX_POST"] == "Y") {
CUtil::decodeURIComponent($post);
}
if ($action == "add" || $action == "edit") {
$arPost = array("POST_MESSAGE" => $post["REVIEW_TEXT"], "AUTHOR_NAME" => $this->getUser()->isAuthorized() ? $this->getUserName() : (empty($post["REVIEW_AUTHOR"]) ? $GLOBALS["FORUM_STATUS_NAME"]["guest"] : $post["REVIEW_AUTHOR"]), "AUTHOR_EMAIL" => $post["REVIEW_EMAIL"], "USE_SMILES" => $post["REVIEW_USE_SMILES"]);
foreach (GetModuleEvents('forum', 'OnCommentAdd', true) as $arEvent) {
if (ExecuteModuleEventEx($arEvent, array($this->feed->getEntity()->getType(), $this->feed->getEntity()->getId(), &$arPost)) === false) {
$actionErrors->addOne(new Error(isset($arPost['ERROR']) ? $arPost['ERROR'] : Loc::getMessage("F_ERR_DURING_ACTIONS") . print_r($arEvent, true), self::ERROR_ACTION));
}
}
}
}
}
if (!$actionErrors->hasErrors()) {
if ($action == "add" || $action == "edit") {
$message = $action == "add" ? $this->feed->add($arPost) : $this->feed->edit($this->request["MID"], $arPost);
if ($message && $this->request["TOPIC_SUBSCRIBE"] == "Y") {
ForumSubscribeNewMessagesEx($this->arParams["FORUM_ID"], $message["TOPIC_ID"], "N", $strErrorMessage, $strOKMessage);
BXClearCache(true, "/bitrix/forum/user/" . $this->getUser()->getId() . "/subscribe/");
}
} elseif ($action == "show" || $action == "hide") {
$message = $this->feed->moderate($this->request["MID"], $action == "show");
} else {
$message = $this->feed->delete($this->request["MID"]);
}
if ($this->feed->hasErrors()) {
$actionErrors->add($this->feed->getErrors());
} else {
if ($this->request["NOREDIRECT"] != "Y" && !$this->isAjaxRequest()) {
$strURL = $this->request["back_page"] ?: $this->getApplication()->GetCurPageParam("", array("MID", "SEF_APPLICATION_CUR_PAGE_URL", BX_AJAX_PARAM_ID, "result", "sessid", "bxajaxid"));
$strURL = ForumAddPageParams($strURL, array("MID" => $message["ID"], "result" => $message["APPROVED"] == "Y" ? "reply" : "not_approved"));
LocalRedirect($strURL);
} else {
$this->arResult['RESULT'] = $message["ID"];
if ($action == "add") {
$this->arResult['OK_MESSAGE'] = $message["APPROVED"] == "Y" ? GetMessage("COMM_COMMENT_OK") : GetMessage("COMM_COMMENT_OK_AND_NOT_APPROVED");
} else {
if ($action == "edit") {
$this->arResult['OK_MESSAGE'] = Loc::getMessage("COMM_COMMENT_UPDATED");
} else {
if ($action == "show") {
$this->arResult['OK_MESSAGE'] = Loc::getMessage("COMM_COMMENT_SHOWN");
} else {
if ($action == "hide") {
$this->arResult['OK_MESSAGE'] = Loc::getMessage("COMM_COMMENT_HIDDEN");
} else {
$this->arResult['OK_MESSAGE'] = Loc::getMessage("COMM_COMMENT_DELETED");
}
}
}
}
}
}
}
if ($actionErrors->hasErrors()) {
/** @var $error Error */
$this->arResult["RESULT"] = false;
$this->arResult["OK_MESSAGE"] = '';
foreach ($actionErrors->toArray() as $error) {
$this->arResult['ERROR_MESSAGE'] .= $error->getMessage();
}
return false;
}
return true;
}
示例5: UnEscape
public function UnEscape($aFilter)
{
if(defined("FX_UTF"))
return;
if(!is_array($aFilter))
return;
foreach($aFilter as $flt)
if(is_string($GLOBALS[$flt]) && CUtil::DetectUTF8($GLOBALS[$flt]))
CUtil::decodeURIComponent($GLOBALS[$flt]);
}
示例6: define
<?php
define("STOP_STATISTICS", true);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
require_once "functions.php";
CModule::IncludeModule('socialnetwork');
if (!$USER->IsAuthorized()) {
die;
}
$SITE_ID = isset($_GET["SITE_ID"]) ? $_GET["SITE_ID"] : SITE_ID;
if ($_REQUEST["mode"] == "search") {
CUtil::decodeURIComponent($_GET);
$APPLICATION->RestartBuffer();
CSocNetTools::InitGlobalExtranetArrays($SITE_ID);
$arFilter = array("SITE_ID" => $SITE_ID, "%NAME" => $_GET["query"]);
if (!CSocNetUser::IsCurrentUserModuleAdmin($SITE_ID)) {
$arFilter["CHECK_PERMISSIONS"] = $USER->GetID();
}
$rsGroups = CSocNetGroup::GetList(array("NAME" => "ASC"), $arFilter);
$arGroups = array();
while ($arGroup = $rsGroups->Fetch()) {
if (isset($GLOBALS["arExtranetGroupID"]) && is_array($GLOBALS["arExtranetGroupID"]) && in_array($arGroup["ID"], $GLOBALS["arExtranetGroupID"])) {
$arGroup["IS_EXTRANET"] = "Y";
}
$arGroups[] = group2JSItem($arGroup);
}
if (isset($_REQUEST["features_perms"]) && sizeof($_REQUEST["features_perms"]) == 2) {
filterByFeaturePerms($arGroups, $_REQUEST["features_perms"]);
}
Header('Content-Type: application/x-javascript; charset=' . LANG_CHARSET);
echo CUtil::PhpToJsObject($arGroups);
示例7: Copyright
<?php
##############################################
# Bitrix Site Manager #
# Copyright (c) 2002-2007 Bitrix #
# http://www.bitrixsoft.com #
# mailto:admin@bitrixsoft.com #
##############################################
// define("NO_KEEP_STATISTIC", true);
// define("NO_AGENT_STATISTIC", true);
// define("NOT_CHECK_PERMISSIONS", true);
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
if ($USER->IsAuthorized() && check_bitrix_sessid()) {
if ($_GET["action"] == "delete" && $_GET["c"] != "" && $_GET["n"] != "") {
CUserOptions::DeleteOption($_GET["c"], $_GET["n"], $_GET["common"] == "Y" && $GLOBALS["USER"]->CanDoOperation('edit_other_settings'));
}
if (is_array($_REQUEST["p"])) {
$arOptions = $_REQUEST["p"];
CUtil::decodeURIComponent($arOptions);
CUserOptions::SetOptionsFromArray($arOptions);
}
}
echo "OK";
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_admin_after.php";
示例8: intval
}
if (isset($_GET['lead_id'])) {
$arFields['LEAD_ID'] = intval($_GET['lead_id']);
if ($arFields['LEAD_ID'] > 0) {
$bCreateFromLead = true;
}
}
if (isset($_GET['deal_id'])) {
$arFields['DEAL_ID'] = intval($_GET['deal_id']);
if ($arFields['DEAL_ID'] > 0) {
$bCreateFromDeal = true;
}
}
if (isset($_GET['title'])) {
$arFields['~TITLE'] = $_GET['title'];
CUtil::decodeURIComponent($arFields['~TITLE']);
$arFields['TITLE'] = htmlspecialcharsbx($arFields['~TITLE']);
}
$bCreateFrom = $bCreateFromLead || $bCreateFromDeal || $bCreateFromCompany || $bCreateFromContact;
$leadId = isset($arFields['LEAD_ID']) ? intval($arFields['LEAD_ID']) : 0;
$dealId = isset($arFields['DEAL_ID']) ? intval($arFields['DEAL_ID']) : 0;
$contactId = isset($arFields['CONTACT_ID']) ? intval($arFields['CONTACT_ID']) : 0;
$companyId = isset($arFields['COMPANY_ID']) ? intval($arFields['COMPANY_ID']) : 0;
// create from contact
if ($contactId > 0) {
$dbContact = CCrmContact::GetListEx(array('ID' => 'DESC'), array('ID' => $contactId), false, array('nTopCount' => 1), array('ID', 'LEAD_ID'));
if ($arContact = $dbContact->Fetch()) {
if (isset($arContact['LEAD_ID']) && intval($arContact['LEAD_ID']) > 0) {
$arFields['~LEAD_ID'] = $arFields['LEAD_ID'] = intval($arContact['LEAD_ID']);
}
}
示例9: array
if ($bCanAddComments)
{
// add source object and get source_id, $source_url
$arParams = array(
"PATH_TO_SMILE" => $_REQUEST["p_smile"],
"PATH_TO_USER_BLOG_POST" => $_REQUEST["p_ubp"],
"PATH_TO_GROUP_BLOG_POST" => $_REQUEST["p_gbp"],
"PATH_TO_USER_MICROBLOG_POST" => $_REQUEST["p_umbp"],
"PATH_TO_GROUP_MICROBLOG_POST" => $_REQUEST["p_gmbp"],
"BLOG_ALLOW_POST_CODE" => $_REQUEST["bapc"]
);
$parser = new logTextParser(LANGUAGE_ID, $arParams["PATH_TO_SMILE"]);
$comment_text = $_REQUEST["message"];
CUtil::decodeURIComponent($comment_text);
$comment_text = Trim($comment_text);
if (strlen($comment_text) > 0)
{
$arSearchParams = array();
if($arCommentEvent["EVENT_ID"] == "forum")
{
$arSearchParams["FORUM_ID"] = intval($_REQUEST["f_id"]);
$arSearchParams["PATH_TO_GROUP_FORUM_MESSAGE"] = (
$arLog["ENTITY_TYPE"] == SONET_SUBSCRIBE_ENTITY_GROUP
? str_replace(
"#GROUPS_PATH#",
COption::GetOptionString("socialnetwork", "workgroups_page", false, $site_id),
$arLog["URL"]
示例10: define
<?php
define("STOP_STATISTICS", true);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_js.php";
if (CModule::IncludeModule("search")) {
CUtil::decodeURIComponent($_REQUEST);
if (!empty($_REQUEST["search"])) {
$arResult = array();
$order = CUserOptions::GetOption("search_tags", "order", "CNT");
if ($_REQUEST["order_by"] == "NAME") {
$arOrder = array("NAME" => "ASC");
if ($order != "NAME") {
CUserOptions::SetOption("search_tags", "order", "NAME");
}
} else {
$arOrder = array("CNT" => "DESC", "NAME" => "ASC");
if ($order != "CNT") {
CUserOptions::SetOption("search_tags", "order", "CNT");
}
}
$db_res = CSearchTags::GetList(array("NAME", "CNT"), array("TAG" => $_REQUEST["search"], "SITE_ID" => $_REQUEST["site_id"]), $arOrder, 10);
if ($db_res) {
while ($res = $db_res->Fetch()) {
$arResult[] = array("NAME" => $res["NAME"], "CNT" => $res["CNT"]);
}
}
echo CUtil::PhpToJSObject($arResult);
}
}
require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_admin_js.php";
示例11: Array
$arPermTypes[$arRes['ID']] = Array(
'title' => $name,
'letter' => $arRes['LETTER']
);
}
$arPermTypes['NOT_REF'] = Array(
'title' => GetMessage("FILEMAN_FOLDER_ACCESS_INHERIT"),
'letter' => 'N'
);
$strWarning = "";
$arFiles = Array();
if (count($files) > 0)
{
CUtil::decodeURIComponent($files);
for($i=0; $i<count($files); $i++)
{
if(!$USER->CanDoFileOperation('fm_edit_permission',Array($site, $path."/".$files[$i])))
$strWarning .= GetMessage("FILEMAN_ACCESS_TO_DENIED")." \"".$files[$i]."\".\n";
elseif($files[$i] != '.')
$arFiles[] = $files[$i];
}
}
else
{
$arPDirs = array();
$arPFiles = array();
CFileMan::GetDirList(Array($site, $path), $arPDirs, $arPFiles, array("MIN_PERMISSION" => "X"), array(), "DF");
foreach ($arPDirs as $dir)
示例12: elseif
}
if (!CModule::IncludeModule("forum")) {
return false;
} elseif (!($_REQUEST["comment_review"] == "Y" || in_array($_REQUEST['REVIEW_ACTION'], array('DEL', 'HIDE', 'SHOW', 'EDIT')))) {
return false;
} elseif ($_REQUEST['REVIEW_ACTION'] == "EDIT" && $_REQUEST["MID"] > 0 && (!$arResult["TOPIC"] || $arResult["USER"]["RIGHTS"]["MODERATE"] !== "Y" && $arParams["ALLOW_EDIT_OWN_MESSAGE"] == "N")) {
return false;
}
$this->IncludeComponentLang("action.php");
// Check gross errors message data
$APPLICATION->RestartBuffer();
/** @var $request \Bitrix\Main\HttpRequest */
$request = \Bitrix\Main\Context::getCurrent()->getRequest();
$post = array_merge($request->getQueryList()->toArray(), $request->getPostList()->toArray());
if ($post["AJAX_POST"] == "Y") {
CUtil::decodeURIComponent($post);
}
if (!check_bitrix_sessid()) {
$arError[] = array("code" => "session time is up", "title" => GetMessage("F_ERR_SESSION_TIME_IS_UP"));
} elseif ($arResult["USER"]['PERMISSION'] <= "E") {
$arError[] = array("code" => "access denied", "title" => GetMessage("F_ERR_NOT_RIGHT_FOR_ADD"));
} elseif ($post['REVIEW_ACTION'] == "EDIT" || $post['REVIEW_ACTION'] == "DEL") {
$arResult["MESSAGE"] = CForumMessage::GetById($post["MID"]);
if ($arResult["MESSAGE"]["TOPIC_ID"] != $arResult["TOPIC"]["ID"] || $arResult["USER"]["RIGHTS"]["EDIT"] !== "Y" && ($arResult["MESSAGE"]["AUTHOR_ID"] <= 0 || $arResult["MESSAGE"]["AUTHOR_ID"] != $GLOBALS["USER"]->GetID() || $arParams["ALLOW_EDIT_OWN_MESSAGE"] == "LAST" && $arResult["MESSAGE"]["ID"] != $arResult["TOPIC"]["ABS_LAST_MESSAGE_ID"])) {
$arError[] = array("code" => "access denied", "title" => GetMessage("F_ERR_NOT_RIGHT_FOR_EDIT"));
}
}
if (!empty($arError)) {
} elseif ((empty($_REQUEST["preview_comment"]) || $_REQUEST["preview_comment"] == "N") && $_REQUEST["comment_review"] == "Y") {
$arProperties = array();
$needProperty = array();
示例13: executeComponent
public function executeComponent()
{
if (!CModule::IncludeModule('webdav')) {
return false;
}
$isVisual = isset($this->arParams['VISUAL']) ? (bool) $this->arParams['VISUAL'] : true;
$pathToAjax = isset($this->arParams['AJAX_PATH']) ? $this->arParams['AJAX_PATH'] : '/bitrix/components/bitrix/webdav.disk/ajax.php';
try {
if ($isVisual) {
$diskEnabled = \Bitrix\Main\Config\Option::get('disk', 'successfully_converted', false) && CModule::includeModule('disk');
$quota = CDiskQuota::GetDiskQuota();
$this->arResult['showDiskQuota'] = false;
//$quota !== true; //now without quota
$this->arResult['diskSpace'] = (double) COption::GetOptionInt('main', 'disk_space') * 1024 * 1024;
$this->arResult['quota'] = $quota;
$this->arResult['ajaxIndex'] = $pathToAjax;
$this->arResult['ajaxStorageIndex'] = '/desktop_app/storage.php';
if ($diskEnabled) {
$this->arResult['isInstalledDisk'] = \Bitrix\Disk\Desktop::isDesktopDiskInstall();
$this->arResult['personalLibIndex'] = '/company/personal/user/' . $this->getUser()->getId() . '/disk/path/';
} else {
$this->arResult['isInstalledDisk'] = (bool) CWebDavTools::isDesktopDiskInstall();
$this->arResult['personalLibIndex'] = '/company/personal/user/' . $this->getUser()->getId() . '/files/lib/';
}
$this->arResult['isInstalledPull'] = (bool) IsModuleInstalled('pull');
$this->arResult['currentUser'] = array('id' => $this->getUser()->getId(), 'formattedName' => $this->getUser()->getFormattedName());
$this->getApplication()->addHeadScript('/bitrix/components/bitrix/webdav.disk/disk.js');
$this->includeComponentTemplate();
return;
}
CTimeZone::Disable();
//decode from utf-8 to site LANG_CHARSET
CUtil::decodeURIComponent($_POST);
$this->checkUser()->runAction();
CTimeZone::Enable();
} catch (CWebDavBadStorageAfterMigrateException $e) {
CTimeZone::Enable();
$this->sendJsonResponse(array('status' => CWebDavDiskDispatcher::STATUS_ERROR, 'message' => 'Could not get Disk\\Storage. Perhaps, it is old client, which does not reconnect. '), 500);
} catch (CWebDavSymlinkMoveFakeErrorException $e) {
CTimeZone::Enable();
$this->sendJsonResponse(array('status' => CWebDavDiskDispatcher::STATUS_ERROR, 'message' => 'This is not really error. Move symlink folders.'));
} catch (CWebDavAccessDeniedException $e) {
CTimeZone::Enable();
$this->sendJsonResponse(array('status' => CWebDavDiskDispatcher::STATUS_ACCESS_DENIED, 'message' => $e->getMessage()));
} catch (Exception $e) {
CTimeZone::Enable();
$response = array('status' => 'error', 'message' => $e->getMessage());
if ($this->dispatcher) {
$errors = $this->dispatcher->getErrors();
if ($errors) {
$response['detail'] = $errors;
}
}
$this->sendJsonResponse($response);
}
return;
}
示例14: require_once
if (!($USER->CanDoOperation('fileman_admin_files') || $USER->CanDoOperation('fileman_edit_existent_files') || $USER->CanDoOperation('fileman_view_file_structure')))
$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/fileman/include.php");
IncludeModuleLangFile(__FILE__);
$addUrl = 'lang='.LANGUAGE_ID.($logical == "Y"?'&logical=Y':'');
$strWarning = "";
$site = CFileMan::__CheckSite($site);
$DOC_ROOT = CSite::GetSiteDocRoot($site);
$io = CBXVirtualIo::GetInstance();
if (CUtil::DetectUTF8($path))
CUtil::decodeURIComponent($path);
$path = $io->CombinePath("/", $path);
$arParsedPath = CFileMan::ParsePath(Array($site, $path), false, false, "", $logical == "Y");
$abs_path = $DOC_ROOT.$path;
$arPath = Array($site, $path);
$APPLICATION->SetTitle(GetMessage("FILEMAN_FILEVIEW_TITLE")." \"".$arParsedPath["LAST"]."\"");
foreach ($arParsedPath["AR_PATH"] as $chainLevel)
{
$adminChain->AddItem(
array(
"TEXT" => htmlspecialcharsex($chainLevel["TITLE"]),
"LINK" => ((strlen($chainLevel["LINK"]) > 0) ? $chainLevel["LINK"] : ""),
)
示例15: intval
$aUserId[] = intval($id);
}
}
} elseif (intval($_REQUEST["user_id"]) > 0) {
$aUserId[] = IntVal($_REQUEST["user_id"]);
}
$aUserId = array_unique($aUserId);
$mptr = Trim($_REQUEST["mptr"]);
if (!$GLOBALS["USER"]->IsAuthorized()) {
echo "*";
} else {
if (!check_bitrix_sessid()) {
echo GetMessage("SONET_C50_ERR_PERMS") . ".";
} else {
$message = $_REQUEST["data"];
CUtil::decodeURIComponent($message);
$message = Trim($message);
if (StrLen($message) <= 0) {
echo GetMessage("SONET_C50_NO_TEXT") . ".";
} else {
if (empty($aUserId)) {
echo GetMessage("SONET_C50_NO_USER_ID") . ".";
} else {
foreach ($aUserId as $userID) {
if (!CSocNetUserPerms::CanPerformOperation($GLOBALS["USER"]->GetID(), $userID, "message", CSocNetUser::IsCurrentUserModuleAdmin(false))) {
echo GetMessage("SONET_C50_CANT_WRITE") . ".";
} else {
$errorMessage = "";
if (!CSocNetMessages::CreateMessage($GLOBALS["USER"]->GetID(), $userID, $message)) {
if ($e = $GLOBALS["APPLICATION"]->GetException()) {
$errorMessage .= $e->GetString();