-
Notifications
You must be signed in to change notification settings - Fork 7
/
misc.php
60 lines (44 loc) · 1.29 KB
/
misc.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
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: misc.php 24842 2011-10-12 09:51:37Z zhengqingpeng $
*/
define('APPTYPEID', 100);
define('CURSCRIPT', 'misc');
require './source/class/class_core.php';
$discuz = C::app();
$discuz->reject_robot();
$modarray = array('seccode', 'secqaa', 'initsys', 'invite', 'faq', 'report', 'swfupload', 'manyou', 'stat', 'ranklist', 'buyinvitecode', 'tag', 'diyhelp', 'mobile', 'patch', 'getatuser', 'imgcropper');
$modcachelist = array(
'ranklist' => array('forums', 'diytemplatename'),
);
$mod = getgpc('mod');
$mod = (empty($mod) || !in_array($mod, $modarray)) ? 'error' : $mod;
if(in_array($mod, array('seccode', 'secqaa', 'initsys', 'faq', 'swfupload', 'mobile'))) {
define('ALLOWGUEST', 1);
}
$cachelist = array();
if(isset($modcachelist[$mod])) {
$cachelist = $modcachelist[$mod];
}
$discuz->cachelist = $cachelist;
switch ($mod) {
case 'secqaa':
case 'manyou':
case 'seccode':
$discuz->init_cron = false;
$discuz->init_session = false;
break;
case 'updatecache':
$discuz->init_cron = false;
$discuz->init_session = false;
default:
break;
}
$discuz->init();
define('CURMODULE', $mod);
runhooks();
require DISCUZ_ROOT.'./source/module/misc/misc_'.$mod.'.php';
?>