setLifeTime(1);
$ch_url_handle = parse_url($_SERVER['REQUEST_URI']);
if ($cache->start(preg_replace("/&|=/is", '', $ch_url_handle['query'])))
exit(0);
//@TODO 缓存文件分级
//end 缓存
include './gs_function.php';
include './class/css.class.php';
include './class/dataHelper.class.php';
$P_QUERY = mysql_escape_string($_GET['q']); // 搜索关键字
$P_TYPE = (int) mysql_escape_string($_GET['t']);
include './tpl/main_search_head.php'; // 加载页面头部
// 进行云搜索
try {
$css_api = new CloudSearchApi();
$param_type = array('book', 'blog', 'art', 'bbs', 'qa'); // 索引列表
$indexName = key_exists($P_TYPE, $param_type) ? $param_type[(int) $_GET['t']] : $param_type[0]; // load索引列表 添加参数过滤
$index = $css_api->getIndex($indexName);
$P_PAGES_LITE = isset($_GET['pl']) ? (int) $_GET['pl'] : 15; //设置每页显示结果数
$P_CUR_PAGES = isset($_GET['p']) ? (int) $_GET['p'] !== 0 ? (int) $_GET['p'] : 1 : 1; //GET参数过滤
$results = $index->search('q=' . $P_QUERY, $P_CUR_PAGES, $P_PAGES_LITE); //云端执行搜索,下面是结果处理
if (isset($results["result"]["total"]) && $results["result"]["total"] != 0) {
//搜索返回大于0个结果 正常显示
$R_searchtime = $results["result"]['searchtime'];
$R_total = $P_PAGES_TOTAL = $results["result"]['total'];
$P_SP = dataHelper::splitPages($P_PAGES_TOTAL, $P_PAGES_LITE); //获取分页总数
//print_r($results);
include './tpl/main_search_result.php';
$cache->end();
} else {
//没结果 显示错误页面
}
} catch (Exception $e) {
//#TODO 添加用户自己的失败处理逻辑
}
?>
动软商城系统是一款优秀的网上商城系统,经营者只需要轻松的后台操作,就可以马上拥有功能强的网上销售系统,同时动软商城系统提供多样的营销手段帮助您成功打开网上销售市场。动软的模版界面机制,可以轻松的搭建出风格各异的界面,最大限度的满足经营者的要求,还拥有专业SEO优化系统,大大提高网页被搜索引擎抓取收录的几率。动软商城系统先进的流程控制技术全面促进进、销、存等系统的协同,支持企业数据整合和网络资源信息
0
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号