__init.php
952 Bytes
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
<?php
/**
* [WeEngine System] Copyright (c) 2014 WE7.CC
* WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
load()->model('module');
if (empty($action)) {
$action = 'site';
}
$eid = intval($_GPC['eid']);
if(!empty($eid)) {
$entry = module_entry($eid);
} else {
$entry = array(
'module' => $_GPC['m'],
'do' => $_GPC['do'],
'state' => $_GPC['state'],
'direct' => 0,
);
}
$modules = uni_modules();
if (empty($modules[$entry['module']])) {
message('您访问的功能模块不存在,请重新进入');
}
if(empty($entry) || empty($entry['do'])) {
message('非法访问.');
}
$_GPC['__entry'] = $entry['title'];
$_GPC['__state'] = $entry['state'];
$_GPC['state'] = $entry['state'];
$_GPC['m'] = $entry['module'];
$_GPC['do'] = $entry['do'];
$_W['current_module'] = $modules[$entry['module']];
define('IN_MODULE', $entry['module']);