本文整理汇总了PHP中GetCountryArray函数的典型用法代码示例。如果您正苦于以下问题:PHP GetCountryArray函数的具体用法?PHP GetCountryArray怎么用?PHP GetCountryArray使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetCountryArray函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetDocumentFields
function GetDocumentFields()
{
$arDocumentFields = array(array("name" => GetMessage("BPT_BT_DF_COUNTRY"), "code" => "COUNTRY", "type" => "L", "multiple" => "N", "required" => "N", "options" => ""), array("name" => GetMessage("BPT_BT_DF_CITY"), "code" => "CITY", "type" => "S", "multiple" => "N", "required" => "N", "options" => ""), array("name" => GetMessage("BPT_BT_DF_TICKETS"), "code" => "tickets", "type" => "F", "multiple" => "Y", "required" => "N", "options" => ""), array("name" => GetMessage("BPT_BT_DF_DATE_END_REAL"), "code" => "date_end_real", "type" => "S:DateTime", "multiple" => "N", "required" => "N", "options" => ""), array("name" => GetMessage("BPT_BT_DF_EXP_REAL"), "code" => "expenditures_real", "type" => "T", "multiple" => "N", "required" => "N", "options" => ""));
$ar = GetCountryArray();
for ($i = 0, $cnt = count($ar["reference"]); $i < $cnt; $i++) {
$arDocumentFields[0]['options'] .= ($i > 0 ? "\n" : "") . $ar["reference"][$i];
}
return $arDocumentFields;
}
示例2: execute
protected function execute(InputInterface $input, OutputInterface $output)
{
$file = $input->getArgument('file');
if (!file_exists($file) || !($fh = fopen($file, 'r'))) {
$output->writeln('<error>Can\'t read data from file</error>');
return null;
}
//выбираем группу
$group = 0;
$res = \CGroup::GetList($by = '', $order = '', ['STRING_ID' => 'totaldict_chairman_experts']);
if ($ob = $res->Fetch()) {
$group = $ob['ID'];
}
//выбираем список статусов
$statusList = [];
$rsData = \CUserTypeEntity::GetList([], ['ENTITY_ID' => 'USER', 'FIELD_NAME' => 'UF_TD_ORG_STATUS']);
if ($fob = $rsData->GetNext()) {
$ar = ['newby' => 'НОВИЧКИ', 'pretty_boy' => 'КРАСАВЧИКИ', 'catching' => 'ДОГОНЯЮЩИЕ', 'redneck' => 'ДЕРЕВНИ'];
$res = \CUserFieldEnum::GetList([], ['USER_FIELD_ID' => $fob['ID']]);
while ($ob = $res->Fetch()) {
if (empty($ar[$ob['XML_ID']])) {
continue;
}
$statusList[$ar[$ob['XML_ID']]] = $ob['ID'];
}
}
//список стран для заполнения
$countries = GetCountryArray();
$countries = array_combine($countries['reference'], $countries['reference_id']);
$currentStatus = null;
while (($data = fgetcsv($fh)) !== false) {
//если заполнена только вторая колонка то это статус
if (empty($data[1]) && !empty($data[0]) && isset($statusList[$data[0]])) {
$currentStatus = $statusList[$data[1]];
continue;
}
//массив для загрузки данных пользователя
$arLoad = ['ACTIVE' => 'Y', 'PERSONAL_COUNTRY' => isset($countries['Россия']) ? $countries['Россия'] : null, 'PERSONAL_CITY' => $data[0], 'LAST_NAME' => $data[1], 'WORK_POSITION' => $data[3], 'PERSONAL_MOBILE' => $data[4], 'PERSONAL_STREET' => $data[6], 'PERSONAL_WWW' => $data[8], 'PASSWORD' => 'Test,user,passwr0d', 'CONFIRM_PASSWORD' => 'Test,user,passwr0d', 'UF_TD_ORG_STATUS' => $currentStatus, 'GROUP_ID' => [2, $group]];
//пробуем разбить email
if (strpos($data[5], ',')) {
$explode = array_map('trim', explode(',', $data[5]));
$arLoad['EMAIL'] = $explode[0];
unset($explode[0]);
$arLoad['PERSONAL_NOTES'] = implode(', ', $explode);
} elseif (strpos($data[5], 'и')) {
$explode = array_map('trim', explode('и', $data[5]));
$arLoad['EMAIL'] = $explode[0];
unset($explode[0]);
$arLoad['PERSONAL_NOTES'] = implode(', ', $explode);
} elseif (strpos($data[5], ';')) {
$explode = array_map('trim', explode(';', $data[5]));
$arLoad['EMAIL'] = $explode[0];
unset($explode[0]);
$arLoad['PERSONAL_NOTES'] = implode(', ', $explode);
} elseif (strpos($data[5], ' ')) {
$explode = array_map('trim', explode(' ', $data[5]));
$arLoad['EMAIL'] = $explode[0];
unset($explode[0]);
$arLoad['PERSONAL_NOTES'] = implode(', ', $explode);
} else {
$arLoad['EMAIL'] = trim($data[5]);
}
//пробуем разбить фамилию и имя
if (strpos($data[2], ' ')) {
$explode = explode(' ', trim($data[2]));
$arLoad['NAME'] = $explode[0];
$arLoad['SECOND_NAME'] = $explode[1];
} else {
$arLoad['NAME'] = trim($data[2]);
}
//пробуем завести дату в базу
if (($time = strtotime($data[7])) !== false) {
$arLoad['PERSONAL_BIRTHDAY'] = ConvertTimeStamp($time, 'SHORT', 'ru');
}
//пробуем найти страну, чтобы привязать пользователя к городу
$country = \bxpimple\Locator::$item->get('countryFinder')->mergeFilterWith(['NAME' => 'Россия'])->one();
if ($country) {
//если нашли страну, то пробуем найти и город
$city = \bxpimple\Locator::$item->get('cityFinder')->mergeFilterWith(['NAME' => trim($data[0]), 'PROPERTY_TOTALDICT_GEO_CITIES_COUNTRY' => $country->getAttribute('ID')->getValue()])->one();
if ($city) {
//если нашли город, то привязываем пользователя
$arLoad['UF_TD_CITY_IB'] = $city->getAttribute('ID')->getValue();
}
}
//задаем логин, по умолчанию используем email
$arLoad['LOGIN'] = $arLoad['EMAIL'];
//пробуем найти пользователя по его логину
$user = new \CUser();
$res = \CUser::GetList($by = '', $order = '', ['LOGIN_EQUAL' => $arLoad['LOGIN']]);
if ($ob = $res->Fetch()) {
$arGroups = \CUser::GetUserGroup($ob['ID']);
if (is_array($arGroups)) {
$arLoad['GROUP_ID'] = array_unique(array_merge($arLoad['GROUP_ID'], $arGroups));
}
//обновляем
if (!$user->Update($ob['ID'], $arLoad)) {
$output->writeln('<error>User ' . $arLoad['LOGIN'] . ' error: ' . $user->LAST_ERROR . '</error>');
} else {
$output->writeln('<info>User ' . $arLoad['LOGIN'] . ' updated</info>');
}
//.........这里部分代码省略.........
示例3: htmlspecialcharsEx
LocalRedirect($arParams["SUCCESS_PAGE"]);
}
$arResult["VALUES"] = htmlspecialcharsEx($arResult["VALUES"]);
// redefine required list - for better use in template
$arResult["REQUIRED_FIELDS_FLAGS"] = array();
foreach ($arResult["REQUIRED_FIELDS"] as $field)
$arResult["REQUIRED_FIELDS_FLAGS"][$field] = "Y";
// check backurl existance
$arResult["BACKURL"] = htmlspecialcharsbx($_REQUEST["backurl"]);
// get countries list
if (in_array("PERSONAL_COUNTRY", $arResult["SHOW_FIELDS"]) || in_array("WORK_COUNTRY", $arResult["SHOW_FIELDS"]))
$arResult["COUNTRIES"] = GetCountryArray();
// get date format
if (in_array("PERSONAL_BIRTHDAY", $arResult["SHOW_FIELDS"]))
$arResult["DATE_FORMAT"] = CLang::GetDateFormat("SHORT");
// ********************* User properties ***************************************************
$arResult["USER_PROPERTIES"] = array("SHOW" => "N");
$arUserFields = $USER_FIELD_MANAGER->GetUserFields("USER", 0, LANGUAGE_ID);
if (is_array($arUserFields) && count($arUserFields) > 0)
{
if (!is_array($arParams["USER_PROPERTY"]))
$arParams["USER_PROPERTY"] = array($arParams["USER_PROPERTY"]);
foreach ($arUserFields as $FIELD_NAME => $arUserField)
{
示例4: array
$arVal = array("VALUE" => htmlspecialcharsex(array_key_exists($requestName, $_REQUEST) ? $_REQUEST[$requestName] : ""), "NAME" => $requestName, "TITLE" => $userFieldTitle);
switch ($userFieldName) {
case 'LAST_LOGIN':
case 'DATE_REGISTER':
case 'PERSONAL_BIRTHDAY':
$arVal["TYPE"] = "calendar";
break;
case 'PERSONAL_GENDER':
$arVal["TYPE"] = "select";
$arVal["VALUES"] = array("M" => GetMessage("SONET_C241_MALE"), "F" => GetMessage("SONET_C241_FEMALE"));
break;
case 'PERSONAL_COUNTRY':
case 'WORK_COUNTRY':
$arVal["TYPE"] = "select";
$arVal["VALUES"] = array();
$arCountriesTmp = GetCountryArray(LANGUAGE_ID);
for ($i = 0; $i < count($arCountriesTmp["reference_id"]); $i++) {
$arVal["VALUES"][$arCountriesTmp["reference_id"][$i]] = $arCountriesTmp["reference"][$i];
}
break;
default:
$arVal["TYPE"] = "string";
break;
}
if (in_array($userFieldName, $arParams["USER_FIELDS_SEARCH_SIMPLE"])) {
$arResult["UserFieldsSearchSimple"][$userFieldName] = $arVal;
}
if (in_array($userFieldName, $arParams["USER_FIELDS_SEARCH_ADV"])) {
$arResult["UserFieldsSearchAdv"][$userFieldName] = $arVal;
}
}
示例5: array
$arfiltertmp = $arFilter;
$arFilter = array();
$arFilter["LID"] = $arfiltertmp["LID"];
$arFilter["CURRENCY"] = $arfiltertmp["CURRENCY"];
}
$arSitesShop = array();
foreach ($arSites as $key => $val) {
$site = COption::GetOptionString("sale", "SHOP_SITE_" . $key, "");
if ($key == $site) {
$arSitesShop[] = array("ID" => $key, "NAME" => $val["NAME"]);
}
}
if (empty($arSitesShop)) {
$arSitesShop = $arSites;
}
$arCountry = GetCountryArray();
$arCountry["reference_id"] = array_flip($arCountry["reference_id"]);
/*
* select all user (byuers)
*/
$arHeaders = array(array("id" => "USER_ID", "content" => "ID", "sort" => "USER_ID"), array("id" => "BUYER", "content" => GetMessage("BUYER_ROW_BUYER"), "sort" => "NAME", "default" => true), array("id" => "LOGIN", "content" => GetMessage("BUYER_ROW_LOGIN"), "sort" => "LOGIN"), array("id" => "LAST_NAME", "content" => GetMessage("BUYER_ROW_LAST"), "sort" => "LAST_NAME"), array("id" => "NAME", "content" => GetMessage("BUYER_ROW_NAME"), "sort" => "NAME"), array("id" => "SECOND_NAME", "content" => GetMessage("BUYER_ROW_SECOND"), "sort" => "SECOND_NAME"), array("id" => "EMAIL", "content" => GetMessage("BUYER_ROW_MAIL"), "sort" => "EMAIL", "default" => true), array("id" => "PERSONAL_PHONE", "content" => GetMessage("BUYER_ROW_PHONE"), "sort" => "PERSONAL_PHONE", "default" => true), array("id" => "LAST_LOGIN", "content" => GetMessage('BUYER_ROW_LAST_LOGIN'), "sort" => "LAST_LOGIN", "default" => false), array("id" => "DATE_REGISTER", "content" => GetMessage('BUYER_ROW_DATE_REGISTER'), "sort" => "DATE_REGISTER", "default" => true), array("id" => "LAST_ORDER_DATE", "content" => GetMessage('BUYER_ROW_LAST_ORDER_DATE'), "sort" => "LAST_ORDER_DATE", "default" => true), array("id" => "ORDER_COUNT", "content" => GetMessage('BUYER_ROW_COUNT_ORDER'), "sort" => "ORDER_COUNT", "default" => true, "align" => "right"), array("id" => "ORDER_SUM", "content" => GetMessage('BUYER_ROW_SUM_ORDER'), "sort" => "ORDER_SUM", "default" => true, "align" => "right"), array("id" => "GROUPS_ID", "content" => GetMessage('BUYER_ROW_GROUP')));
$lAdmin->AddHeaders($arHeaders);
$arVisibleColumns = $lAdmin->GetVisibleHeaderColumns();
$arOrderBuyer[$by] = $order;
$dbUsersList = CSaleUser::GetBuyersList($arOrderBuyer, $arFilter, false, array("nPageSize" => CAdminResult::GetNavSize($sTableID)), array("ID", "LID", "ACTIVE", "DATE_REGISTER", "LOGIN", "EMAIL", "NAME", "LAST_NAME", "SECOND_NAME", "PERSONAL_PHONE", "USER_ID", "LAST_LOGIN", "ORDER_COUNT", "ORDER_SUM", "CURRENCY", "LAST_ORDER_DATE"));
$dbUsersList = new CAdminResult($dbUsersList, $sTableID);
$dbUsersList->NavStart();
$lAdmin->NavText($dbUsersList->GetNavPrint(GetMessage("BUYER_PRLIST")));
while ($arBuyers = $dbUsersList->Fetch()) {
$row =& $lAdmin->AddRow($arBuyers["USER_ID"], $arBuyers, "sale_buyers_profile.php?USER_ID=" . $arBuyers["USER_ID"] . "&lang=" . LANGUAGE_ID, GetMessage("BUYER_SUB_ACTION_PROFILE"));
$profile = '<a href="sale_buyers_profile.php?USER_ID=' . $arBuyers["USER_ID"] . '&lang=' . LANGUAGE_ID . '">' . $arBuyers["USER_ID"] . '</a>';
示例6: GetCountryArray
$arResult["arUser"]["PERSONAL_PHOTO_HTML"] = CFile::ShowImage($arResult["arUser"]["PERSONAL_PHOTO"], 150, 150, "border=0", "", true);
}
$arResult["arUser"]["WORK_LOGO_INPUT"] = CFile::InputFile("WORK_LOGO", 20, $arResult["arUser"]["WORK_LOGO"], false, 0, "IMAGE");
if (strlen($arResult["arUser"]["WORK_LOGO"]) > 0) {
$arResult["arUser"]["WORK_LOGO_HTML"] = CFile::ShowImage($arResult["arUser"]["WORK_LOGO"], 150, 150, "border=0", "", true);
}
$arResult["arForumUser"]["AVATAR_INPUT"] = CFile::InputFile("forum_AVATAR", 20, $arResult["arForumUser"]["AVATAR"], false, 0, "IMAGE");
if (strlen($arResult["arForumUser"]["AVATAR"]) > 0) {
$arResult["arForumUser"]["AVATAR_HTML"] = CFile::ShowImage($arResult["arForumUser"]["AVATAR"], 150, 150, "border=0", "", true);
}
$arResult["arBlogUser"]["AVATAR_INPUT"] = CFile::InputFile("blog_AVATAR", 20, $arResult["arBlogUser"]["AVATAR"], false, 0, "IMAGE");
if (strlen($arResult["arBlogUser"]["AVATAR"]) > 0) {
$arResult["arBlogUser"]["AVATAR_HTML"] = CFile::ShowImage($arResult["arBlogUser"]["AVATAR"], 150, 150, "border=0", "", true);
}
$arResult["IS_ADMIN"] = $USER->IsAdmin();
$arCountries = GetCountryArray();
$arResult["COUNTRY_SELECT"] = SelectBoxFromArray("PERSONAL_COUNTRY", $arCountries, $arResult["arUser"]["PERSONAL_COUNTRY"], GetMessage("USER_DONT_KNOW"));
$arResult["COUNTRY_SELECT_WORK"] = SelectBoxFromArray("WORK_COUNTRY", $arCountries, $arResult["arUser"]["WORK_COUNTRY"], GetMessage("USER_DONT_KNOW"));
$arResult["strProfileError"] = $strError;
$arResult["BX_SESSION_CHECK"] = bitrix_sessid_post();
$arResult["DATE_FORMAT"] = CLang::GetDateFormat("SHORT");
$arResult["COOKIE_PREFIX"] = COption::GetOptionString("main", "cookie_name", "BITRIX_SM");
if (strlen($arResult["COOKIE_PREFIX"]) <= 0) {
$arResult["COOKIE_PREFIX"] = "BX";
}
// ********************* User properties ***************************************************
$arResult["USER_PROPERTIES"] = array("SHOW" => "N");
if (!empty($arParams["USER_PROPERTY"])) {
$arUserFields = $USER_FIELD_MANAGER->GetUserFields("USER", $arResult["ID"], LANGUAGE_ID);
if (count($arParams["USER_PROPERTY"]) > 0) {
foreach ($arUserFields as $FIELD_NAME => $arUserField) {
示例7: GetMessage
><?php
echo GetMessage('ISL_PERSONAL_GENDER_MALE');
?>
</option>
<option value="F"<?php
echo $value == 'F' ? ' selected="selected"' : '';
?>
><?php
echo GetMessage('ISL_PERSONAL_GENDER_FEMALE');
?>
</option>
</select><?php
break;
case 'PERSONAL_COUNTRY':
case 'WORK_COUNTRY':
echo SelectBoxFromArray($FIELD, GetCountryArray(), $value, GetMessage("ISL_COUNTRY_EMPTY"));
break;
case 'SOCSERVICES':
if (!empty($arResult["arSocServ"])) {
?>
<div class="bx-sonet-profile-field-socserv">
<?php
$APPLICATION->IncludeComponent("bitrix:socserv.auth.split", "twitpost", array("SHOW_PROFILES" => "Y", "ALLOW_DELETE" => "Y", "USER_ID" => $arParams['ID']), false);
?>
</div>
<?php
}
break;
case 'PERSONAL_PHOTO':
case 'WORK_LOGO':
case 'FORUM_AVATAR':
示例8: GetMessage
$tabControl->AddEditField("WORK_DEPARTMENT", GetMessage('USER_DEPARTMENT'), false, array("size"=>30, "maxlength"=>255), $str_WORK_DEPARTMENT);
$tabControl->AddEditField("WORK_POSITION", GetMessage('USER_POSITION'), false, array("size"=>30, "maxlength"=>255), $str_WORK_POSITION);
$tabControl->AddTextField("WORK_PROFILE", GetMessage("USER_WORK_PROFILE"), $str_WORK_PROFILE, array("cols"=>40, "rows"=>5));
$tabControl->AddFileField("WORK_LOGO", GetMessage("USER_LOGO"), $str_WORK_LOGO, array("iMaxW"=>150, "iMaxH"=>150));
$tabControl->AddSection("USER_WORK_PHONES", GetMessage("USER_PHONES"));
$tabControl->AddEditField("WORK_PHONE", GetMessage('USER_PHONE'), false, array("size"=>30, "maxlength"=>255), $str_WORK_PHONE);
$tabControl->AddEditField("WORK_FAX", GetMessage('USER_FAX'), false, array("size"=>30, "maxlength"=>255), $str_WORK_FAX);
$tabControl->AddEditField("WORK_PAGER", GetMessage('USER_PAGER'), false, array("size"=>30, "maxlength"=>255), $str_WORK_PAGER);
$tabControl->AddSection("USER_WORK_POST_ADDRESS", GetMessage("USER_POST_ADDRESS"));
$tabControl->BeginCustomField("WORK_COUNTRY", GetMessage('USER_COUNTRY'));
?>
<tr>
<td><?echo $tabControl->GetCustomLabelHTML()?></td>
<td><?echo SelectBoxFromArray("WORK_COUNTRY", GetCountryArray(), $str_WORK_COUNTRY, GetMessage("USER_DONT_KNOW"));?></td>
</tr>
<?
$tabControl->EndCustomField("WORK_COUNTRY", '<input type="hidden" name="WORK_COUNTRY" value="'.$str_WORK_COUNTRY.'">');
$tabControl->AddEditField("WORK_STATE", GetMessage('USER_STATE'), false, array("size"=>30, "maxlength"=>255), $str_WORK_STATE);
$tabControl->AddEditField("WORK_CITY", GetMessage('USER_CITY'), false, array("size"=>30, "maxlength"=>255), $str_WORK_CITY);
$tabControl->AddEditField("WORK_ZIP", GetMessage('USER_ZIP'), false, array("size"=>30, "maxlength"=>255), $str_WORK_ZIP);
$tabControl->AddTextField("WORK_STREET", GetMessage("USER_STREET"), $str_WORK_STREET, array("cols"=>40, "rows"=>3));
$tabControl->AddEditField("WORK_MAILBOX", GetMessage('USER_MAILBOX'), false, array("size"=>30, "maxlength"=>255), $str_WORK_MAILBOX);
$tabControl->AddTextField("WORK_NOTES", GetMessage("USER_NOTES"), $str_WORK_NOTES, array("cols"=>40, "rows"=>5));
$tabControl->BeginNextFormTab();
$tabControl->BeginCustomField("RATING_BOX", GetMessage("USER_RATING_INFO"), false);
?>
<tr>
<td width="100%" colspan="100%">
示例9: ConvertContactToArray
private function ConvertContactToArray($contactItem)
{
$arResultItem = array();
$arItemId = $contactItem->GetPath("/Contact/ItemId");
if (count($arItemId) > 0) {
$arResultItem["XML_ID"] = $arItemId[0]->GetAttribute("Id");
$arResultItem["MODIFICATION_LABEL"] = $arItemId[0]->GetAttribute("ChangeKey");
}
$arGivenName = $contactItem->GetPath("/Contact/GivenName");
if (count($arGivenName) > 0) {
$arResultItem["NAME"] = $this->Encode($arGivenName[0]->GetContent());
}
$arMiddleName = $contactItem->GetPath("/Contact/MiddleName");
if (count($arMiddleName) > 0) {
$arResultItem["SECOND_NAME"] = $this->Encode($arMiddleName[0]->GetContent());
}
$arSurname = $contactItem->GetPath("/Contact/Surname");
if (count($arSurname) > 0) {
$arResultItem["LAST_NAME"] = $this->Encode($arSurname[0]->GetContent());
}
$arCompanyName = $contactItem->GetPath("/Contact/CompanyName");
if (count($arCompanyName) > 0) {
$arResultItem["WORK_COMPANY"] = $this->Encode($arCompanyName[0]->GetContent());
}
$arDepartment = $contactItem->GetPath("/Contact/Department");
if (count($arDepartment) > 0) {
$arResultItem["WORK_DEPARTMENT"] = $this->Encode($arDepartment[0]->GetContent());
}
$arJobTitle = $contactItem->GetPath("/Contact/JobTitle");
if (count($arJobTitle) > 0) {
$arResultItem["WORK_POSITION"] = $this->Encode($arJobTitle[0]->GetContent());
}
$arPhysicalAddresses = $contactItem->GetPath("/Contact/PhysicalAddresses/Entry");
foreach ($arPhysicalAddresses as $physicalAddress) {
$entryKey = strtolower($physicalAddress->GetAttribute("Key"));
if ($entryKey == "business") {
$prefix = "WORK";
} elseif ($entryKey == "home") {
$prefix = "PERSONAL";
} elseif (!isset($arResultItem["PERSONAL_STREET"])) {
$prefix = "PERSONAL";
}
$arStreet = $physicalAddress->GetPath("/Entry/Street");
if (count($arStreet) > 0) {
$arResultItem[$prefix . "_STREET"] = $this->Encode($arStreet[0]->GetContent());
}
$arCity = $physicalAddress->GetPath("/Entry/City");
if (count($arCity) > 0) {
$arResultItem[$prefix . "_CITY"] = $this->Encode($arCity[0]->GetContent());
}
$arState = $physicalAddress->GetPath("/Entry/State");
if (count($arState) > 0) {
$arResultItem[$prefix . "_STATE"] = $this->Encode($arState[0]->GetContent());
}
$arCountryOrRegion = $physicalAddress->GetPath("/Entry/CountryOrRegion");
if (count($arCountryOrRegion) > 0) {
$country = $this->Encode($arCountryOrRegion[0]->GetContent());
$ar = GetCountryArray();
$i = array_search($country, $ar["reference"]);
if ($i !== false) {
$arResultItem[$prefix . "_COUNTRY"] = $ar["reference"][$i];
}
}
$arPostalCode = $physicalAddress->GetPath("/Entry/PostalCode");
if (count($arPostalCode) > 0) {
$arResultItem[$prefix . "_ZIP"] = $this->Encode($arPostalCode[0]->GetContent());
}
}
$arPhoneNumbers = $contactItem->GetPath("/Contact/PhoneNumbers/Entry");
foreach ($arPhoneNumbers as $phoneNumber) {
$entryKey = strtolower($phoneNumber->GetAttribute("Key"));
$v = $phoneNumber->GetContent();
if ($entryKey == "businessphone") {
$arResultItem["WORK_PHONE"] = $v;
} elseif ($entryKey == "homephone") {
$arResultItem["PERSONAL_PHONE"] = $v;
} elseif ($entryKey == "homephone2") {
$arResultItem["PERSONAL_FAX"] = $v;
} elseif ($entryKey == "mobilephone") {
$arResultItem["PERSONAL_MOBILE"] = $v;
} elseif ($entryKey == "pager") {
$arResultItem["PERSONAL_PAGER"] = $v;
} elseif ($entryKey == "businessphone2") {
$arResultItem["WORK_FAX"] = $v;
} else {
if (!is_null($v) && !empty($v)) {
$arResultItem["WORK_PAGER"] = $v;
}
}
}
$arEmailAddresses = $contactItem->GetPath("/Contact/EmailAddresses/Entry");
foreach ($arEmailAddresses as $emailAddress) {
$v = $emailAddress->GetContent();
if (!is_null($v) && !empty($v) && (!isset($arResultItem["EMAIL"]) || empty($arResultItem["EMAIL"]))) {
$arResultItem["EMAIL"] = $v;
}
}
$arImAddresses = $contactItem->GetPath("/Contact/ImAddresses/Entry");
foreach ($arImAddresses as $imAddress) {
$v = $imAddress->GetContent();
//.........这里部分代码省略.........
示例10: GetMessage
?>
"></td>
</tr>
<tr valign="top">
<td class="tablebody" colspan="2" align="center"><font class="tablebodytext"><?php
echo GetMessage("USER_POST_ADDRESS");
?>
</font></td>
</tr>
<tr valign="top">
<td align="right"><font class="tablefieldtext"><?php
echo GetMessage('USER_COUNTRY');
?>
</font></td>
<td><?php
echo SelectBoxFromArray("WORK_COUNTRY", GetCountryArray(), $arUser["WORK_COUNTRY"], GetMessage("USER_DONT_KNOW"), "class=\"inputselect\"");
?>
</td>
</tr>
<tr valign="top">
<td align="right"><font class="tablefieldtext"><?php
echo GetMessage('USER_STATE');
?>
</font></td>
<td><input type="text" class="inputtext" name="WORK_STATE" size="30" maxlength="255" value="<?php
echo $arUser["WORK_STATE"];
?>
"></td>
</tr>
<tr valign="top">
<td align="right"><font class="tablefieldtext"><?php
示例11: SelectBoxFromArray
</option>
<?php
}
?>
<?php
}
?>
</select>
</td><?php
break;
case 'PERSONAL_COUNTRY':
case 'WORK_COUNTRY':
?>
<td class="content-edit-form-field-input" colspan="2">
<?php
echo SelectBoxFromArray($FIELD, GetCountryArray(), $value, GetMessage("ISL_COUNTRY_EMPTY"), "class=\"content-edit-form-field-input-select\"");
?>
</td><?php
break;
case 'SOCSERVICES':
if (CModule::IncludeModule("socialservices")) {
?>
<td class="content-edit-form-field-input" colspan="<?php
echo $bNetwork ? 3 : 2;
?>
">
<div class="bx-sonet-profile-field-socserv">
<?php
$APPLICATION->IncludeComponent("bitrix:socserv.auth.split", $bNetwork ? "network" : "twitpost", array("SHOW_PROFILES" => "Y", "CAN_DELETE" => "Y", "USER_ID" => $arParams['ID']), false);
?>
</div>