| #646 | |
| #647 | public function search() { |
| #648 | $q = isset($_GET['q']) ? trim((string)$_GET['q']) : ''; |
| #649 | $result = $q !== '' ? GeodbHelper::search($q) : array('country' => array(), 'state' => array(), 'city' => array()); |
| #650 | $found = count($result['country']) + count($result['state']) + count($result['city']); |
| #651 | |
| #652 | // 结果区预拼 |
| #653 | $html = ''; |
| #654 | if (!empty($result['country'])) { |
| #655 | $h = '<section class="geo-search-group"><h2>国家与地区</h2><div class="geo-country-grid">'; |