-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcity.php
34 lines (31 loc) · 1 KB
/
city.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
require_once(dirname(__FILE__) . '/app.php');
$ename = strval($_GET['ename']);
($currefer = strval($_GET['refer'])) || ($currefer = strval($_GET['r']));
if ($ename!='none' && $ename) {
$city = ename_city($ename);
if ($city) {
cookie_city($city);
die(require_once(dirname(__FILE__) . '/cityindex.php'));
redirect(WEB_ROOT .'/index.php'); //2010-06-27
$currefer = udecode($currefer);
if ($currefer) {
redirect($currefer);
} else if ( $_SERVER['HTTP_REFERER'] ) {
if (!preg_match('#'.$_SERVER['HTTP_HOST'].'#', $_SERVER['HTTP_REFERER'])) {
redirect( WEB_ROOT . '/index.php');
}
if (preg_match('#/city#', $_SERVER['HTTP_REFERER'])) {
redirect(WEB_ROOT .'/index.php');
}
redirect($_SERVER['HTTP_REFERER']);
}
redirect(WEB_ROOT .'/index.php');
}
}
$cities = DB::LimitQuery('category', array(
'condition' => array( 'zone' => 'city') ,
'order' => 'ORDER BY letter ASC, sort_order DESC',
));
$cities = Utility::AssColumn($cities, 'letter', 'ename');
include template('city');