This repository was archived by the owner on May 31, 2021. It is now read-only.
forked from meoncstudio/star-atlas
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
157 lines (99 loc) · 2.71 KB
/
index.php
File metadata and controls
157 lines (99 loc) · 2.71 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!--
_/_/_/_/_/ _/_/_/_/_/ _/_/_/ _/_/_/_/
_/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/
_/_/_/_/_/ _/ _/_/_/_/_/ _/_/_/_/
_/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/
_/_/_/_/_/ _/ _/ _/ _/ _/
_/_/_/ _/_/_/_/_/ _/ _/_/_/ _/_/_/_/_/
_/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/
_/_/_/_/_/ _/ _/ _/_/_/_/_/ _/_/_/_/_/
_/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/_/_/_/_/ _/ _/ _/_/_/_/_/
Interested in join us?
Email us for website engine job: i@istaratlas.com
-->
<?php
ini_set('display_errors', '1');
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
//=========数据库=========
require('database.php');
//========常量===========
require("config.php");
//========LANGUAGE===========
require("language.php");
//========用户=========
require('user.php');
//=======T==============
if(empty($_REQUEST['t'])){
$t = 'index';
}else{
$t = $_REQUEST['t'];
}
?>
<?php
if($t == 'index'){
index();
}else if($t == "user"){
getPage("usercenter");
}else if($t == "article"){
getPage("article");
}else if($t == "admin"){
getPage("admin");
}
?>
<?php
function keyWordFilter($content){
$sql = "select * from sa_page_keywords";
$result = mysql_query($sql);
$results = array();
while ($row = mysql_fetch_assoc($result)){
$results[] = $row;
}
for($t = 0; $t < count($results); $t++){
eval($results[$t]['eval']);
$content = str_replace($results[$t]['key'], $eval, $content);
}
return $content;
}
?>
<?php
function index(){
$url = SAurl . 'function/' . lang . '/index.php';
echo '<!--';
$check = @fopen($url,"r");
echo '-->';
if($check == false){
require('function/CN_zh/index.php');
}else{
require('function/' . lang . '/index.php');
}
}
?>
<?php
function getPage($file){
$url = SAurl . 'function/' . lang . '/' . $file . '.php';
echo '<!--';
$check = @fopen($url,"r");
echo '-->';
if(!$check){
$url = SAurl . 'function/CN_zh/' . $file . '.php';
echo '<!--';
$check = @fopen($url,"r");
echo '-->';
if(!$check){
echo '<!--你所访问的页面不存在或存在问题-->';
require('function/CN_zh/index.php');
}else{
echo '<!--你所访问的页面不支持你使用的语言-->';
require('function/CN_zh/' . $file . '.php');
}
}else{
echo '<!--访问正常-->';
require('function/' . lang . '/' . $file . '.php');
}
}
?>