$city_content = $a_city . olc_draw_hidden_field('a_city'); } } else { $city_content = olc_draw_input_field('a_city', $affiliate['affiliate_city']) . HTML_NBSP . ENTRY_CITY_TEXT; } $module_smarty->assign('city_content', $city_content); if ($is_read_only == true) { $country_id_content = olc_get_country_name($affiliate['affiliate_country_id']); } elseif ($error == true) { if ($entry_country_error == true) { $country_id_content = olc_get_country_list('a_country') . HTML_NBSP . ENTRY_COUNTRY_ERROR; } else { $country_id_content = olc_get_country_name($a_country) . olc_draw_hidden_field('a_country'); } } else { $country_id_content = olc_get_country_list('a_country', $affiliate['affiliate_country_id']) . HTML_NBSP . ENTRY_COUNTRY_TEXT; } $module_smarty->assign('country_id_content', $country_id_content); if (ACCOUNT_STATE == TRUE_STRING_S) { $module_smarty->assign('ACCOUNT_STATE', TRUE_STRING_S); $state = olc_get_zone_name($a_country, $a_zone_id, $a_state); if ($is_read_only == true) { $state_content = olc_get_zone_name($affiliate['affiliate_country_id'], $affiliate['affiliate_zone_id'], $affiliate['affiliate_state']); } elseif ($error == true) { if ($entry_state_error == true) { if ($entry_state_has_zones == true) { $zones_array = array(); $zones_query = olc_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . olc_db_input($a_country) . "' order by zone_name"); while ($zones_values = olc_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); }
$module_smarty->assign('INPUT_CODE', olc_draw_input_field('postcode', $entry['entry_postcode']) . HTML_NBSP . (olc_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>' : '')); $module_smarty->assign('INPUT_CITY', olc_draw_input_field('city', $entry['entry_city']) . HTML_NBSP . (olc_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>' : '')); if (ACCOUNT_STATE == TRUE_STRING_S) { $module_smarty->assign('state', '1'); if ($process) { if ($entry_state_has_zones == true) { $zones_array = array(); $zones_query = olc_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . olc_db_input($country) . "' order by zone_name"); while ($zones_values = olc_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } $state_input = olc_draw_pull_down_menu('state', $zones_array); } else { $state_input = olc_draw_input_field('state'); } } else { $state_input = olc_draw_input_field('state', olc_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state'])); } if (olc_not_null(ENTRY_STATE_TEXT)) { $state_input .= ' <span class="inputRequirement">' . ENTRY_STATE_TEXT; } $module_smarty->assign('INPUT_STATE', $state_input); } $module_smarty->assign('SELECT_COUNTRY', olc_get_country_list('country', $entry['entry_country_id']) . HTML_NBSP . (olc_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>' : '')); if (isset($edit) && $_SESSION['customer_default_address_id'] != $edit || isset($edit) == false) { $module_smarty->assign('new', '1'); $module_smarty->assign('CHECKBOX_PRIMARY', olc_draw_checkbox_field('primary', 'on', false)); } $main_content = $module_smarty->fetch(CURRENT_TEMPLATE_MODULE . 'address_book_details' . HTML_EXT, $cacheid); $smarty->assign('MODULE_address_book_details', $main_content); }