function getcitylist() { $pid = getgpc("pid"); $cid = getgpc("cid"); $res = getCityList($pid); $str = '<option value="0">请选择城市</option>'; foreach ($res as $key => $row) { if ($cid == $key) { $add = " selected"; } else { $add = ""; } $str .= '<option value="' . $key . '" ' . $add . '>' . $row . '</option>'; } echo $str; }
$stateBids = curlget($url); $stateBids = json_decode($stateBids, 1); return $stateBids; } function countryBids($uid, $country, $bid) { ///api/help/bid/state?uid=&state=&bid= $url = APIHTTPPATH . '/help/bid/country?uid=' . $uid . '&country=' . $country . '&bid=' . $bid; $countryBids = curlget($url); $countryBids = json_decode($countryBids, 1); return $countryBids; } if (!empty($_GET['country']) && !empty($_GET['state'])) { $countryList = getCountry(); $stateList = getStates($_GET['country']); $cityList = getCityList($_GET['state']); } else { if (!empty($_GET['country'])) { $countryList = getCountry(); $stateList = getStates($_GET['country']); } else { $countryList = getCountry(); } } if (!empty($_GET['bidCountryAmount']) && !empty($_GET['country'])) { $bid = countryBids($_SESSION['user']['id'], $_GET['country'], $_GET['bidCountryAmount']); } else { if (!empty($_GET['bidStateAmount']) && !empty($_GET['state'])) { $bid = stateBids($_SESSION['user']['id'], $_GET['state'], $_GET['bidStateAmount']); } else { if (!empty($_GET['bidCityAmount']) && !empty($_GET['city'])) {