本文整理汇总了PHP中CHTTP::URN2URI方法的典型用法代码示例。如果您正苦于以下问题:PHP CHTTP::URN2URI方法的具体用法?PHP CHTTP::URN2URI怎么用?PHP CHTTP::URN2URI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CHTTP
的用法示例。
在下文中一共展示了CHTTP::URN2URI方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __MPF_ImageResizeHandler
function __MPF_ImageResizeHandler(&$arCustomFile, $params = array(), $result = array())
{
static $arParams = array();
if (!empty($params)) {
$arParams = $params;
}
static $arResult = array();
if (!empty($result)) {
$arResult = $result;
}
$fileIdForDelete = 0;
$arFields = array();
foreach (array("MELODY_WELCOME", "MELODY_WAIT", "MELODY_HOLD", "MELODY_VOICEMAIL") as $controlID => $inputName) {
if ($_REQUEST["controlID"] == "voximplant" . $controlID) {
$fileIdForDelete = $arResult["ITEM"][$inputName];
$arFields = array($inputName => $arCustomFile["fileID"]);
break;
}
}
if (!empty($arFields)) {
$arFile = CFile::GetFileArray($arCustomFile['fileID']);
$arCustomFile["fileURL"] = CHTTP::URN2URI($arFile["SRC"]);
Bitrix\Voximplant\ConfigTable::update($arParams["ID"], $arFields);
CFile::Delete($fileIdForDelete);
}
}
示例2: getFriendsList
public function getFriendsList($limit, &$next)
{
if (IsModuleInstalled('bitrix24') && defined('BX24_HOST_NAME')) {
$redirect_uri = static::CONTROLLER_URL . "/redirect.php";
} else {
$redirect_uri = \CHTTP::URN2URI("/bitrix/tools/oauth/google.php");
}
$ob = $this->getEntityOAuth();
if ($ob->GetAccessToken($redirect_uri) !== false) {
$res = $ob->getCurrentUserFriends($limit, $next);
foreach ($res["items"] as $key => $contact) {
$contact["uid"] = $contact["id"];
if (array_key_exists("name", $contact)) {
$contact["first_name"] = $contact["name"]["givenName"];
$contact["last_name"] = $contact["name"]["familyName"];
} else {
list($contact["first_name"], $contact["last_name"]) = explode(" ", $contact["displayName"], 2);
}
if (array_key_exists("image", $contact)) {
$contact["picture"] = preg_replace("/\\?.*\$/", "", $contact["image"]["url"]);
}
$res["items"][$key] = $contact;
}
return $res["items"];
}
return false;
}
示例3: unset
$arHandlers[$name]["CHARSBACK"] = true;
}
}
}
}
}
$arResult["HANDLERS_ALL"] = $arHandlers;
if (!is_array($arParams["HANDLERS"])) {
if (LANGUAGE_ID != 'ru') {
unset($arHandlers["vk"]);
unset($arHandlers["mailru"]);
}
$arParams["HANDLERS"] = array_keys($arHandlers);
}
$arResult["BOOKMARKS"] = array();
$arResult["PAGE_URL"] = CHTTP::URN2URI($arParams["PAGE_URL"]);
$arResult["PAGE_TITLE"] = $arParams["PAGE_TITLE"];
foreach ($arResult["HANDLERS_ALL"] as $name => $arHandler) {
if (in_array($name, $arParams["HANDLERS"])) {
$PageTitle = $arResult["PAGE_TITLE"];
if (array_key_exists("CHARSBACK", $arHandler) && $arHandler["CHARSBACK"]) {
$PageTitleBack = htmlspecialcharsback($PageTitle);
}
$arHandler["ICON"] = str_replace("#PAGE_URL#", $arResult["PAGE_URL"], $arHandler["ICON"]);
$arHandler["ICON"] = str_replace("#PAGE_URL_ENCODED#", urlencode($arResult["PAGE_URL"]), $arHandler["ICON"]);
if (array_key_exists("CHARSBACK", $arHandler) && $arHandler["CHARSBACK"]) {
$arHandler["ICON"] = str_replace("#PAGE_TITLE#", CUtil::JSEscape($PageTitleBack), $arHandler["ICON"]);
$arHandler["ICON"] = str_replace("#PAGE_TITLE_ENCODED#", urlencode($PageTitleBack), $arHandler["ICON"]);
$arHandler["ICON"] = str_replace("#PAGE_TITLE_ORIG#", CUtil::addslashes($PageTitle), $arHandler["ICON"]);
$utfTitle = $APPLICATION->ConvertCharset($PageTitleBack, LANG_CHARSET, "UTF-8");
$arHandler["ICON"] = str_replace("#PAGE_TITLE_UTF_ENCODED#", urlencode($utfTitle), $arHandler["ICON"]);
示例4: DisplayExcel
function DisplayExcel()
{
/** @global CMain $APPLICATION */
global $APPLICATION;
echo '
<html>
<head>
<title>'.$APPLICATION->GetTitle().'</title>
<meta http-equiv="Content-Type" content="text/html; charset='.LANG_CHARSET.'">
<style>
td {mso-number-format:\@;}
.number0 {mso-number-format:0;}
.number2 {mso-number-format:Fixed;}
</style>
</head>
<body>';
echo "<table border=\"1\">";
echo "<tr>";
foreach($this->aVisibleHeaders as $header)
{
echo '<td>';
echo $header["content"];
echo '</td>';
}
echo "</tr>";
foreach($this->aRows as $row)
{
echo "<tr>";
foreach($this->aVisibleHeaders as $id=>$header_props)
{
$field = $row->aFields[$id];
if(!is_array($row->arRes[$id]))
$val = trim($row->arRes[$id]);
else
$val = $row->arRes[$id];
switch($field["view"]["type"])
{
case "checkbox":
if($val=='Y')
$val = htmlspecialcharsex(GetMessage("admin_lib_list_yes"));
else
$val = htmlspecialcharsex(GetMessage("admin_lib_list_no"));
break;
case "select":
if($field["edit"]["values"][$val])
$val = htmlspecialcharsex($field["edit"]["values"][$val]);
break;
case "file":
$arFile = CFile::GetFileArray($val);
if(is_array($arFile))
$val = htmlspecialcharsex(CHTTP::URN2URI($arFile["SRC"]));
else
$val = "";
break;
case "html":
$val = $field["view"]['value'];
break;
default:
$val = htmlspecialcharsex($val);
break;
}
echo '<td'.($header_props['align']?' align="'.$header_props['align'].'"':'').($header_props['valign']?' valign="'.$header_props['valign'].'"':'').'>';
echo ($val<>""? $val:' ').'</td>';
}
echo "</tr>";
}
echo "</table>";
echo '</body></html>';
}
示例5: array
$FileType = "flv";
}
else
{
$FileSize = "";
$FileType = "flv";
}
if (!$arResult['FIRST_FLV_ITEM'] && $FileType == 'flv')
$arResult['FIRST_FLV_ITEM'] = $PathToFile;
if (!$arResult['FIRST_WMV_ITEM'] && $FileType == 'wmv')
$arResult['FIRST_WMV_ITEM'] = $PathToFile;
if (strpos($_SERVER['HTTP_HOST'], 'xn--') !== false) // It's cyrilyc site
{
$PathToFile = CHTTP::URN2URI($PathToFile);
}
$arResult["SECTIONS"][$SectionId]["ELEMENTS"][$arItem["ID"]] = array(
"NAME" => $arItem["NAME"],
"PREVIEW_TEXT" => $arItem["PREVIEW_TEXT"],
"PREVIEW_PICTURE" => CFile::GetPath($arItem["PREVIEW_PICTURE"]),
"DETAIL_PICTURE" => CFile::GetPath($arItem["DETAIL_PICTURE"]),
"DURATION" => $Duration,
"FILE_SIZE" => $FileSize,
"FILE" => $PathToFile,
"TYPE" => $FileType,
"ID" => $arItem["ID"],
"IBLOCK_SECTION_ID" => $arItem["IBLOCK_SECTION_ID"],
);
示例6: htmlspecialcharsbx
$arResult["FILE"]["~SRC"] = $arResult["FILE"]["SRC"];
if (intVal($arResult["FILE"]["ID"]) > 0) {
$arResult["FILE"]["SRC"] = "/bitrix/components/bitrix/forum.interface/show_file.php?fid=" . htmlspecialcharsbx($arResult["FILE"]["ID"]) . (!empty($arParams["ADDITIONAL_URL"]) ? "&" . $arParams["ADDITIONAL_URL"] : "");
}
if ($arResult["FILE"]["USER_ID"] > 0) {
$forumUser = CForumUser::GetByUSER_ID($arResult["FILE"]["USER_ID"]);
$db_res = CUser::GetById($arResult["FILE"]["USER_ID"]);
if ($db_res && ($arUser = $db_res->Fetch())) {
$arResult["FILE"]["OWNER"] = $forumUser && $forumUser["SHOW_NAME"] != "Y" ? $arUser["LOGIN"] : CUser::FormatName($arParams["NAME_TEMPLATE"], $arUser, true, false);
}
}
$arResult["RETURN_DATA"] = "";
$arResult["RETURN_DATA_ARRAY"] = array();
// *************************/Default params*************************************************************
if (is_array($arResult["FILE"]) && !empty($arResult["FILE"]["SRC"])) {
$arResult["FILE"]["FULL_SRC"] = CHTTP::URN2URI($arResult["FILE"]["SRC"], $arParams["SERVER_NAME"]);
$ct = strToLower($arResult["FILE"]["CONTENT_TYPE"]);
if ($arParams["SHOW_MODE"] == "LINK") {
// do nothing
} elseif ($arParams["MAX_FILE_SIZE"] >= $arResult["FILE"]["FILE_SIZE"] && substr($ct, 0, 6) == "image/") {
$arResult["RETURN_DATA"] = $GLOBALS["APPLICATION"]->IncludeComponent("bitrix:forum.interface", "popup_image", array("URL" => $arParams["SHOW_MODE"] == "RSS" ? $arResult["FILE"]["FULL_SRC"] : $arResult["FILE"]["SRC"], "SIZE" => $arParams["SIZE"], "MAX_SIZE" => $arParams["MAX_SIZE"], "HTML_SIZE" => $arParams["HTML_SIZE"], "MODE" => $arParams["SHOW_MODE"] == "RSS" ? "RSS" : "SHOW2IMAGES", "IMG_WIDTH" => $arResult["FILE"]["WIDTH"], "IMG_HEIGHT" => $arResult["FILE"]["HEIGHT"], "IMG_NAME" => $arResult["FILE"]["ORIGINAL_NAME"], "IMG_SIZE" => $arResult["FILE"]["FILE_SIZE"], "CONVERT" => $arParams["CONVERT"], "FAMILY" => $arParams["FAMILY"], "RETURN" => "Y"), $this->__component->__parent !== null ? $this->__component->__parent : $this->__component, array("HIDE_ICONS" => "Y"));
}
$arResult["RETURN_DATA_ARRAY"]["DATA"] = $arResult["RETURN_DATA"];
$arData = array();
$size = intVal($arResult["FILE"]["FILE_SIZE"]) > 0 ? CFile::FormatSize(intval($arResult['FILE']['FILE_SIZE'])) : '';
$sTitle = !empty($arResult["FILE"]["ORIGINAL_NAME"]) ? $arResult["FILE"]["ORIGINAL_NAME"] : GetMessage("FRM_DOWNLOAD");
$file_ext = GetFileExtension($arResult["FILE"]["ORIGINAL_NAME"]);
$arData["TITLE"] = "<a href=\"" . $arResult["FILE"]["SRC"] . "&action=download" . "\" class=\"forum-file forum-file-" . $file_ext . "\" " . (!empty($arResult["RETURN_DATA"]) ?: (substr($ct, 0, 6) == "image/" ? " data-bx-viewer=\"image\" data-bx-src=\"" . $arResult["FILE"]["SRC"] . "\" " . " data-bx-title=\"" . htmlspecialcharsbx($arResult["FILE"]["ORIGINAL_NAME"]) . "\" " . " data-bx-owner=\"" . htmlspecialcharsbx($arResult["FILE"]["OWNER"]) . "\" " . " data-bx-dateModify=\"" . htmlspecialcharsbx($arResult["FILE"]["TIMESTAMP_X"]) . "\" " . " data-bx-size=\"" . htmlspecialcharsbx($arResult["FILE"]["FILE_SIZE"]) . "\" " . " data-bx-download=\"" . $arResult["FILE"]["SRC"] . "&action=download\" " . " data-bx-width=\"" . htmlspecialcharsbx($arResult["FILE"]["WIDTH"]) . "\" " . " data-bx-height=\"" . htmlspecialcharsbx($arResult["FILE"]["HEIGHT"]) . "\" " : " data-bx-viewer=\"unknown\" data-bx-src=\"" . $arResult["FILE"]["SRC"] . "\" " . " data-bx-title=\"" . htmlspecialcharsbx($arResult["FILE"]["ORIGINAL_NAME"]) . "\" " . " data-bx-owner=\"" . htmlspecialcharsbx($arResult["FILE"]["OWNER"]) . "\" " . " data-bx-dateModify=\"" . htmlspecialcharsbx($arResult["FILE"]["TIMESTAMP_X"]) . "\" data-bx-tooBigSizeMsg=\"\" " . " data-bx-size=\"" . $size . "\" " . " data-bx-download=\"" . $arResult["FILE"]["SRC"] . "&action=download\" ")) . "title=\"" . str_replace("#FILE_NAME#", $arResult["FILE"]["ORIGINAL_NAME"], GetMessage("FRM_DOWNLOAD_TITLE")) . '" target="_blank">' . '<span>' . $arResult["FILE"]["ORIGINAL_NAME"] . '</span></a>';
if ($size != '') {
$arData["SIZE"] = "<span class=\"forum-file-size\">(" . $size . ")</span>";
}
示例7: getUFForPostForm
public static function getUFForPostForm($arParams)
{
$arFileData = array();
$arUF = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields($arParams["ENTITY_TYPE"], $arParams["ENTITY_ID"], LANGUAGE_ID);
$ufCode = $arParams["UF_CODE"];
if (!empty($arUF[$ufCode]) && !empty($arUF[$ufCode]["VALUE"])) {
if ($arParams["IS_DISK_OR_WEBDAV_INSTALLED"]) {
if (\Bitrix\Main\Config\Option::get('disk', 'successfully_converted', false) && CModule::IncludeModule('disk')) {
$userFieldManager = \Bitrix\Disk\Driver::getInstance()->getUserFieldManager();
$urlManager = \Bitrix\Disk\Driver::getInstance()->getUrlManager();
$userFieldManager->loadBatchAttachedObject($arUF[$ufCode]["VALUE"]);
foreach ($arUF[$ufCode]["VALUE"] as $attachedId) {
$attachedObject = $userFieldManager->getAttachedObjectById($attachedId);
if ($attachedObject) {
$file = $attachedObject->getObject();
$fileName = $file->getName();
$fileUrl = $urlManager->getUrlUfController('download', array('attachedId' => $attachedId));
$fileUrl = str_replace("/bitrix/tools/disk/uf.php", SITE_DIR . "mobile/ajax.php", $fileUrl);
$fileUrl = $fileUrl . (strpos($fileUrl, "?") === false ? "?" : "&") . "mobile_action=disk_uf_view&filename=" . $fileName;
if (\Bitrix\Disk\TypeFile::isImage($file) && ($realFile = $file->getFile())) {
$previewImageUrl = $urlManager->getUrlUfController('show', array('attachedId' => $attachedId, 'width' => 144, 'height' => 144, 'exact' => 'Y', 'signature' => \Bitrix\Disk\Security\ParameterSigner::getImageSignature($attachedId, 144, 144)));
} else {
$previewImageUrl = false;
}
$icon = CMobileHelper::mobileDiskGetIconByFilename($fileName);
$iconUrl = CComponentEngine::makePathFromTemplate('/bitrix/components/bitrix/mobile.disk.file.detail/images/' . $icon);
$fileFata = array('type' => $file->getExtension(), 'ufCode' => $ufCode, 'id' => $attachedId, 'extension' => $file->getExtension(), 'name' => $fileName, 'url' => $fileUrl, 'iconUrl' => $iconUrl);
if ($previewImageUrl) {
$fileFata['previewImageUrl'] = CHTTP::URN2URI($previewImageUrl);
}
$arFileData[] = $fileFata;
}
}
} else {
$data = CWebDavIblock::getRootSectionDataForUser($GLOBALS["USER"]->GetID());
if (is_array($data)) {
$ibe = new CIBlockElement();
$dbWDFile = $ibe->GetList(array(), array('ID' => $arUF[$ufCode]["VALUE"], 'IBLOCK_ID' => $data["IBLOCK_ID"]), false, false, array('ID', 'IBLOCK_ID', 'PROPERTY_FILE'));
while ($arWDFile = $dbWDFile->Fetch()) {
if ($arFile = CFile::GetFileArray($arWDFile["PROPERTY_FILE_VALUE"])) {
if (CFile::IsImage($arFile["FILE_NAME"], $arFile["CONTENT_TYPE"])) {
$imageResized = CFile::ResizeImageGet($arFile["ID"], array("width" => 144, "height" => 144), BX_RESIZE_IMAGE_EXACT, false, true);
$previewImageUrl = $imageResized["src"];
} else {
$previewImageUrl = false;
}
$fileExtension = GetFileExtension($arFile["FILE_NAME"]);
$fileData = array('type' => $fileExtension, 'ufCode' => $ufCode, 'id' => $arWDFile["ID"], 'extension' => $fileExtension, 'name' => $arFile["FILE_NAME"], 'url' => $arFile["SRC"]);
if ($previewImageUrl) {
$fileData['previewImageUrl'] = CHTTP::URN2URI($previewImageUrl);
}
$arFileData[] = $fileData;
}
}
}
}
} else {
$dbRes = CFile::GetList(array(), array("@ID" => implode(",", $arUF[$ufCode]["VALUE"])));
while ($arFile = $dbRes->GetNext()) {
if (CFile::IsImage($arFile["FILE_NAME"], $arFile["CONTENT_TYPE"])) {
$imageResized = CFile::ResizeImageGet($arFile["ID"], array("width" => 144, "height" => 144), BX_RESIZE_IMAGE_EXACT, false, true);
$previewImageUrl = $imageResized["src"];
} else {
$previewImageUrl = false;
}
$fileExtension = GetFileExtension($arFile["FILE_NAME"]);
$fileData = array('type' => $fileExtension, 'ufCode' => $ufCode, 'id' => $arFile["ID"], 'extension' => $fileExtension, 'name' => $arFile["FILE_NAME"], 'downloadUrl' => $arFile["SRC"]);
if ($previewImageUrl) {
$fileData['previewImageUrl'] = CHTTP::URN2URI($previewImageUrl);
}
$arFileData[] = $fileData;
}
}
}
return $arFileData;
}
示例8: getUrl
/**
* @param string $hash
* @param string $act
* @return string
*/
public function getUrl($hash, $act = "view")
{
return \CHTTP::URN2URI($this->script . (strpos($this->script, "?") === false ? "?" : "&") . \CHTTP::PrepareData(array(self::INFO_NAME => array("CID" => $this->CID, "mode" => $act, "hash" => $hash))));
}
示例9: md5
$arParams['MULTIPLE'] = $arParams['MULTIPLE'] == 'N' ? 'N' : 'Y';
if (!$arParams['INPUT_NAME'])
{
showError(GetMessage('MFI_ERR_NO_INPUT_NAME'));
return false;
}
$arResult['CONTROL_UID'] = md5(randString(15));
$_SESSION["MFI_UPLOADED_FILES_".$arResult['CONTROL_UID']] = array();
$arResult['FILES'] = array();
if (is_array($arParams['INPUT_VALUE']) && strlen(implode(",", $arParams["INPUT_VALUE"])) > 0)
{
$dbRes = CFile::GetList(array(), array("@ID" => implode(",", $arParams["INPUT_VALUE"])));
while ($arFile = $dbRes->GetNext())
{
$arFile['URL'] = CHTTP::URN2URI($APPLICATION->GetCurPageParam("mfi_mode=down&fileID=".$arFile['ID']."&cid=".$arResult['CONTROL_UID']."&".bitrix_sessid_get(), array("mfi_mode", "fileID", "cid")));
$arFile['FILE_SIZE_FORMATTED'] = CFile::FormatSize($arFile['FILE_SIZE']);
$arResult['FILES'][$arFile['ID']] = $arFile;
$_SESSION["MFI_UPLOADED_FILES_".$arResult['CONTROL_UID']][] = $arFile['ID'];
}
}
CUtil::InitJSCore(array('ajax'));
$this->IncludeComponentTemplate();
return $arParams['CONTROL_ID'];
示例10: array
die;
}
global $APPLICATION, $USER;
$APPLICATION->SetAdditionalCSS('/bitrix/js/crm/css/crm.css');
$APPLICATION->SetAdditionalCSS("/bitrix/themes/.default/crm-entity-show.css");
if (SITE_TEMPLATE_ID === 'bitrix24') {
$APPLICATION->SetAdditionalCSS("/bitrix/themes/.default/bitrix24/crm-entity-show.css");
}
//CrmContact
$obRes = CCrmContact::GetList(array('LAST_NAME' => 'ASC', 'NAME' => 'ASC'), array(), array('ID', 'FULL_NAME', 'COMPANY_TITLE', 'PHOTO'), 50);
$arFiles = array();
$arContacts = array();
while ($arRes = $obRes->Fetch()) {
if (!empty($arRes['PHOTO']) && !isset($arFiles[$arRes['PHOTO']])) {
if ($arFile = CFile::GetFileArray($arRes['PHOTO'])) {
$arFiles[$arRes['PHOTO']] = CHTTP::URN2URI($arFile["SRC"]);
}
}
$arContacts[] = array('id' => $arRes['ID'], 'url' => CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_contact_show'), array('contact_id' => $arRes['ID'])), 'title' => str_replace(array(';', ','), ' ', $arRes['FULL_NAME']), 'desc' => empty($arRes['COMPANY_TITLE']) ? '' : $arRes['COMPANY_TITLE'], 'image' => isset($arFiles[$arRes['PHOTO']]) ? $arFiles[$arRes['PHOTO']] : '', 'type' => 'contact', 'selected' => false);
}
$arResult['PREFIX'] = isset($arResult['PREFIX']) ? strval($arResult['PREFIX']) : 'activity_list';
$editorCfg = array('OWNER_TYPE' => $arResult['OWNER_TYPE'], 'OWNER_ID' => $arResult['OWNER_ID'], 'READ_ONLY' => $arResult['READ_ONLY'], 'ENABLE_UI' => true, 'ENABLE_TASK_ADD' => $arResult['ENABLE_TASK_ADD'], 'ENABLE_CALENDAR_EVENT_ADD' => $arResult['ENABLE_CALENDAR_EVENT_ADD'], 'ENABLE_EMAIL_ADD' => $arResult['ENABLE_EMAIL_ADD']);
if (!function_exists('__CrmActivityListRenderItems')) {
function __CrmActivityListRenderItems($items, $showMode, $showTop, &$editorCfg)
{
$editorItems = array();
$count = count($items);
$now = time() + CTimeZone::GetOffset();
$toolbarID = '';
if ($editorCfg['ENABLE_TOOLBAR']) {
$toolbarID = $editorCfg['EDITOR_ID'] . '_toolbar';
示例11: call_user_func_array
$VALUE_NAME = 'FIELDS[' . $f_ID . '][PROPERTY_' . $prop['ID'] . '][' . $prop['PROPERTY_VALUE_ID'] . '][VALUE]';
$DESCR_NAME = 'FIELDS[' . $f_ID . '][PROPERTY_' . $prop['ID'] . '][' . $prop['PROPERTY_VALUE_ID'] . '][DESCRIPTION]';
//View part
if (array_key_exists("GetAdminListViewHTML", $arUserType)) {
$arViewHTML[] = call_user_func_array($arUserType["GetAdminListViewHTML"], array($prop, array("VALUE" => $prop["~VALUE"], "DESCRIPTION" => $prop["~DESCRIPTION"]), array("VALUE" => $VALUE_NAME, "DESCRIPTION" => $DESCR_NAME, "MODE" => "iblock_element_admin", "FORM_NAME" => "form_" . $sTableID)));
} elseif ($prop['PROPERTY_TYPE'] == 'N') {
$arViewHTML[] = $bExcel && isset($_COOKIE[$dsc_cookie_name]) ? number_format($prop["VALUE"], 4, chr($_COOKIE[$dsc_cookie_name]), '') : $prop["VALUE"];
} elseif ($prop['PROPERTY_TYPE'] == 'S') {
$arViewHTML[] = $prop["VALUE"];
} elseif ($prop['PROPERTY_TYPE'] == 'L') {
$arViewHTML[] = $prop["VALUE_ENUM"];
} elseif ($prop['PROPERTY_TYPE'] == 'F') {
if ($bExcel) {
$arFile = CFile::GetFileArray($prop["VALUE"]);
if (is_array($arFile)) {
$arViewHTML[] = CHTTP::URN2URI($arFile["SRC"]);
} else {
$arViewHTML[] = "";
}
} else {
$arViewHTML[] = CFileInput::Show('NO_FIELDS[' . $prop['PROPERTY_VALUE_ID'] . ']', $prop["VALUE"], array("IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => $maxImageSize, "MIN_SIZE" => $minImageSize), array('upload' => false, 'medialib' => false, 'file_dialog' => false, 'cloud' => false, 'del' => false, 'description' => false));
}
} elseif ($prop['PROPERTY_TYPE'] == 'G') {
if (intval($prop["VALUE"]) > 0) {
$rsSection = CIBlockSection::GetList(array(), array("ID" => $prop["VALUE"]), false, array('ID', 'NAME', 'IBLOCK_ID'));
if ($arSection = $rsSection->GetNext()) {
$arViewHTML[] = $arSection['NAME'] . ' [<a href="' . htmlspecialcharsbx(CIBlock::GetAdminSectionEditLink($arSection['IBLOCK_ID'], $arSection['ID'])) . '" title="' . GetMessage("IBEL_A_SEC_EDIT") . '">' . $arSection['ID'] . '</a>]';
}
}
} elseif ($prop['PROPERTY_TYPE'] == 'E') {
if ($t = GetElementName($prop["VALUE"])) {
示例12: str_replace
$arItem["description"] = str_replace($arNodesSearch, $arNodesReplace, $arResult["NODES"]["description"]);
else
$arItem["description"]=htmlspecialcharsbx(($arElement["PREVIEW_TEXT"] || $arParams["YANDEX"]) ? $arElement["PREVIEW_TEXT"] : $arElement["DETAIL_TEXT"]);
if(strlen($arResult["NODES"]["enclosure"])>0)
{
$arItem["enclosure"] = array(
"url" => str_replace($arNodesSearch, $arNodesReplace, $arResult["NODES"]["enclosure"]),
"length" => str_replace($arNodesSearch, $arNodesReplace, $arResult["NODES"]["enclosure_length"]),
"type" => str_replace($arNodesSearch, $arNodesReplace, $arResult["NODES"]["enclosure_type"]),
);
}
elseif(is_array($arElement["arr_PREVIEW_PICTURE"]))
{
$arItem["enclosure"] = array(
"url" => CHTTP::URN2URI($arElement["arr_PREVIEW_PICTURE"]["SRC"], $arResult["SERVER_NAME"]),
"length" => $arElement["arr_PREVIEW_PICTURE"]["FILE_SIZE"],
"type" => $arElement["arr_PREVIEW_PICTURE"]["CONTENT_TYPE"],
);
}
else
{
$arItem["enclosure"]=false;
}
if(strlen($arResult["NODES"]["category"])>0)
{
$arItem["category"] = str_replace($arNodesSearch, $arNodesReplace, $arResult["NODES"]["category"]);
}
else
{
示例13: gadgetAuthorize
public function gadgetAuthorize()
{
global $APPLICATION;
$APPLICATION->RestartBuffer();
if (isset($_REQUEST["code"]) && $_REQUEST["code"] != '' && CSocServAuthManager::CheckUniqueKey()) {
CUserOptions::SetOption('socialservices', 'bitrix24_task_planer_gadget_code', $_REQUEST["code"]);
}
$url = \CHTTP::URN2URI(BX_ROOT);
$mode = 'opener';
$url = CUtil::JSEscape($url);
$location = $mode == "opener" ? 'if(window.opener) window.opener.location = \'' . $url . '\'; window.close();' : ' window.location = \'' . $url . '\';';
$JSScript = '
<script type="text/javascript">
' . $location . '
</script>
';
echo $JSScript;
die;
}
示例14: getFriendsList
public function getFriendsList($limit = 0, $offset = 0)
{
$li = new CLiveIDOAuthInterface();
if (IsModuleInstalled('bitrix24') && defined('BX24_HOST_NAME')) {
$redirect_uri = self::CONTROLLER_URL . "/redirect.php";
} else {
$redirect_uri = \CHTTP::URN2URI("/bitrix/tools/oauth/liveid.php");
}
if ($li->GetAccessToken($redirect_uri) !== false) {
$res = $li->GetCurrentUserFriends($limit, $offset);
}
if (is_array($res) && is_array($res['data'])) {
foreach ($res['data'] as $key => $contact) {
$res['data'][$key]['uid'] = $contact['id'];
$res['data'][$key]['url'] = $this->getProfileUrl($contact['id']);
}
return $res['data'];
}
return false;
}
示例15: GetMessage
?>
" title="<?php
echo GetMessage("P_SLIDE_SHOW_TITLE");
?>
"><span><?php
echo GetMessage("P_SLIDE_SHOW");
?>
</span></a>
</li>
<?php
}
?>
<?php
if (!empty($arResult["ELEMENT"]["REAL_PICTURE"]["SRC"])) {
$url = CHTTP::URN2URI($arResult["ELEMENT"]["REAL_PICTURE"]["SRC"]);
?>
<li class="photo-control photo-control-photo-original">
<a rel="nofollow" href="<?php
echo $url;
?>
" title="<?php
echo GetMessage("P_ORIGINAL_TITLE");
?>
" onclick="ShowOriginal('<?php
echo CUtil::JSEscape(htmlspecialcharsex($url));
?>
', '<?php
echo CUtil::JSEscape($arResult["ELEMENT"]["NAME"]);
?>
'); return false;"><span><?php