146 |
146 |
$customers_query = xtc_db_query("select * from ".TABLE_ADDRESS_BOOK." where customers_id = '".xtc_db_input($customers_id)."'");
|
147 |
147 |
$customers = xtc_db_fetch_array($customers_query);
|
148 |
148 |
|
149 |
|
// BOF GM_MOD:
|
150 |
|
$country_query = xtc_db_query("select countries_name, countries_iso_code_2 from ".TABLE_COUNTRIES." where countries_id = '".$customers['entry_country_id']."'");
|
151 |
|
$country = xtc_db_fetch_array($country_query);
|
152 |
|
|
153 |
149 |
$stat_query = xtc_db_query("select * from ".TABLE_CUSTOMERS_STATUS." where customers_status_id = '".$customers1[customers_status]."' and language_id = " . (int)$_SESSION['languages_id']);
|
154 |
150 |
$stat = xtc_db_fetch_array($stat_query);
|
155 |
151 |
|
156 |
|
if(gm_get_env_info('TEMPLATE_VERSION') >= 3.0)
|
157 |
|
{
|
158 |
|
$coo_country_service = StaticGXCoreLoader::getService('Country');
|
|
152 |
$coo_country_service = StaticGXCoreLoader::getService('Country');
|
159 |
|
$is_state_mandatory = $coo_country_service->isStateMandatory(new IdType($customers['entry_country_id']));
|
|
153 |
$is_state_mandatory = $coo_country_service->isStateMandatory(new IdType($customers['entry_country_id']));
|
160 |
|
$country = $coo_country_service->getCountryById(new IdType($customers['entry_country_id']));
|
|
154 |
$country = $coo_country_service->getCountryById(new IdType($customers['entry_country_id']));
|
161 |
|
$entry_state_has_zones = $coo_country_service->countryHasCountryZones($country);
|
162 |
|
|
163 |
|
if((!$is_state_mandatory && ACCOUNT_STATE === 'false')
|
164 |
|
|| (ACCOUNT_STATE === 'true'
|
165 |
|
&& !$entry_state_has_zones)
|
166 |
|
)
|
167 |
|
{
|
168 |
|
$customers['entry_suburb'] = '';
|
|
155 |
$entry_state_has_zones = $coo_country_service->countryHasCountryZones($country);
|
|
156 |
|
|
157 |
if((!$is_state_mandatory && ACCOUNT_STATE === 'false')
|
|
158 |
|| (ACCOUNT_STATE === 'true'
|
|
159 |
&& !$entry_state_has_zones)
|
|
160 |
)
|
|
161 |
{
|
|
162 |
$customers['entry_suburb'] = '';
|
169 |
|
}
|
170 |
|
}
|
171 |
|
else
|
172 |
|
{
|
173 |
|
/* This code is no longer required after the end of the support for EyeCandy. He is deprecated from this point onwards. */
|
174 |
|
|
175 |
|
if(ACCOUNT_STATE == 'false')
|
176 |
|
{
|
177 |
|
$customers['entry_suburb'] = '';
|
178 |
|
}
|
179 |
163 |
}
|
180 |
|
|
|
164 |
|
181 |
165 |
// BOF GM_MOD
|
182 |
166 |
$coo_gm_currencies = new currencies();
|
183 |
167 |
$sql_data_array = array ('customers_id' => xtc_db_prepare_input($customers['customers_id']),
|