-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
executable file
·55 lines (40 loc) · 1.13 KB
/
search.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
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: search.php 26313 2011-12-08 09:12:56Z yangli $
*/
define('APPTYPEID', 0);
define('CURSCRIPT', 'search');
require './source/class/class_core.php';
$discuz = C::app();
$modarray = array('my', 'user', 'curforum', 'newthread');
$cachelist = $slist = array();
$mod = '';
$discuz->cachelist = $cachelist;
$discuz->init();
if(in_array($discuz->var['mod'], $modarray) || !empty($_G['setting']['search'][$discuz->var['mod']]['status'])) {
$mod = $discuz->var['mod'];
} else {
foreach($_G['setting']['search'] as $mod => $value) {
if(!empty($value['status'])) {
break;
}
}
}
if(empty($mod)) {
showmessage('search_closed');
}
define('CURMODULE', $mod);
runhooks();
require_once libfile('function/search');
$navtitle = lang('core', 'title_search');
if($mod == 'curforum') {
$mod = 'forum';
$_GET['srchfid'] = array($_GET['srhfid']);
} elseif($mod == 'forum') {
$_GET['srhfid'] = 0;
}
require DISCUZ_ROOT.'./source/module/search/search_'.$mod.'.php';
?>