function countyOptions() { $county = new County(); $data = $county->get_countyOptions(trim($_GET['v1']), trim($_GET['v']), 'N'); if (count($data) < 1) { return '<input name="txtcounty" type="text" size="30" maxlength="100" /> '; } $ret = ' <select class="select" name="txtcounty" onchange="javascript: cascadeCountyAdmin(this.value,this.form.txt_country.value, this.form.txtstateprovince.value,\'txtcity\');" >'; $ret .= '<option value="">' . get_lang('select_text') . '</option>'; foreach ($data as $k => $y) { if ($k != 'AA') { $ret .= "<option value='{$k}'>{$y}</option>"; } } unset($data); return $ret .= '</select>'; }
} $smarty->assign('country', $country_t); } $state = new StateProvince(); $county = new County(); $city = new City(); $lang['states'] = $state->get_stateOptions($countrycode, 'N'); if (count($lang['states']) == 1) { foreach ($lang['states'] as $key => $val) { $_SESSION['loc']['stateprovince'] = $key; } } //status $_SESSION['loc']['stateprovince'] = $_SESSION['loc']['stateprovince'] != '' ? $_SESSION['loc']['stateprovince'] : ""; if ($_SESSION['loc']['stateprovince'] != '') { $lang['counties'] = $county->get_countyOptions($countrycode, $_SESSION['loc']['stateprovince'], 'N'); if (count($lang['counties']) == 1) { foreach ($lang['counties'] as $key => $val) { $_SESSION['loc']['countycode'] = $key; } } //county $_SESSION['loc']['countycode'] = $_SESSION['loc']['countycode'] != '' ? $_SESSION['loc']['countycode'] : ""; if ($_SESSION['loc']['countycode'] != '') { $lang['cities'] = $city->get_cityOptions($countrycode, $_SESSION['loc']['stateprovince'], $_SESSION['loc']['countycode'], 'N'); if (count($lang['cities']) == 1) { foreach ($lang['cities'] as $key => $val) { $_SESSION['loc']['citycode'] = $key; } } //city
} $smarty->assign('country', $country_t); } $state = new StateProvince(); $county = new County(); $city = new City(); $lang['states'] = $state->get_stateOptions($countrycode, 'Y'); if (count($lang['states']) == 1) { foreach ($lang['states'] as $key => $val) { $_SESSION['add_job']['state'] = $key; } } //status $_SESSION['add_job']['state'] = $_SESSION['add_job']['state'] != '' ? $_SESSION['add_job']['state'] : ""; if ($_SESSION['add_job']['state'] != '') { $lang['counties'] = $county->get_countyOptions($countrycode, $_SESSION['add_job']['state'], 'N'); if (count($lang['counties']) == 1) { foreach ($lang['counties'] as $key => $val) { $_SESSION['add_job']['county'] = $key; } } //county $_SESSION['add_job']['county'] = $_SESSION['add_job']['county'] != '' ? $_SESSION['add_job']['county'] : ""; if ($_SESSION['add_job']['county'] != '') { $lang['cities'] = $city->get_cityOptions($countrycode, $_SESSION['add_job']['state'], $_SESSION['add_job']['county'], 'N'); if (count($lang['cities']) == 1) { foreach ($lang['cities'] as $key => $val) { $_SESSION['add_job']['city'] = $key; } } //city