-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
52 lines (51 loc) · 1.67 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
42
43
44
45
46
47
48
49
50
51
52
<?php
/*
* @copyright Leyun internet Technology(Shanghai)Co.,Ltd
* @license http://www.dzzoffice.com/licenses/license.txt
* @package DzzOffice
* @link http://www.dzzoffice.com
* @author zyx([email protected])
*/
define('APPTYPEID', 1);
define('CURSCRIPT', 'dzz');
define('DZZSCRIPT', basename(__FILE__));
define('BASESCRIPT', basename(__FILE__));
require './core/class/class_core.php';
require './dzz/function/dzz_core.php';
$dzz = C::app();
$cachelist = array();
$dzz->cachelist = $cachelist;
$dzz->init();
$mod = $_GET['mod'];
$mod = !empty($mod) ? $mod : '';
$op = !empty($_GET['op']) ? $_GET['op'] : 'index';
//调用各自的模块
if(empty($mod)){
if($_G['uid']<1 && $_G['setting']['loginset']['available']){
@header("Location: user.php?mod=logging");
exit();
}
define('CURMODULE', 'dzzindex');
require DZZ_ROOT.'./dzz/index.php';
}else{
if(strpos(strtolower($mod),':')!==false){
$patharr=explode(':',$mod);
foreach($patharr as $path){
if(!preg_match("/\w+/i",$path)) showmessage('undefined_action');
}
define('CURMODULE', str_replace(':','/',$mod));
$modfile='./dzz/'.str_replace(':','/',$mod).'/'.($op?$op:'index').'.php';
if(@!file_exists(DZZ_ROOT.$modfile)){
showmessage($modefile.lang('message','file_nonexistence',array('modfile'=>$modfile)));
}
}else{
if(!preg_match("/\w+/i",$mod)) showmessage('undefined_action');
if(!preg_match("/\w+/i",$op)) showmessage('undefined_action');
define('CURMODULE', $mod);
if(@!file_exists(DZZ_ROOT.($modfile = './dzz/'.$mod.'/'.$op.'.php'))) {
showmessage('undefined_action', '', array('mod' => $mod));
}
}
include DZZ_ROOT.$modfile;
}
?>