: </td> <td> <input type="checkbox" name="CHANGE_COUNTRY" value="Y" <?php if ($CHANGE_COUNTRY == "Y") { echo "checked"; } ?> OnClick="SetContact()"> </td> </tr> <?php } ?> <?php $arCountry = CSaleLocation::GetCountryByID($str_COUNTRY_ID); $str_COUNTRY_NAME = htmlspecialcharsEx($arCountry["NAME"]); $str_COUNTRY_SHORT_NAME = htmlspecialcharsEx($arCountry["SHORT_NAME"]); if ($bInitVars && $CHANGE_COUNTRY == 'Y') { $str_COUNTRY_NAME = htmlspecialcharsEx($COUNTRY_NAME); $str_COUNTRY_SHORT_NAME = htmlspecialcharsEx($COUNTRY_SHORT_NAME); } ?> <tr class="adm-detail-required-field"> <td> <?php echo GetMessage("SALE_FULL_NAME"); ?> : </td> <td>
$action = isset($_REQUEST['action']) ? trim($_REQUEST['action']) : ''; $langCount = 0; $arSysLangs = array(); $arSysLangNames = array(); $dbLang = CLangAdmin::GetList($b = "sort", $o = "asc", array("ACTIVE" => "Y")); while ($arLang = $dbLang->Fetch()) { $arSysLangs[$langCount] = $arLang["LID"]; $arSysLangNames[$langCount] = htmlspecialcharsbx($arLang["NAME"]); $langCount++; } switch ($action) { case 'get_country_params': if ($ID <= 0) { break; } $arCountry = CSaleLocation::GetCountryByID($ID); $arCountry['COUNTRY_NAME'] = $arCountry['NAME']; $arCountry['COUNTRY_SHORT_NAME'] = $arCountry['SHORT_NAME']; unset($arCountry['NAME']); unset($arCountry['SHORT_NAME']); $countLang = count($arSysLangs); for ($i = 0; $i < $countLang; $i++) { $arLngCountry = CSaleLocation::GetCountryLangByID($ID, $arSysLangs[$i]); $arCountry['COUNTRY_NAME_' . $arSysLangs[$i]] = $arLngCountry['NAME']; $arCountry['COUNTRY_SHORT_NAME_' . $arSysLangs[$i]] = $arLngCountry['SHORT_NAME_']; } $arReturn['COUNTRY'] = $arCountry; $arRegions = CCrmLocations::getRegionsNames($ID); $arReturn['COUNTRY']['REGIONS'] = array(); foreach ($arRegions as $id => $region) { $arReturn['COUNTRY']['REGIONS'][] = array($id, $region);