本文整理汇总了PHP中htmlspecialcharsex函数的典型用法代码示例。如果您正苦于以下问题:PHP htmlspecialcharsex函数的具体用法?PHP htmlspecialcharsex怎么用?PHP htmlspecialcharsex使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了htmlspecialcharsex函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: SelectBox
function SelectBox($sFieldName, $sValue, $sDefaultValue = "", $JavaChangeFunc = "", $sAdditionalParams = "")
{
if (empty(self::$arExtraCache)) {
$rsExtras = CExtra::GetList(array("NAME" => "ASC"));
while ($arExtra = $rsExtras->Fetch()) {
$arExtra['ID'] = intval($arExtra['ID']);
self::$arExtraCache[$arExtra['ID']] = $arExtra;
if (defined('CATALOG_GLOBAL_VARS') && 'Y' == CATALOG_GLOBAL_VARS) {
global $MAIN_EXTRA_LIST_CACHE;
$MAIN_EXTRA_LIST_CACHE = self::$arExtraCache;
}
}
}
$s = '<select name="' . $sFieldName . '"';
if (!empty($JavaChangeFunc)) {
$s .= ' onchange="' . $JavaChangeFunc . '"';
}
if (!empty($sAdditionalParams)) {
$s .= ' ' . $sAdditionalParams . ' ';
}
$s .= '>';
$sValue = intval($sValue);
$boolFound = isset(self::$arExtraCache[$sValue]);
if (!empty($sDefaultValue)) {
$s .= '<option value="0"' . ($boolFound ? '' : ' selected') . '>' . htmlspecialcharsex($sDefaultValue) . '</option>';
}
foreach (self::$arExtraCache as &$arExtra) {
$s .= '<option value="' . $arExtra['ID'] . '"' . ($arExtra['ID'] == $sValue ? ' selected' : '') . '>' . htmlspecialcharsex($arExtra['NAME']) . ' (' . htmlspecialcharsex($arExtra['PERCENTAGE']) . '%)</option>';
}
if (isset($arExtra)) {
unset($arExtra);
}
return $s . '</select>';
}
开发者ID:Satariall,项目名称:izurit,代码行数:34,代码来源:extra.php
示例2: getProductInfo
/** Returns an array, containing information about the product block on its ID.
* @param $elementId
* @return array|string
*/
public static function getProductInfo($elementId)
{
$elementId = intval($elementId);
$result = "";
if ($elementId <= 0) {
return $result;
}
$dbProduct = CIBlockElement::GetList(array(), array("ID" => $elementId), false, false, array('ID', 'IBLOCK_ID', 'IBLOCK_SECTION_ID', 'DETAIL_PICTURE', 'PREVIEW_PICTURE', 'NAME', 'XML_ID'));
while ($arProduct = $dbProduct->GetNext()) {
$imgCode = "";
if ($arProduct["IBLOCK_ID"] > 0) {
$arProduct["EDIT_PAGE_URL"] = CIBlock::GetAdminElementEditLink($arProduct["IBLOCK_ID"], $elementId, array("find_section_section" => $arProduct["IBLOCK_SECTION_ID"]));
}
if ($arProduct["DETAIL_PICTURE"] > 0) {
$imgCode = $arProduct["DETAIL_PICTURE"];
} elseif ($arProduct["PREVIEW_PICTURE"] > 0) {
$imgCode = $arProduct["PREVIEW_PICTURE"];
}
$arProduct["NAME"] = $arProduct["NAME"];
$arProduct["DETAIL_PAGE_URL"] = htmlspecialcharsex($arProduct["DETAIL_PAGE_URL"]);
if ($imgCode > 0) {
$arFile = CFile::GetFileArray($imgCode);
$arImgProduct = CFile::ResizeImageGet($arFile, array('width' => 80, 'height' => 80), BX_RESIZE_IMAGE_PROPORTIONAL, false, false);
$arProduct["IMG_URL"] = $arImgProduct['src'];
}
return $arProduct;
}
return $result;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:33,代码来源:store_utility.php
示例3: ListAddFilterFields
public function ListAddFilterFields(&$arFilterFields, &$arFilterLogic, $sFormName = 'form1', $bVarsFromForm = true)
{
global $APPLICATION;
$arUserFields = $this->GetUserFields($this->sEntityID, 0, LANGUAGE_ID);
foreach ($arUserFields as $FIELD_NAME => $arUserField) {
if ($arUserField['SHOW_FILTER'] != 'N' && $arUserField['USER_TYPE']['BASE_TYPE'] != 'file') {
if ($arUserField['USER_TYPE']['USER_TYPE_ID'] === 'employee') {
$arFilterFields[] = array('id' => $FIELD_NAME, 'name' => htmlspecialcharsex($arUserField['LIST_FILTER_LABEL']), 'type' => 'user', 'enable_settings' => false);
continue;
}
if ($arUserField['USER_TYPE']['BASE_TYPE'] == 'enum' || $arUserField['USER_TYPE']['USER_TYPE_ID'] == 'iblock_element' || $arUserField['USER_TYPE']['USER_TYPE_ID'] == 'iblock_section') {
// Fix #29649. Allow user to add not multiple fields with height 1 item.
if ($arUserField['MULTIPLE'] !== 'Y' && isset($arUserField['SETTINGS']['LIST_HEIGHT']) && intval($arUserField['SETTINGS']['LIST_HEIGHT']) > 1) {
$arUserField['MULTIPLE'] = 'Y';
}
//as the system presets the filter can not work with the field names containing []
if ($arUserField['SETTINGS']['DISPLAY'] == 'CHECKBOX') {
$arUserField['SETTINGS']['DISPLAY'] = '';
}
}
ob_start();
$APPLICATION->IncludeComponent('bitrix:crm.field.filter', $arUserField['USER_TYPE']['USER_TYPE_ID'], array('arUserField' => $arUserField, 'bVarsFromForm' => $bVarsFromForm, 'form_name' => 'filter_' . $sFormName, 'bShowNotSelected' => true), false, array('HIDE_ICONS' => true));
$sVal = ob_get_contents();
ob_end_clean();
$arFilterFields[] = array('id' => $FIELD_NAME, 'name' => htmlspecialcharsex($arUserField['LIST_FILTER_LABEL']), 'type' => 'custom', 'value' => $sVal);
// Fix issue #49771 - do not treat 'crm' type values as strings. To suppress filtration by LIKE.
// Fix issue #56844 - do not treat 'crm_status' type values as strings. To suppress filtration by LIKE.
if ($arUserField['USER_TYPE']['BASE_TYPE'] == 'string' && $arUserField['USER_TYPE']['USER_TYPE_ID'] !== 'crm' && $arUserField['USER_TYPE']['USER_TYPE_ID'] !== 'crm_status') {
$arFilterLogic[] = $FIELD_NAME;
}
}
}
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:33,代码来源:crm_usertype.php
示例4: getData
public function getData($bEscape = true)
{
if ($this->cachedData === null) {
// Ensure that we have read access for task
$this->oTaskItem->getData();
try {
$this->cachedData = static::fetchDataFromDb($this->taskId, $this->itemId);
} catch (Exception $e) {
throw new TasksException('', TasksException::TE_ITEM_NOT_FOUND_OR_NOT_ACCESSIBLE);
}
}
if ($bEscape) {
// Prepare escaped data on-demand
if ($this->cachedEscapedData === null) {
foreach ($this->cachedData as $field => $value) {
$this->cachedEscapedData['~' . $field] = $value;
if (is_numeric($value) || !is_string($value)) {
$this->cachedEscapedData[$field] = $value;
} else {
$this->cachedEscapedData[$field] = htmlspecialcharsex($value);
}
}
}
return $this->cachedEscapedData;
} else {
return $this->cachedData;
}
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:28,代码来源:subtaskitemabstract.php
示例5: getProductInfo
function getProductInfo($arData)
{
$result = "";
if (!is_array($arData) || count($arData) <= 0) {
return $result;
}
$dbProduct = CIBlockElement::GetList(array(), array("ID" => $arData["ELEMENT_ID"]), false, false, array('ID', 'IBLOCK_ID', 'IBLOCK_SECTION_ID', 'DETAIL_PICTURE', 'PREVIEW_PICTURE', 'IBLOCK_TYPE_ID', 'NAME'));
while ($arProduct = $dbProduct->GetNext()) {
$imgCode = "";
if ($arProduct["IBLOCK_ID"] > 0) {
$arProduct["EDIT_PAGE_URL"] = "/bitrix/admin/iblock_element_edit.php?ID=" . $arProduct["ID"] . "&type=" . $arProduct["IBLOCK_TYPE_ID"] . "&lang=" . LANG . "&IBLOCK_ID=" . $arProduct["IBLOCK_ID"] . "&find_section_section=" . intval($arProduct["IBLOCK_SECTION_ID"]);
}
if ($arProduct["DETAIL_PICTURE"] > 0) {
$imgCode = $arProduct["DETAIL_PICTURE"];
} elseif ($arProduct["PREVIEW_PICTURE"] > 0) {
$imgCode = $arProduct["PREVIEW_PICTURE"];
}
$arProduct["NAME"] = htmlspecialcharsex($arProduct["NAME"]);
$arProduct["DETAIL_PAGE_URL"] = htmlspecialcharsex($arProduct["DETAIL_PAGE_URL"]);
$arProduct["CURRENCY"] = htmlspecialcharsex($arProduct["CURRENCY"]);
if ($imgCode > 0) {
$arFile = CFile::GetFileArray($imgCode);
$arImgProduct = CFile::ResizeImageGet($arFile, array('width' => 80, 'height' => 80), BX_RESIZE_IMAGE_PROPORTIONAL, false, false);
$arProduct["IMG_URL"] = $arImgProduct['src'];
}
return $arProduct;
}
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:28,代码来源:cat_store_document.php
示例6: InputTags
function InputTags($sName="", $sValue="", $arSites=array(), $sHTML="", $sId="")
{
if(!$sId)
$sId = GenerateUniqId($sName);
TagsShowScript();
$order = class_exists("cuseroptions")? CUserOptions::GetOption("search_tags", "order", "CNT"): "CNT";
return '<input name="'.htmlspecialcharsbx($sName).'" id="'.htmlspecialcharsbx($sId).'" type="text" autocomplete="off" value="'.htmlspecialcharsex($sValue).'" onfocus="'.htmlspecialcharsbx('window.oObject[this.id] = new JsTc(this, '.CUtil::PhpToJSObject($arSites).');').'" '.$sHTML.'/><input type="checkbox" id="ck_'.$sId.'" name="ck_'.htmlspecialcharsbx($sName).'" '.($order=="NAME"? "checked": "").' title="'.GetMessage("SEARCH_TAGS_SORTING_TIP").'">';
}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:8,代码来源:tags.php
示例7: GetAdminListViewHTML
function GetAdminListViewHTML($arProperty, $value, $strHTMLControlName)
{
if (strlen($value["VALUE"]) > 0) {
if (!CheckDateTime($value["VALUE"])) {
$value = CIBlockPropertyDateTime::ConvertFromDB($arProperty, $value);
}
return str_replace(" ", " ", htmlspecialcharsex($value["VALUE"]));
} else {
return ' ';
}
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:11,代码来源:prop_datetime.php
示例8: Fetch
public function Fetch()
{
$r = parent::Fetch();
if($r)
{
if(strlen($r["SITE_URL"])>0)
$r["URL"] = $r["SITE_URL"];
if(substr($r["URL"], 0, 1)=="=")
{
$events = GetModuleEvents("search", "OnSearchGetURL");
while ($arEvent = $events->Fetch())
$r["URL"] = ExecuteModuleEventEx($arEvent, array($r));
}
$r["URL"] = str_replace(
array("#LANG#", "#SITE_DIR#", "#SERVER_NAME#"),
array($r["DIR"], $r["DIR"], $r["SERVER_NAME"]),
$r["URL"]
);
$r["URL"] = preg_replace("'(?<!:)/+'s", "/", $r["URL"]);
$r["NAME"] = htmlspecialcharsex($r["TITLE"]);
$preg_template = "/(^|[^".$this->_arStemFunc["pcre_letters"]."])(".str_replace("/", "\\/", implode("|", array_map('preg_quote', array_keys($this->_arPhrase)))).")/i".BX_UTF_PCRE_MODIFIER;
if(preg_match_all($preg_template, ToUpper($r["NAME"]), $arMatches, PREG_OFFSET_CAPTURE))
{
$c = count($arMatches[2]);
if(defined("BX_UTF"))
{
for($j = $c-1; $j >= 0; $j--)
{
$prefix = mb_substr($r["NAME"], 0, $arMatches[2][$j][1], 'latin1');
$instr = mb_substr($r["NAME"], $arMatches[2][$j][1], mb_strlen($arMatches[2][$j][0], 'latin1'), 'latin1');
$suffix = mb_substr($r["NAME"], $arMatches[2][$j][1] + mb_strlen($arMatches[2][$j][0], 'latin1'), mb_strlen($r["NAME"], 'latin1'), 'latin1');
$r["NAME"] = $prefix."<b>".$instr."</b>".$suffix;
}
}
else
{
for($j = $c-1; $j >= 0; $j--)
{
$prefix = substr($r["NAME"], 0, $arMatches[2][$j][1]);
$instr = substr($r["NAME"], $arMatches[2][$j][1], strlen($arMatches[2][$j][0]));
$suffix = substr($r["NAME"], $arMatches[2][$j][1]+strlen($arMatches[2][$j][0]));
$r["NAME"] = $prefix."<b>".$instr."</b>".$suffix;
}
}
}
}
return $r;
}
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:54,代码来源:title.php
示例9: GetInfoHTML
function GetInfoHTML($params = array())
{
$html = '';
if (is_array($this->_file)) {
$intWidth = $this->_width;
$intHeight = $this->_height;
$img_src = '';
$divId = '';
if (isset($params['url_template']) && $intWidth > 0 && $intHeight > 0) {
$img_src = $this->GetImgSrc(array('url_template' => $params['url_template']));
if ($img_src) {
CUtil::InitJSCore(array("viewer"));
self::$_counter++;
$divId = 'lists-image-info-' . self::$_counter;
}
}
if ($divId) {
$html .= '<div id="' . $divId . '">';
} else {
$html .= '<div>';
}
if (isset($params['view']) && $params['view'] == 'short') {
$info = $this->_file["FILE_NAME"] . ' (';
if ($intWidth > 0 && $intHeight > 0) {
$info .= $intWidth . 'x' . $intHeight . ', ';
}
$info .= CFile::FormatSize($this->_file['FILE_SIZE']) . ')';
if ($divId) {
$html .= GetMessage('FILE_TEXT') . ': <span style="cursor:pointer" data-bx-viewer="image" data-bx-src="' . htmlspecialcharsbx($img_src) . '">' . htmlspecialcharsex($info) . '</span>';
} else {
$html .= GetMessage('FILE_TEXT') . ': ' . htmlspecialcharsex($info);
}
} else {
if ($divId) {
$html .= GetMessage('FILE_TEXT') . ': <span style="cursor:pointer" data-bx-viewer="image" data-bx-src="' . htmlspecialcharsbx($img_src) . '">' . htmlspecialcharsex($this->_file["FILE_NAME"]) . '</span>';
} else {
$html .= GetMessage('FILE_TEXT') . ': ' . htmlspecialcharsex($this->_file["FILE_NAME"]);
}
/*if($intWidth > 0 && $intHeight > 0)
{
$html .= '<br>'.GetMessage('FILE_WIDTH').': '.$intWidth;
$html .= '<br>'.GetMessage('FILE_HEIGHT').': '.$intHeight;
}*/
$html .= '<br>' . GetMessage('FILE_SIZE') . ': ' . CFile::FormatSize($this->_file['FILE_SIZE']);
}
if ($divId) {
$html .= '</div><script>BX.ready(function(){BX.viewElementBind("' . $divId . '");});</script>';
} else {
$html .= '</div>';
}
}
return $html;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:53,代码来源:crm_product_file.php
示例10: GetAdminListViewHTML
public static function GetAdminListViewHTML($arProperty, $value, $strHTMLControlName)
{
if (!is_array($value["VALUE"])) {
$value = CIBlockPropertyHTML::ConvertFromDB($arProperty, $value);
}
$ar = $value["VALUE"];
if ($ar) {
return htmlspecialcharsex($ar["TYPE"] . ":" . $ar["TEXT"]);
} else {
return " ";
}
}
开发者ID:rasuldev,项目名称:torino,代码行数:12,代码来源:prop_html.php
示例11: GetPropertyFieldHtml
function GetPropertyFieldHtml($arProperty, $value, $strHTMLControlName)
{
$ar_res = false;
if (strlen($value["VALUE"])) {
$db_res = CIBlockElement::GetList(array(), array("=XML_ID" => $value["VALUE"], "SHOW_HISTORY" => "Y"), false, false, array("ID", "IBLOCK_ID", "NAME"));
$ar_res = $db_res->GetNext();
}
if (!$ar_res) {
$ar_res = array("NAME" => "");
}
return '<input name="' . htmlspecialcharsbx($strHTMLControlName["VALUE"]) . '" id="' . htmlspecialcharsbx($strHTMLControlName["VALUE"]) . '" value="' . htmlspecialcharsex($value["VALUE"]) . '" size="20" type="text">' . '<input type="button" value="..." onClick="jsUtils.OpenWindow(\'' . CUtil::JSEscape('/bitrix/admin/iblock_element_search.php?lang=' . LANG . '&n=' . urlencode($strHTMLControlName["VALUE"]) . '&get_xml_id=Y&a=b') . '\', 600, 500);">' . ' <span id="sp_' . htmlspecialcharsbx($strHTMLControlName["VALUE"]) . '" >' . $ar_res['NAME'] . '</span>';
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:12,代码来源:prop_xmlid.php
示例12: _get_sections_menu
function _get_sections_menu($arType, $arIBlock, $DEPTH_LEVEL, $SECTION_ID, $arSectionsChain = false)
{
//Determine opened sections
if ($arSectionsChain === false) {
$arSectionsChain = array();
if (isset($_REQUEST['admin_mnu_menu_id'])) {
$menu_id = "menu_iblock_/" . $arType["ID"] . "/" . $arIBlock["ID"] . "/";
if (strncmp($_REQUEST['admin_mnu_menu_id'], $menu_id, strlen($menu_id)) == 0) {
$rsSections = CIBlockSection::GetNavChain($arIBlock["ID"], substr($_REQUEST['admin_mnu_menu_id'], strlen($menu_id)), array('ID', 'IBLOCK_ID'));
while ($arSection = $rsSections->Fetch()) {
$arSectionsChain[$arSection["ID"]] = $arSection["ID"];
}
}
}
if (isset($_REQUEST["find_section_section"]) && (int) $_REQUEST["find_section_section"] > 0 && isset($_REQUEST["IBLOCK_ID"]) && $_REQUEST["IBLOCK_ID"] == $arIBlock["ID"]) {
$rsSections = CIBlockSection::GetNavChain($arIBlock["ID"], $_REQUEST["find_section_section"], array('ID', 'IBLOCK_ID'));
while ($arSection = $rsSections->Fetch()) {
$arSectionsChain[$arSection["ID"]] = $arSection["ID"];
}
}
}
$urlSectionAdminPage = CIBlock::GetAdminSectionListLink($arIBlock["ID"], array("menu" => null));
$arSections = array();
if (CIBlock::GetAdminListMode($arIBlock["ID"]) == 'S') {
$arSections[] = _get_elements_menu($arType, $arIBlock, $SECTION_ID);
}
$rsSections = CIBlockSection::GetList(array("left_margin" => "ASC"), array("IBLOCK_ID" => $arIBlock["ID"], "SECTION_ID" => $SECTION_ID), false, array("ID", "IBLOCK_SECTION_ID", "NAME", "LEFT_MARGIN", "RIGHT_MARGIN"));
$sectionCount = 0;
$limit = COption::GetOptionInt("iblock", "iblock_menu_max_sections");
while ($arSection = $rsSections->Fetch()) {
if ($limit > 0 && $sectionCount >= $limit) {
$arSections[] = array("text" => GetMessage("IBLOCK_MENU_ALL_OTH"), "url" => htmlspecialcharsbx($urlSectionAdminPage . "&find_section_section=" . (int) $arSection["IBLOCK_SECTION_ID"]), "more_url" => array($urlSectionAdminPage . "&find_section_section=" . (int) $arSection["IBLOCK_SECTION_ID"], $urlSectionAdminPage, "iblock_section_edit.php?" . $arIBlock["URL_PART"], "iblock_element_edit.php?IBLOCK_ID=" . $arIBlock["ID"] . "&type=" . $arType["ID"], "iblock_history_list.php?IBLOCK_ID=" . $arIBlock["ID"] . "&type=" . $arType["ID"]), "title" => GetMessage("IBLOCK_MENU_ALL_OTH_TITLE"), "icon" => "iblock_menu_icon_sections", "page_icon" => "iblock_page_icon_sections", "skip_chain" => true, "items_id" => "menu_iblock_/" . $arType["ID"] . "/" . $arIBlock["ID"] . "/" . $arSection["ID"], "module_id" => "iblock", "items" => array());
_get_other_elements_menu($arType, $arIBlock, $arSection, $arSections[0]["more_url"]);
break;
}
$arSectionTmp = array("text" => htmlspecialcharsex($arSection["NAME"]), "url" => htmlspecialcharsbx($urlSectionAdminPage . "&find_section_section=" . $arSection["ID"]), "more_url" => array($urlSectionAdminPage . "&find_section_section=" . $arSection["ID"], "iblock_section_edit.php?" . $arIBlock["URL_PART"] . "&ID=" . $arSection["ID"], "iblock_section_edit.php?" . $arIBlock["URL_PART"] . "&ID=0&find_section_section=" . $arSection["ID"], "iblock_element_edit.php?IBLOCK_ID=" . $arIBlock["ID"] . "&type=" . $arType["ID"] . "&find_section_section=" . $arSection["ID"], "iblock_history_list.php?IBLOCK_ID=" . $arIBlock["ID"] . "&type=" . $arType["ID"] . "&find_section_section=" . $arSection["ID"]), "title" => htmlspecialcharsex($arSection["NAME"]), "icon" => "iblock_menu_icon_sections", "page_icon" => "iblock_page_icon_sections", "skip_chain" => true, "dynamic" => CIBlock::GetAdminListMode($arIBlock["ID"]) == 'S' || $arSection["RIGHT_MARGIN"] - $arSection["LEFT_MARGIN"] > 1, "items_id" => "menu_iblock_/" . $arType["ID"] . "/" . $arIBlock["ID"] . "/" . $arSection["ID"], "module_id" => "iblock", "items" => array());
if (array_key_exists($arSection["ID"], $arSectionsChain)) {
$arSectionTmp["items"] = _get_sections_menu($arType, $arIBlock, $DEPTH_LEVEL + 1, $arSection["ID"], $arSectionsChain);
} elseif (method_exists($GLOBALS["adminMenu"], "IsSectionActive")) {
if ($GLOBALS["adminMenu"]->IsSectionActive("menu_iblock_/" . $arType["ID"] . "/" . $arIBlock["ID"] . "/" . $arSection["ID"])) {
$arSectionTmp["items"] = _get_sections_menu($arType, $arIBlock, $DEPTH_LEVEL + 1, $arSection["ID"], $arSectionsChain);
}
}
$arSections[] = $arSectionTmp;
$sectionCount++;
}
while ($arSection = $rsSections->Fetch()) {
$urlElementAdminPage = CIBlock::GetAdminElementListLink($arIBlock["ID"], array("menu" => null));
$arSections[0]["more_url"][] = $urlElementAdminPage . "&find_section_section=" . (int) $arSection["ID"];
}
return $arSections;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:52,代码来源:menu.php
示例13: GetInfoHTML
function GetInfoHTML()
{
$html = '';
if (is_array($this->_file)) {
$html .= GetMessage('FILE_TEXT') . ': ' . htmlspecialcharsex($this->_file["FILE_NAME"]);
$intWidth = $this->_width;
$intHeight = $this->_height;
if ($intWidth > 0 && $intHeight > 0) {
$html .= '<br>' . GetMessage('FILE_WIDTH') . ': ' . $intWidth;
$html .= '<br>' . GetMessage('FILE_HEIGHT') . ': ' . $intHeight;
}
$html .= '<br>' . GetMessage('FILE_SIZE') . ': ' . CFile::FormatSize($this->_file['FILE_SIZE']);
}
return $html;
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:15,代码来源:listfile.php
示例14: UsersArrayToStringInternal
private static function UsersArrayToStringInternal($arUsers, $arWorkflowTemplate, $arAllowableUserGroups, $appendId = true)
{
if (is_array($arUsers)) {
$r = array();
$keys = array_keys($arUsers);
foreach ($keys as $key) {
$r[$key] = self::UsersArrayToStringInternal($arUsers[$key], $arWorkflowTemplate, $arAllowableUserGroups, $appendId);
}
if (count($r) == 2) {
$keys = array_keys($r);
if ($keys[0] == 0 && $keys[1] == 1 && is_string($r[0]) && is_string($r[1])) {
if (in_array($r[0], array("Document", "Template", "Variable", "User")) || preg_match('#^A\\d+_\\d+_\\d+_\\d+$#i', $r[0]) || is_array($arWorkflowTemplate) && CBPWorkflowTemplateLoader::FindActivityByName($arWorkflowTemplate, $r[0]) != null) {
return "{=" . $r[0] . ":" . $r[1] . "}";
}
}
}
return implode(", ", $r);
} else {
if (array_key_exists(strtolower($arUsers), $arAllowableUserGroups)) {
return $arAllowableUserGroups[strtolower($arUsers)];
}
$userId = 0;
if (substr($arUsers, 0, strlen("user_")) == "user_") {
$userId = intval(substr($arUsers, strlen("user_")));
}
if ($userId > 0) {
$db = CUser::GetList($by = "LAST_NAME", $order = "asc", array("ID_EQUAL_EXACT" => $userId), array("NAV_PARAMS" => false));
if ($ar = $db->Fetch()) {
$str = CUser::FormatName(COption::GetOptionString("bizproc", "name_template", CSite::GetNameFormat(false), SITE_ID), $ar, true, false);
if ($appendId) {
$str = $str . " [" . $ar["ID"] . "]";
}
return str_replace(",", " ", $str);
}
} else {
if (strpos($arUsers, 'group_') === 0) {
$str = htmlspecialcharsex(self::getExtendedGroupName($arUsers, $appendId));
return str_replace(",", " ", $str);
}
}
return str_replace(",", " ", $arUsers);
}
}
开发者ID:k-kalashnikov,项目名称:geekcon,代码行数:43,代码来源:helper.php
示例15: GetUserName
function GetUserName($USER_ID, $nameTemplate = "")
{
$ar_res = false;
if (IntVal($USER_ID) > 0) {
$db_res = CUser::GetByID(IntVal($USER_ID));
$ar_res = $db_res->Fetch();
}
if (!$ar_res) {
$db_res = CUser::GetByLogin($USER_ID);
$ar_res = $db_res->Fetch();
}
$USER_ID = IntVal($ar_res["ID"]);
$f_LOGIN = htmlspecialcharsex($ar_res["LOGIN"]);
$forum_user = CForumUser::GetByUSER_ID($USER_ID);
if ($forum_user["SHOW_NAME"] == "Y" && (strlen(trim($ar_res["NAME"])) > 0 || strlen(trim($ar_res["LAST_NAME"])) > 0)) {
$nameTemplate = trim(empty($nameTemplate)) ? CSite::GetNameFormat() : $nameTemplate;
return trim(CUser::FormatName($nameTemplate, array("NAME" => htmlspecialcharsEx($ar_res["NAME"]), "LAST_NAME" => htmlspecialcharsEx($ar_res["LAST_NAME"]), "SECOND_NAME" => htmlspecialcharsEx($ar_res["SECOND_NAME"]))));
} else {
return $f_LOGIN;
}
}
开发者ID:Satariall,项目名称:izurit,代码行数:21,代码来源:component.php
示例16: addPropsCell
function addPropsCell(&$row, &$arSelectedProps, &$arItems)
{
$arProperties = $arItems['PROPERTIES'];
foreach ($arSelectedProps as $aProp) {
if (empty($arProperties[$aProp['ID']])) {
continue;
}
$v = '';
foreach ($arProperties[$aProp['ID']] as $property_value_id => $property_value) {
$res = '';
if ($aProp['PROPERTY_TYPE'] == 'F') {
$res = getImageField($property_value_id, $property_value);
} elseif ($aProp['PROPERTY_TYPE'] == 'G') {
$res = ProductSearchComponent::getSectionName($property_value);
} elseif ($aProp['PROPERTY_TYPE'] == 'E') {
$res = ProductSearchComponent::getElementName($property_value);
} else {
$res = htmlspecialcharsex($property_value);
}
if ($res != "") {
$v .= ($v != '' ? ' / ' : '') . $res;
}
}
if ($v != "") {
$row->AddViewField("PROPERTY_" . $aProp['ID'], $v);
}
}
}
开发者ID:Satariall,项目名称:izurit,代码行数:28,代码来源:template.php
示例17: GetRSSText
function GetRSSText($arIBLOCK, $LIMIT_NUM = false, $LIMIT_DAY = false, $yandex = false)
{
global $DB;
$strRes = "";
$serverName = "";
if (isset($arIBLOCK["SERVER_NAME"]) && strlen($arIBLOCK["SERVER_NAME"]) > 0) {
$serverName = $arIBLOCK["SERVER_NAME"];
}
if (strlen($serverName) <= 0 && !isset($arIBLOCK["SERVER_NAME"])) {
$dbSite = CSite::GetList($b = "sort", $o = "asc", array("LID" => $arIBLOCK["LID"]));
if ($arSite = $dbSite->Fetch()) {
$serverName = $arSite["SERVER_NAME"];
}
}
if (strlen($serverName) <= 0) {
if (defined("SITE_SERVER_NAME") && strlen(SITE_SERVER_NAME) > 0) {
$serverName = SITE_SERVER_NAME;
} else {
$serverName = COption::GetOptionString("main", "server_name", "www.bitrixsoft.com");
}
}
$strRes .= "<channel>\n";
$strRes .= "<title>" . htmlspecialcharsbx($arIBLOCK["NAME"]) . "</title>\n";
$strRes .= "<link>http://" . $serverName . "</link>\n";
$strRes .= "<description>" . htmlspecialcharsbx($arIBLOCK["DESCRIPTION"]) . "</description>\n";
$strRes .= "<lastBuildDate>" . date("r") . "</lastBuildDate>\n";
$strRes .= "<ttl>" . $arIBLOCK["RSS_TTL"] . "</ttl>\n";
$db_img_arr = CFile::GetFileArray($arIBLOCK["PICTURE"]);
if ($db_img_arr) {
if (substr($db_img_arr["SRC"], 0, 1) == "/") {
$strImage = "http://" . $serverName . $db_img_arr["SRC"];
} else {
$strImage = $db_img_arr["SRC"];
}
$strRes .= "<image>\n";
$strRes .= "<title>" . htmlspecialcharsbx($arIBLOCK["NAME"]) . "</title>\n";
$strRes .= "<url>" . $strImage . "</url>\n";
$strRes .= "<link>http://" . $serverName . "</link>\n";
$strRes .= "<width>" . $db_img_arr["WIDTH"] . "</width>\n";
$strRes .= "<height>" . $db_img_arr["HEIGHT"] . "</height>\n";
$strRes .= "</image>\n";
}
$arNodes = array();
$db_res = $DB->Query("SELECT NODE, NODE_VALUE FROM b_iblock_rss WHERE IBLOCK_ID = " . IntVal($arIBLOCK["ID"]));
while ($db_res_arr = $db_res->Fetch()) {
$arNodes[$db_res_arr["NODE"]] = $db_res_arr["NODE_VALUE"];
}
CTimeZone::Disable();
$strSql = "SELECT DISTINCT BE.*, " . "\t" . $DB->DateToCharFunction("BE.TIMESTAMP_X") . " as TIMESTAMP_X, " . "\t" . $DB->DateToCharFunction("BE.ACTIVE_FROM", "FULL") . " as ACTIVE_FROM, " . "\t" . $DB->DateToCharFunction("BE.ACTIVE_TO", "FULL") . " as ACTIVE_TO, " . "\tL.DIR as LANG_DIR, B.DETAIL_PAGE_URL, B.LIST_PAGE_URL, B.LID, L.SERVER_NAME " . "FROM b_iblock_element BE, b_lang L, b_iblock B " . "\tLEFT JOIN b_iblock_group IBG ON IBG.IBLOCK_ID=B.ID " . "WHERE BE.IBLOCK_ID = B.ID " . "\tAND B.LID = L.LID " . "\tAND IBG.GROUP_ID IN (2) " . "\tAND BE.WF_STATUS_ID = 1 AND BE.WF_PARENT_ELEMENT_ID is null " . "\tAND IBG.PERMISSION>='R' " . "\tAND (IBG.PERMISSION='X' OR B.ACTIVE='Y') " . "\tAND (BE.IBLOCK_ID = " . IntVal($arIBLOCK["ID"]) . ") " . "\tAND ((BE.ACTIVE_TO >= " . $DB->GetNowFunction() . " OR BE.ACTIVE_TO IS NULL) AND (BE.ACTIVE_FROM <= " . $DB->GetNowFunction() . " OR BE.ACTIVE_FROM IS NULL)) " . "\tAND (BE.ACTIVE = 'Y') ";
if ($LIMIT_DAY !== false) {
$strSql .= " AND (BE.ACTIVE_FROM>=" . $DB->CharToDateFunction($DB->ForSql(date($DB->DateFormatToPHP(CLang::GetDateFormat("FULL")), mktime(date("H"), date("i"), date("s"), date("m"), date("d") - IntVal($LIMIT_DAY), date("Y")))), "FULL") . " OR BE.ACTIVE_FROM IS NULL) ";
}
$strSql .= "ORDER BY BE.ACTIVE_FROM DESC, BE.SORT ASC ";
$res = $DB->Query($strSql);
CTimeZone::Enable();
$items = new CIBlockResult($res->result);
if ($LIMIT_NUM !== False && IntVal($LIMIT_NUM) > 0) {
$items->NavStart($LIMIT_NUM);
}
while ($arItem = $items->GetNext()) {
$props = CIBlockElement::GetProperty($arIBLOCK["ID"], $arItem["ID"], "sort", "asc", array("ACTIVE" => "Y", "NON_EMPTY" => "Y"));
$arProps = array();
while ($arProp = $props->Fetch()) {
if (strlen($arProp["CODE"]) > 0) {
$arProps[$arProp["CODE"]] = array("NAME" => htmlspecialcharsbx($arProp["NAME"]), "VALUE" => htmlspecialcharsex($arProp["VALUE"]));
} else {
$arProps[$arProp["ID"]] = array("NAME" => htmlspecialcharsbx($arProp["NAME"]), "VALUE" => htmlspecialcharsex($arProp["VALUE"]));
}
}
$arLinkProp = $arProps["DOC_LINK"];
$strRes .= "<item>\n";
if (strlen($arNodes["title"]) > 0) {
$strRes .= "<title>" . htmlspecialcharsbx(CIBlockRSS::ExtractProperties($arNodes["title"], $arProps, $arItem)) . "</title>\n";
} else {
$strRes .= "<title>" . htmlspecialcharsbx($arItem["~NAME"]) . "</title>\n";
}
if (strlen($arNodes["link"]) > 0) {
$strRes .= "<link>" . CIBlockRSS::ExtractProperties($arNodes["link"], $arProps, $arItem) . "</link>\n";
} else {
$strRes .= "<link>http://" . $serverName . ($arLinkProp["VALUE"] ? $arLinkProp["VALUE"] : $arItem["DETAIL_PAGE_URL"]) . "</link>\n";
}
if (strlen($arNodes["description"]) > 0) {
$strRes .= "<description>" . htmlspecialcharsbx(CIBlockRSS::ExtractProperties($arNodes["description"], $arProps, $arItem)) . "</description>\n";
} else {
$strRes .= "<description>" . ($arItem["PREVIEW_TEXT"] || $yandex ? htmlspecialcharsbx($arItem["PREVIEW_TEXT"]) : htmlspecialcharsbx($arItem["DETAIL_TEXT"])) . "</description>\n";
}
if (strlen($arNodes["enclosure"]) > 0) {
$strRes .= "<enclosure url=\"" . htmlspecialcharsbx(CIBlockRSS::ExtractProperties($arNodes["enclosure"], $arProps, $arItem)) . "\" length=\"" . htmlspecialcharsbx(CIBlockRSS::ExtractProperties($arNodes["enclosure_length"], $arProps, $arItem)) . "\" type=\"" . htmlspecialcharsbx(CIBlockRSS::ExtractProperties($arNodes["enclosure_type"], $arProps, $arItem)) . "\"/>\n";
} else {
$db_img_arr = CFile::GetFileArray($arItem["PREVIEW_PICTURE"]);
if ($db_img_arr) {
if (substr($db_img_arr["SRC"], 0, 1) == "/") {
$strImage = "http://" . $serverName . $db_img_arr["SRC"];
} else {
$strImage = $db_img_arr["SRC"];
}
$strRes .= "<enclosure url=\"" . $strImage . "\" length=\"" . $db_img_arr["FILE_SIZE"] . "\" type=\"" . $db_img_arr["CONTENT_TYPE"] . "\" width=\"" . $db_img_arr["WIDTH"] . "\" height=\"" . $db_img_arr["HEIGHT"] . "\"/>\n";
}
}
if (strlen($arNodes["category"]) > 0) {
//.........这里部分代码省略.........
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:101,代码来源:iblockrss.php
示例18: AddDropDownField
function AddDropDownField($id, $content, $required, $arSelect, $value=false, $arParams=array())
{
if($value === false)
$value = $this->arFieldValues[$id];
$html = '<select name="'.$id.'"';
foreach($arParams as $param)
$html .= ' '.$param;
$html .= '>';
foreach($arSelect as $key => $val)
$html .= '<option value="'.htmlspecialcharsbx($key).'"'.($value == $key? ' selected': '').'>'.htmlspecialcharsex($val).'</option>';
$html .= '</select>';
$this->tabs[$this->tabIndex]["FIELDS"][$id] = array(
"id" => $id,
"required" => $required,
"content" => $content,
"html" => '<td width="40%">'.($required? '<span class="adm-required-field">'.$this->GetCustomLabelHTML($id, $content).'</span>': $this->GetCustomLabelHTML($id, $content)).'</td><td>'.$html.'</td>',
"hidden" => '<input type="hidden" name="'.$id.'" value="'.htmlspecialcharsbx($value).'">',
);
}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:22,代码来源:admin_lib.php
-
** REJECT ** DO NOT USE THIS CANDIDATE NUMBER. ConsultIDs: none. Reason: This ca
阅读:735|2022-07-29
-
librespeed/speedtest: Self-hosted Speedtest for HTML5 and more. Easy setup, exam
阅读:1210|2022-08-30
-
avehtari/BDA_m_demos: Bayesian Data Analysis demos for Matlab/Octave
阅读:1116|2022-08-17
-
女人怀孕后,为了有一个健康聪明的宝宝,经历各种体检、筛查。其实这些体检和筛查中的
阅读:929|2022-11-06
-
medfreeman/markdown-it-toc-and-anchor: markdown-it plugin to add a toc and ancho
阅读:1326|2022-08-18
-
旧的模板消息将在 2020 年 1 月 10 号全面下架,也就是今天,不过貌似现在还可以用!
阅读:691|2022-07-18
-
In IOBit Advanced System Care (AscService.exe) 15, an attacker with SEImpersonat
阅读:453|2022-07-08
-
sydney0zq/covid-19-detection: The implementation of A Weakly-supervised Framewor
阅读:477|2022-08-16
-
urbanairship/ruby-library: A Ruby wrapper for the Urban Airship API.
阅读:695|2022-08-15
-
离中国最远的国家是阿根廷。从太平洋直线计算,即往东线走,北京到阿根廷的布宜诺斯艾
阅读:625|2022-11-06
|
请发表评论