commit | author | age
|
3e083b
|
1 |
<?php |
B |
2 |
|
|
3 |
/** |
|
4 |
* 地区切换程序 |
|
5 |
*/ |
|
6 |
|
|
7 |
define('IN_ECS', true); |
|
8 |
define('INIT_NO_USERS', true); |
|
9 |
define('INIT_NO_SMARTY', true); |
|
10 |
|
|
11 |
require(dirname(__FILE__) . '/includes/init.php'); |
|
12 |
require(ROOT_PATH . 'includes/cls_json.php'); |
|
13 |
|
|
14 |
header('Content-type: text/html; charset=' . EC_CHARSET); |
|
15 |
|
|
16 |
$type = !empty($_REQUEST['type']) ? intval($_REQUEST['type']) : 0; |
|
17 |
$parent = !empty($_REQUEST['parent']) ? intval($_REQUEST['parent']) : 0; |
|
18 |
|
|
19 |
$arr['regions'] = get_regions($type, $parent); |
|
20 |
$arr['type'] = $type; |
|
21 |
$arr['target'] = !empty($_REQUEST['target']) ? stripslashes(trim($_REQUEST['target'])) : ''; |
|
22 |
$arr['target'] = htmlspecialchars($arr['target']); |
|
23 |
|
|
24 |
$json = new JSON; |
|
25 |
echo $json->encode($arr); |
|
26 |
|
|
27 |
?> |