加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
search.php 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
一杯冰美式 提交于 2024-09-11 15:51 . init
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: search.php 34131 2013-10-17 03:54:09Z andyzheng $
*/
define('APPTYPEID', 0);
define('CURSCRIPT', 'search');
require './source/class/class_core.php';
$discuz = C::app();
$modarray = array('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']) && $_G['setting'][($discuz->var['mod'] == 'curforum' ? 'forum' : ($discuz->var['mod'] == 'user' ? 'friend' : $discuz->var['mod'])).'status'])) {
$mod = $discuz->var['mod'];
} else {
foreach($_G['setting']['search'] as $mod => $value) {
if(!empty($value['status']) && $_G['setting'][($mod == 'curforum' ? 'forum' : ($mod == 'user' ? 'friend' : $mod)).'status']) {
break;
}
}
}
if(empty($mod)) {
showmessage('search_closed');
}
define('CURMODULE', $mod);
runhooks();
if (!$_G['setting'][($mod == 'curforum' ? 'forum' : ($mod == 'user' ? 'friend' : $mod)).'status']) {
showmessage(($mod == 'curforum' ? 'forum' : ($mod == 'user' ? 'friend' : ($mod == 'group' ? 'group_module' : $mod))).'_status_off');
}
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;
}
if(!empty($_GET['srchtxt']) && getglobal('setting/srchcensor')) {
$_GET['srchtxt'] = censor($_GET['srchtxt']);
}
require DISCUZ_ROOT.'./source/module/search/search_'.$mod.'.php';
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化