forked from RyanTech/fanwei_xindai_3.2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
41 lines (28 loc) · 1.25 KB
/
index.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
<?php
// +----------------------------------------------------------------------
// | p2p借贷系统
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.vonwey.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: Vonwey(vonwey@163.com)
// +----------------------------------------------------------------------
if(!defined('ROOT_PATH'))
define('ROOT_PATH', str_replace('index.php', '', str_replace('\\', '/', __FILE__)));
require ROOT_PATH.'system/common.php';
if($_REQUEST['is_pc']==1)
es_cookie::set("is_pc","1",24*3600*30);
if (intval($GLOBALS['pay_req']['is_sj']) == 1){
$_REQUEST['is_sj'] = 1;
}
//echo es_cookie::get("is_pc");
if (isMobile() && !isset($_REQUEST['is_pc']) && es_cookie::get("is_pc")!=1 && intval($_REQUEST['is_sj'])==0 && trim($_REQUEST['ctl'])!='collocation' && trim($_REQUEST['ctl'])!='mobile' && file_exists(APP_ROOT_PATH."wap/index.php")){
//app_redirect("./wap/index.php");
require ROOT_PATH.'app/Lib/SiteApp.class.php';
//实例化一个网站应用实例
$AppWeb = new SiteApp();
}else{
require ROOT_PATH.'app/Lib/SiteApp.class.php';
//实例化一个网站应用实例
$AppWeb = new SiteApp();
}
?>