本文整理汇总了PHP中CSaleLocation::GetCityByID方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleLocation::GetCityByID方法的具体用法?PHP CSaleLocation::GetCityByID怎么用?PHP CSaleLocation::GetCityByID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleLocation
的用法示例。
在下文中一共展示了CSaleLocation::GetCityByID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
for ($i = 0; $i < $countLang; $i++) {
$arRegion = CSaleLocation::GetRegionLangByID($arLoc['REGION_ID'], $arSysLangs[$i]);
/*
$arResult['FIELDS']['tab_params'][] = array(
'id' => 'R_LANG_'.$arSysLangs[$i],
'value' => '<b>['.$arSysLangs[$i].'] '.$arSysLangNames[$i].'</b>',
'colspan' => true,
'type' => 'label'
);
*/
$arResult['FIELDS']['tab_params'][] = array('id' => 'REGION_NAME_' . $arSysLangs[$i], 'name' => GetMessage('CRM_LOC_FIELD_NAME'), 'value' => htmlspecialcharsEx($arRegion["NAME"]), 'required' => true, 'type' => 'text');
$arResult['FIELDS']['tab_params'][] = array('id' => 'REGION_SHORT_NAME_' . $arSysLangs[$i], 'name' => GetMessage('CRM_LOC_FIELD_SHORT_NAME'), 'value' => htmlspecialcharsEx($arRegion["SHORT_NAME"]), 'type' => 'text');
}
/* CITY SECTION */
$arResult['FIELDS']['tab_params'][] = array('id' => 'loc_city', 'name' => GetMessage('CRM_LOC_SECTION_CITY'), 'type' => 'section');
$arCity = CSaleLocation::GetCityByID($arLoc['CITY_ID']);
$arResult['FIELDS']['tab_params'][] = array('id' => 'WITHOUT_CITY', 'name' => GetMessage('CRM_LOC_FIELD_WITHOUT_CITY'), 'value' => intval($locID) > 0 && !is_null($arLoc['CITY_ID']) && $arCity ? 'N' : 'Y', 'type' => 'checkbox');
$arResult['FIELDS']['tab_params'][] = array('id' => 'CITY_NAME', 'name' => GetMessage('CRM_LOC_FIELD_NAME'), 'value' => htmlspecialcharsEx($arLoc['CITY_NAME_ORIG']), 'required' => true, 'type' => 'text');
$arResult['FIELDS']['tab_params'][] = array('id' => 'CITY_SHORT_NAME', 'name' => GetMessage('CRM_LOC_FIELD_SHORT_NAME'), 'value' => htmlspecialcharsEx($arLoc['CITY_SHORT_NAME']), 'type' => 'text');
for ($i = 0; $i < $countLang; $i++) {
$arCity = CSaleLocation::GetCityLangByID($arLoc['CITY_ID'], $arSysLangs[$i]);
/*
$arResult['FIELDS']['tab_params'][] = array(
'id' => 'CI_LANG_'.$arSysLangs[$i],
'value' => '<b>['.$arSysLangs[$i].'] '.$arSysLangNames[$i].'</b>',
'colspan' => true,
'type' => 'label'
);
*/
$arResult['FIELDS']['tab_params'][] = array('id' => 'CITY_NAME_' . $arSysLangs[$i], 'name' => GetMessage('CRM_LOC_FIELD_NAME'), 'value' => htmlspecialcharsEx($arCity["NAME"]), 'required' => true, 'type' => 'text');
$arResult['FIELDS']['tab_params'][] = array('id' => 'CITY_SHORT_NAME_' . $arSysLangs[$i], 'name' => GetMessage('CRM_LOC_FIELD_SHORT_NAME'), 'value' => htmlspecialcharsEx($arCity["SHORT_NAME"]), 'type' => 'text');
示例2: GetMessage
</tr>
<?php
}
?>
<script language="JavaScript">
SetContact();
ResetRegion();
</script>
<tr class="heading">
<td colspan="2"><?php
echo GetMessage("SALE_CITY");
?>
</td>
</tr>
<?php
if ($arCity = CSaleLocation::GetCityByID($str_CITY_ID)) {
$str_CITY_NAME = htmlspecialcharsEx($arCity["NAME"]);
$str_CITY_SHORT_NAME = htmlspecialcharsEx($arCity["SHORT_NAME"]);
$str_WITHOUT_CITY = "N";
} else {
if ($ID > 0) {
$str_WITHOUT_CITY = "Y";
} else {
$str_WITHOUT_CITY = "N";
}
}
if ($bInitVars) {
$str_CITY_NAME = htmlspecialcharsEx($CITY_NAME);
$str_CITY_SHORT_NAME = htmlspecialcharsEx($CITY_SHORT_NAME);
$str_WITHOUT_CITY = $WITHOUT_CITY == "Y" ? "Y" : "N";
}