熊猫办公系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

293 lines
11 KiB

<?php
require("../class/connect.php");
if(!defined('InEmpireCMS'))
{
exit();
}
require("../class/db_sql.php");
require("../data/dbcache/class.php");
require LoadLang("pub/fun.php");
require("../class/schallfun.php");
$link=db_connect();
$empire=new mysqlquery();
eCheckCloseMods('sch');//关闭模块
$searchtime=time();
$totalnum=(int)$_GET['totalnum'];
$sear=(int)$_GET['sear'];
if(!$public_r['usetotalnum'])
{
$totalnum=0;
}
$firstsearch=0;
if($sear<1)
{
$firstsearch=1;
//搜索间隔
$lastsearchtime=(int)getcvar('lastschalltime');
if($lastsearchtime)
{
if($searchtime-$lastsearchtime<$public_r[schalltime])
{
printerror('SchallOutTime','',1);
}
}
//设置最后搜索时间
esetcookie('lastschalltime',$searchtime,$searchtime+3600*24);
}
$page=(int)$_GET['page'];
$page=RepPIntvar($page);
$start=0;
$page_line=$public_r['schallpagenum'];//每页显示链接数
$line=$public_r['schallnum'];//每页显示记录数
$offset=$start+$page*$line;//总偏移量
//编码
$iconv='';
$char='';
$targetchar='';
if($ecms_config['sets']['pagechar']!='gb2312')
{
include_once(ECMS_PATH.'e/class/doiconv.php');
$iconv=new Chinese('');
$char=$ecms_config['sets']['pagechar']=='big5'?'BIG5':'UTF8';
$targetchar='GB2312';
}
$schallr=ReturnSearchAllSql($_GET);
require("../data/dbcache/SearchAllTb.php");
$keyboard=$schallr['keyboard'];
$query="select id,classid from {$dbtbpre}enewssearchall where ".$schallr['where'];
if($totalnum<1)
{
$totalquery="select count(*) as total from {$dbtbpre}enewssearchall where ".$schallr['where'];
$num=$empire->gettotal($totalquery);
if(empty($num))
{
printerror('SchallNotRecord','',1);
}
}
else
{
$num=$totalnum;
}
$search=$schallr['search'].'&sear=1';
if($public_r['usetotalnum'])
{
$search.='&totalnum='.$num;
}
//checkpageno
eCheckListPageNo($page,$line,$num);
$query.=" order by infotime desc limit $offset,$line";
$sql=$empire->query($query);
$listpage=page1($num,$line,$page_line,$start,$page,$search);
$url="<a href='".ReturnSiteIndexUrl()."'>".$fun_r['index']."</a>&nbsp;>&nbsp;".$fun_r['SearchAllNav'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>搜索 - Powered by EmpireCMS</title>
<link href="/skin/default/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/skin/default/js/tabs.js"></script>
<style type="text/css">
<!--
.r {
display:inline;
font-weight:normal;
margin:0;
font-size:16px;
margin-top:10px;
}
.a{color:green}
.fl{color:#77c}
-->
</style>
</head>
<body class="listpage">
<!-- 页头 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="top">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="63%">
<!-- 登录 -->
<script>
document.write('<script src="/e/member/login/loginjs.php?t='+Math.random()+'"><'+'/script>');
</script>
</td>
<td align="right">
<a onclick="window.external.addFavorite(location.href,document.title)" href="#ecms">加入收藏</a> | <a onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('/')" href="#ecms">设为首页</a> | <a href="/e/member/cp/">会员中心</a> | <a href="/e/DoInfo/">我要投稿</a> | <a href="/e/web/?type=rss2" target="_blank">RSS<img src="/skin/default/images/rss.gif" border="0" hspace="2" /></a>
</td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="10">
<tr valign="middle">
<td width="240" align="center"><a href="/"><img src="/skin/default/images/logo.gif" width="200" height="65" border="0" /></a></td>
<td align="center"><a href="http://www.phome.net/OpenSource/" target="_blank"><img src="/skin/default/images/opensource.gif" width="100%" height="70" border="0" /></a></td>
</tr>
</table>
<!-- 导航tab选项卡 -->
<table width="920" border="0" align="center" cellpadding="0" cellspacing="0" class="nav">
<tr>
<td class="nav_global"><ul>
<li class="curr" id="tabnav_btn_0" onmouseover="tabit(this)"><a href="/">首页</a></li>
<li id="tabnav_btn_1" onmouseover="tabit(this)"><a href="/news/">新闻中心</a></li>
<li id="tabnav_btn_2" onmouseover="tabit(this)"><a href="/download/">下载中心</a></li>
<li id="tabnav_btn_3" onmouseover="tabit(this)"><a href="/movie/">影视频道</a></li>
<li id="tabnav_btn_4" onmouseover="tabit(this)"><a href="/shop/">网上商城</a></li>
<li id="tabnav_btn_5" onmouseover="tabit(this)"><a href="/flash/">FLASH频道</a></li>
<li id="tabnav_btn_6" onmouseover="tabit(this)"><a href="/photo/">图片频道</a></li>
<li id="tabnav_btn_7" onmouseover="tabit(this)"><a href="/article/">文章中心</a></li>
<li id="tabnav_btn_8" onmouseover="tabit(this)"><a href="/info/">分类信息</a></li>
</ul></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="10" cellpadding="0">
<tr valign="top">
<td class="list_content"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="position">
<tr>
<td>现在的位置:<a href="/">首页</a>&nbsp;>&nbsp;搜索</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="box">
<tr>
<td><form action='index.php' method="GET" name="search_news" id="search_news">
<table width="100%" border="0" cellspacing="6" cellpadding="0">
<tr>
<td height="32">关键字:
<input name="keyboard" type="text" id="keyboard" value="<?=$keyboard?>" size="42" />
<select name="field" id="field">
<option value="1">全文</option>
<option value="2">标题</option>
<option value="3">内容</option>
</select>
<input type="submit" name="Submit22" value="搜索" />
<font color="#666666">(多个关键字请用&quot;空格&quot;隔开)</font> </td>
</tr>
</table>
</form>
<table width="100%" border="0" cellpadding="0" cellspacing="6">
<tr>
<td>系统搜索到约有<strong><?=$num?></strong>项符合<strong><?=$keyboard?></strong>的查询结果</td>
</tr>
</table>
<?php
$no=$offset;
$subnum=120;
$formatdate="Y-m-d H:i:s";
while($r=$empire->fetch($sql))
{
$tbname=$class_r[$r[classid]]['tbname'];
if(empty($tbname))
{
continue;
}
$titlefield=$schalltb_r[$tbname]['titlefield'];
$smalltextfield=$schalltb_r[$tbname]['smalltextfield'];
$infor=$empire->fetch1("select id,classid,titlepic,newstime,isurl,titleurl,".$titlefield.",".$smalltextfield." from {$dbtbpre}ecms_".$tbname." where id='$r[id]' limit 1");
if(empty($infor['id']))
{
continue;
}
$no++;
$titleurl=sys_ReturnBqTitleLink($infor);
$titlepic=$infor['titlepic']?$infor['titlepic']:$public_r['newsurl']."e/data/images/notimg.gif";
$smalltext=SubSchallSmalltext($infor[$smalltextfield],$subnum);
$title=DoReplaceFontRed($infor[$titlefield],$keyboard);
$smalltext=DoReplaceFontRed($smalltext,$keyboard);
$newstime=date($formatdate,$infor['newstime']);
?>
<h2 class="r"><span><?=$no?>.</span> <a class="l" href="<?=$titleurl?>" target="_blank"><?=$title?></a></h2>
<table width="80%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td><?=$smalltext?></td>
</tr>
<tr>
<td><span class="a"><?=$titleurl?> - <?=$newstime?></span></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<?php
}
db_close();
$empire=null;
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list_page">
<tr>
<td><?=$listpage?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<div class='footer'>
<div class='footer1'>
<div class='user-say'>
<span class='box'><i class='i-1'></i>价格优惠</span>
<span class='box'><i class='i-2'></i>致臻精品</span>
<span class='box'><i class='i-3'></i>高质售后</span>
<span class='box'><i class='i-4'></i>100%满意</span>
<span class='box1'><i class='i-5'></i>提升效率</span>
</div>
</div>
<div class='footer2'>
<div class='wlimit'>
<div class='footer-logo'></div>
<div class='company-say'>
<div class="statements">
<a rel="nofollow" href="/" target="_blank"><?=$public_r[sitename]?></a>
<a rel="nofollow" href="/aboutus/" target="_blank">关于我们</a><span>|</span>
<a rel="nofollow" href="/gvrf/" target="_blank">注册协议</a><span>|</span>
<a rel="nofollow" href="/copyright/" target="_blank">版权声明</a><span>|</span>
<a rel="nofollow" href="/help/" target="_blank">PPT教程</a><span>|</span>
<a rel="nofollow" href="/settlecontrac/" target="_blank">入驻签约</a>
</div>
<div class="copyrights">
<a href="http://www.miibeian.gov.cn" target="_blank" rel="nofollow"><i class="lazy gov-icon gov-icon-icp" data-original="/common/image/govemblem.png"></i><span>沪ICP备17039466号</span></a>
<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31010402005121" target="_blank" rel="nofollow"><i class="lazy gov-icon gov-icon-wa" data-original="http://static.tukuppt.com/common/image/govemblem.png"></i><span>沪公网安备 31010402005121号</span></a>
<span class="tukuppt-right"><?=$public_r[sitename]?>-Copyright © 2018 版权所有</span>
</div>
</div>
</div>
</div>
</div>
<!-- 侧边栏 -->
<div class='cbl'>
<div id="back-top">
<div class='userqq'>
<a href="http://wpa.qq.com/msgrd?v=3&uin=<?=$public_r['add_qq']?>&site=qq&menu=yes" target="_blank" class="bg-b">
<i class="ty qq"></i>
</a>
<div class='userqqtipw'>
<div class='userqqtip'>
<div class="inner"></div>
<a href="http://wpa.qq.com/msgrd?v=3&uin=<?=$public_r['add_qq']?>&site=qq&menu=yes" target="_blank" class='clickqq'>点击咨询</a>
<div class='qqtime'>在线时间:9:00-21:00</div>
</div>
</div>
</div>
<div class='lines'></div>
<a target="_blank" href="/vip/" class="bg-b">
<i class='ty huiyuan'></i>
</a>
<div class='lines'></div>
<a href="javascript:;" class="bg-b"><i class='ty advice'></i></a>
<div class='lines'></div>
<a href="javascript:;" class="bg-b"><i class='ty return-top'></i></a>
</div>
</div>
</body>
</html>