-
Notifications
You must be signed in to change notification settings - Fork 0
/
index_bak.php
106 lines (80 loc) · 2.85 KB
/
index_bak.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
/*
Copyright (c) 2009
$Id: index.php 399 2009-10-14 07:11:04Z techice $
header("Expires: Mon, 26 Jul 1970 05:00:00 GMT");
header("Cache-Control:no-cache, must-revalidate");
header("Pragma:no-cache"); */
$name = isset($_GET['n']) ? $_GET['n'] : 'index';
$_GET['h'] = isset($_GET['h']) ? $_GET['h'] : '';
//error_reporting(E_ALL ^ E_NOTICE);
error_reporting(E_ERROR | E_WARNING | E_PARSE);
//note 加载框架配置参数
require 'config.php';
defined('MOOPHP_COOKIE_DOMAIN') && MOOPHP_COOKIE_DOMAIN && ini_set('session.cookie_domain', MOOPHP_COOKIE_DOMAIN);
//定义FROMEWORK,为false表示从前台来,true表示从后台来
define("FROMEWORK",false);
//note 加载框架
require 'framwork/MooPHP.php';
//如果脚本中断,关闭数据库连接
register_shutdown_function(array($_MooClass['MooMySQL'],'close'));
//允许的方法
$names = array('login', 'index', 'register', 'lostpasswd', 'inputpwd','myaccount', 'viewspace', 'relatekw', 'ajax',
'seccode', 'sendmail', 'material', 'search', 'service', 'payment','safetyguide','lovestyle','loveing','story',
'about','return','invite','vote','profile','recommend', 'crontab', 'pop','clinic','space','hnintro','paymenttest','cooperation','video','activity','chat',
'andriod','test','lovestation','spread'
);
//获取推广参数
MooGetFromwhere();
$MooUid = 0;
//用户信息
MooUserInfo();
$user_arr=$user=UserInfo();
$uid = $userid =$MooUid;
//模块判断
if( !in_array($name, $names) ){
MooMessage('没有这个页面', 'index.php','01');
}
//测试数据
if($_GET['cs']){
pr(Moo_is_kefu());
pr($user_arr);
}
//普通用户统一跳转WWW
if(strpos($_SERVER['HTTP_HOST'],'www')===false && !Moo_is_kefu()){
header('Location: http://'.$_SERVER['SERVER_NAME'].REQUEST_URI);
}
//伪造游客用户数据
if(empty($user_arr)){
$user_arr['uid'] = 0;
$user_arr['gender'] = 0;
$user_arr['birthyear'] = date("Y")-26;//默认26岁
$user_arr['province'] = 0;
$user_arr['city'] = 0;
}
//时间相关
if($uid){
//更新COOKIE 成活时间
MooUpateCookie($uid);
$new_email_num=header_show_total($uid);
// 判断是不是已经升高级付款
$sql = "select id from {$dbTablePre}payment_new where status = 1 and pay_type = 2 and pay_service = 1 and uid = {$uid}";
$h_pay = $_MooClass['MooMySQL']->getOne($sql,true);
}
//获取皮肤名称
$style_uid = MooGetGPC('uid', 'integer', 'G');
$skiname = MooGetGPC('skiname','string','G');
//新邮件数
if( !empty($style_uid) && $style_uid != $uid ){ //采用他人的样式
$style_user_arr = array();
if(MooMembersData($style_uid, 'is_lock') == 1) $style_user_arr = MooMembersData($style_uid);
}else{
$style_uid = $uid;
$style_user_arr = $user_arr;
}
$style_name = 'default';
include_once("module/".strtolower($name)."/index.php");
//$_MooClass['MooMySQL']->close();
@ $memcached->close();
@ $fastdb->close();
?>