-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.php
47 lines (39 loc) · 1.19 KB
/
app.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
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
require_once(dirname(__FILE__). '/include/application.php');
/* magic_quota_gpc */
$_GET = magic_gpc($_GET);
$_POST = magic_gpc($_POST);
$_COOKIE = magic_gpc($_COOKIE);
/* process currefer*/
$currefer = uencode(strval($_SERVER['REQUEST_URI']));
/* session,cache,configure,webroot register */
Session::Init();
$INI = ZSystem::GetINI();
/* end */
/* date_zone */
if(function_exists('date_default_timezone_set')) {
date_default_timezone_set($INI['system']['timezone']);
}
/* end date_zone */
/* biz logic */
$currency = $INI['system']['currency'];
$login_user_id = ZLogin::GetLoginId();
$login_user = Table::Fetch('user', $login_user_id);
$hotcities = option_hotcategory('city', false, true);
$allcities = option_category('city', false, true);
$city = cookie_city(null);
if (!isset($_COOKIE['referer'])) {
setcookie('referer',$_SERVER['HTTP_REFERER']);
}
/* not allow access app.php */
if($_SERVER['SCRIPT_FILENAME']==__FILE__){
redirect( WEB_ROOT . '/index.php');
}
/* end */
$AJAX = ('XMLHttpRequest' == @$_SERVER['HTTP_X_REQUESTED_WITH']);
if (false==$AJAX) {
header('Content-Type: text/html; charset=UTF-8');
run_cron();
} else {
header("Cache-Control: no-store, no-cache, must-revalidate");
}