<%
'程序名称：千纸鹤网站管理系统
'程序作者：千纸鹤
'作者邮箱：qzhxxw@sina.com
'作者 Q Q：138999501
'作者电话：0000000000
'官方主页：http://www.qqzzhh.com/
'官方论坛：http://www.qqzzhh.com/bbs
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/set.asp"-->
<!--#include file="inc/dll.asp"-->
<!--#include file="inc/inc.asp"-->
<%title="站内搜索" 
yecao_search="ぁ|あ|ぃ|い|ぅ|う|ぇ|え|ぉ|お|か|が|き|ぎ|く|ぐ|け|げ|こ|ご|さ|ざ|し|じ|す|ず|せ|ぜ|そ|ぞ|た|だ|ぢ|っ|つ|づ|て|で|と|ど|な|ぺ|べ|へ|ぷ|ふ|ぶ|ぴ|び|ひ|ぱ|は|ば|の|ね|に|ぬ|ほ|ぼ|ぽ|ま|み|む|め|も|ゃ|や|ゅ|ゆ|ょ|よ|ら|り|ィ|ア|ァ|ゞ|ゝ|゜|゛|ん|を|ゑ|ゐ|わ|ゎ|ろ|れ|る|ポ|ベ|プ|ゴ|ガ|ギ|グ|ゲ|ザ|ジ|ズ|ヅ|デ|ド|ポ|ベ|プ|ビ|パ|ヴ|ボ|ペ|ブ|ピ|バ|ヂ|ダ|ゾ|ゼ"
yecao_info=split(yecao_search,"|")
If Request.Form<>"" Then
For Each yecao_post In Request.Form
For yecao_get=0 To Ubound(yecao_info)
If Instr(LCase(Request.Form(yecao_post)),yecao_info(yecao_get))<>0 Then
Response.Write "<Script>alert('对不起，您提交的内容中包含系统禁止字符！');location.href='search.asp';</Script>"
Response.End
End If
Next
Next
End If
call top()%>
<table border="0"  cellspacing="0" cellpadding="0" align=center class=bgcolor>
<tr><td class=left></td>
<td class=width>
<table width=100% border=0  cellspacing="0" cellpadding="0">
<tr><td valign=top>
<%call br()%>
<table border="0"   cellspacing="0" cellpadding="0">
<td  class=lefttopcenter>&emsp;※&nbsp;会员登陆</td><td  class=lefttopright></td></tr></table>
<table border="0" cellspacing="0" cellpadding="0"><tr>
<td valign=top class=leftcentercenter  height=150 >
<%call login()%>
</td><td class=leftcenterright></td></tr></table>
<table border="0"  cellspacing="0" cellpadding="0"><tr><td class=leftfootcenter></td><td class=leftfootright></td></tr></table>
<%call br()%>
<table border="0"   cellspacing="0" cellpadding="0">
<td  class=lefttopcenter>&emsp;※&nbsp;站内搜索</td><td  class=lefttopright></td></tr></table>
<table border="0" cellspacing="0" cellpadding="0"><tr>
<td valign=top class=leftcentercenter align=center>
<%call search()%>
</td><td class=leftcenterright></td></tr></table>
<table border="0"  cellspacing="0" cellpadding="0"><tr><td class=leftfootcenter></td><td class=leftfootright></td></tr></table>
<%call br()%>
<table border="0"   cellspacing="0" cellpadding="0">
<td  class=lefttopcenter>&emsp;※&nbsp;会员排行</td>
<td class=lefttopright></td></tr></table>
<table border="0" cellspacing="0" cellpadding="0"><tr>
<td valign=top class=leftcentercenter align=center><%call br%>
<%call YC_user()%><%call br%>
</td><td class=leftcenterright></td></tr></table>
<table border="0"  cellspacing="0" cellpadding="0"><tr><td class=leftfootcenter></td><td class=leftfootright></td></tr></table>
<%call br%>
</td>
<td  width="5"></td>
<td valign=top align=right><%call br%><%call right()%></td><td class=right></td></tr></table>
<%call foot()
sub right()
if request("searching")="true" then
dim keyword,yecaoclass,mode
keyword=checksql("搜索关键字",request("keyword"),1,30)
yecaoclass=checksql("搜索栏目",request("yecaoclass"),1,30)
mode=checksql("搜索方式",request("mode"),1,30)%>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td class=righttopleft></td>
<td class=righttopcenter>&emsp;※&nbsp;<%if request.form("searching")="true" then%>站内搜索→<%=yecaoclass%>→<%=mode%>→关键词→[<%=keyword%>]<%else%>站内搜索<%end if%></td>
</tr></table>
<%
select case yecaoclass
case "搜索新闻"
if mode="按标题" then 
mode="title" 
elseif mode="按内容" then  
mode="content" 
else 
mode="title" 
end if
sql="select * from YC_news where "&mode&" like '%"&keyword&"%' and pass=true order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>
<table border="0"   cellspacing="0" cellpadding="0"><tr>
<td class=rightcenterleft></td>
<td  class=rightcentercenter valign=top>
<table border="1"   cellspacing="0" cellpadding="0" align=center bordercolor="#bcbcbc" id='yecaotable' width=100% rules=rows frame=void>
<%if not rs.eof then
rs.movefirst
do while not rs.eof%>
<tr><td height=25 width=80%>
·[<%set rstop=server.CreateObject("adodb.recordset")
sql3="select * from [YC_newsclass] where id="&rs("class")&" order by id desc"
rstop.open sql3,conn,1,3
if not rstop.bof and not rstop.eof then
response.Write rstop("classname")
end if
rstop.close
set rstop=nothing
%>]&nbsp;<a  href="shownews.asp?id=<%=rs("id")%>"
target="news" title='新闻标题：<%=rs("title")%><br>发表时间：<%=rs("date")%><br>阅读次数：<%=rs("click")%>次'><%=replace(rs("title"),keyword,"<font color='red'>"&keyword&"</font>")%></a>&nbsp;<%if rs("best")=true then%>『<font color=red>推荐</font>』<%end if%></td><td align=center width=5%><%=rs("click")%></td><td width=15%><%=rs("date")%></td></tr>
<%rs.movenext
loop
end if
if rs.eof and rs.bof then
response.write"<tr><td colspan=6 height=100 align=center><font color=red><b>没有搜索到您需要的新闻！</</b></font></td></tr>"
end if%>
<tr height=25 class=bg><td align=center colspan=6>共有<%=rs.recordcount%>条纪录
</td></tr></table>
</TD></TR></table>
<table border="0" cellspacing="0" cellpadding="0"><tr>
<td  class=rightfootleft></td><td class=rightfootcenter></td></tr></table>
</td></tr></table><%call br%>
<%
rs.close
set rs=nothing
'##################################################################
case "搜索文章"
if mode="按标题" then 
mode="title" 
elseif mode="按内容" then  
mode="content" 
else 
mode="title" 
end if
sql="select * from [YC_art] where "&mode&" like '%"&keyword&"%' and pass=true order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>
<table border="0"   cellspacing="0" cellpadding="0"><tr>
<td class=rightcenterleft></td><td  class=rightcentercenter valign=top>
<table border="1"   cellspacing="0" cellpadding="0" align=center bordercolor="#bcbcbc" id='yecaotable' width=100% rules=rows frame=void>
<%if not rs.eof then
rs.movefirst
do while not rs.eof%>
<tr class="tr" onmouseover="this.className='trover'" onmouseout="this.className='tr'"><td height=25 width=80%>
·[<%set rstop=server.CreateObject("adodb.recordset")
sql3="select * from YC_artclass where id="&rs("class")&" order by id desc"
rstop.open sql3,conn,1,1
if not rstop.bof and not rstop.eof then
response.Write rstop("classname")
end if
rstop.close
set rstop=nothing
%>]&nbsp;<a href="showart.asp?id=<%=rs("id")%>"
target=_blank title="文章标题：<%=rs("title")%><br>文章作者：<%=rs("writer")%><br>发表会员：<%=rs("user")%><br>文章版权：<%=rs("copyright")%><br>发表时间：<%=rs("date")%><br>阅读次数：<%=rs("click")%>次"><%=replace(rs("title"),keyword,"<font color='red'>"&keyword&"</font>")%></a>&nbsp;<%if rs("best")=true then%>『<font color=red>推荐</font>』<%end if%></td><td align=center width=5%><%=rs("click")%></td><td width=15%><%=rs("date")%></td></tr>
<%rs.movenext
loop
else
if rs.eof and rs.bof then
response.write"<tr><td colspan=6 height=100 align=center><font color=red><b>没有搜索到您需要的文章！</</b></font></td></tr>"
end if
end if%>
<tr height=25 class=bg><td align=center colspan=6>共有<%=rs.recordcount%>条纪录</td></tr></table>
</TD></TR></table>
<table border="0" cellspacing="0" cellpadding="0" align=center><tr>
<td  class=rightfootleft></td><td class=rightfootcenter></td></tr></table></td></tr></table><%call br%>
<%rs.close
set rs=nothing
'##################################################################
case "搜索下载"
if mode="按标题" then
mode="title"
elseif mode="按内容" then 
mode="content"
else
mode="title"
end if
sql="select * from YC_down where "&mode&" like '%"&keyword&"%' and pass=true order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>
<table border="0" cellspacing="0" cellpadding="0"><tr>
<td class=rightcenterleft></td>
<td  class=rightcentercenter valign=top>
<table border="1"   id='yecaotable' cellspacing="0" cellpadding="0" align=center bordercolor="#bcbcbc" width=100% rules=rows frame=void>
<%if not rs.eof then
rs.movefirst
do while not rs.eof%>
<tr><td height=25 width=80%>
·[<%set rs3=server.CreateObject("adodb.recordset")
sql3="select * from YC_downclass where id="&rs("class")&" order by id desc"
rs3.open sql3,conn,1,3
if not rs3.bof and not rs3.eof then
response.Write rs3("classname")
end if
rs3.close
set rs3=nothing
%>]&nbsp;<a href="showdown.asp?id=<%=rs("id")%>"
target="_blank" title='下载标题：<%=rs("title")%><br>文件大小：<%=rs("size")%><br>发表时间：<%=rs("date")%><br>点击次数：<%=rs("click")%>次<br>下载次数：<%=rs("downclick")%>次'><%=replace(rs("title"),keyword,"<font color='red'>"&keyword&"</font>")%></a>&nbsp;<%if rs("best")=true then%>『<font color=red>推荐</font>』<%end if%></td><td aalign=center width=5%><%=rs("click")%></td><td width=15%><%=rs("date")%></td></tr>
<%
rs.movenext
loop
else
if rs.eof and rs.bof then
response.write"<tr><td colspan=6 height=100 align=center><font color=red><b>没有搜索到您需要的下载！</</b></font></td></tr>"
end if
end if%>
<tr height=25 class=bg><td align=center colspan=6>共有<%=rs.recordcount%>条纪录</td></tr></table>
</TD></TR></table>
<table border="0" cellspacing="0" cellpadding="0" align=center><tr>
<td  class=rightfootleft></td><td class=rightfootcenter></td><td  class=rightfootright></td></tr></table>
</td></tr></table><%call br%>
<%
rs.close
set rs=nothing
'##################################################################
case "搜索图片"
if mode="按标题" then 
mode="title" 
elseif mode="按内容" then  
mode="content" 
else 
mode="title" 
end if
sql="select * from YC_pic where "&mode&" like '%"&keyword&"%' and pass=true order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>
<table border="0"   cellspacing="0" cellpadding="0"><tr>
<td class=rightcenterleft></td>
<td  class=rightcentercenter valign=top>
<table border="0"   cellspacing="0" cellpadding="4" align=center bordercolor="<%=border%>" width=100%>
<tr><%if not rs.eof then
rs.movefirst
do while not rs.eof%>
<td align=center>
<table border=0 cellspacing='0' cellpadding='0'>
<tr><td class=pictopleft></td><td class=pictopcenter></td><td class=pictopright></td></tr>
<tr><td class=piccenterleft></td><td style="padding:4px"><a href=showpic.asp?id=<%=rs("id")%> target="pic" onfocus="this.blur()">
<img src="<%=rs("pic")%>" border=1 TITLE='图片名称：<%=rs("title")%><br>发表会员：<%=rs("user")%><br>发表日期：<%=rs("date")%><br>点击次数：<%=rs("click")%>次' width=110 height=110 style="border:1px solid #444"></a></td><td class=piccenterright></td></tr>
<tr><td class=picfootleft></td><td class=picfootcenter></td><td class=picfootright></td></tr></table></td>
<%
i=i+1
if i mod 4 = 0 then%>
</tr><tr>
<%
end if
rs.movenext
loop
else
if rs.eof and rs.bof then
response.write"<tr><td colspan=6 height=100 align=center><font color=red><b>没有搜索到您需要的下载！</</b></font></td></tr>"
end if
end if%>
</tr><tr height=25 class=bg ><td align=center colspan=6 style="border-top:1px solid <%=border%>">共有<%=rs.recordcount%>条纪录</td></tr></table>
</TD></TR></table>
<table border="0" cellspacing="0" cellpadding="0"><tr>
<td  class=rightfootleft></td><td class=rightfootcenter></td></tr></table>
</td></tr></table>
<%call br()
rs.close
set rs=nothing
'##################################################################
case "搜索娱乐"
if mode="按标题" then 
mode="title" 
elseif mode="按内容" then  
mode="content" 
else 
mode="title" 
end if
sql="select * from YC_dj where "&mode&" like '%"&keyword&"%' and pass=true order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>
<table border="0"   cellspacing="0" cellpadding="0"><tr>
<td class=rightcenterleft></td>
<td  class=rightcentercenter valign=top>
<table border="1" id='yecaotable'  cellspacing="0" cellpadding="0" align=center bordercolor="#bcbcbc" width=100% rules=rows frame=void>
<%if not rs.eof then
rs.movefirst
do while not rs.eof%>
<tr><td height=25 width=80%>
·[<%set rstop=server.CreateObject("adodb.recordset")
sql3="select * from YC_djclass where id="&rs("class")&" order by id desc"
rstop.open sql3,conn,1,3
if not rstop.bof and not rstop.eof then
response.Write rstop("classname")
end if
rstop.close
set rstop=nothing
%>]&nbsp;<a href="showdj.asp?id=<%=rs("id")%>" target="dj" title="娱乐标题：<%=rs("title")%><br>娱乐作者：<%=rs("singer")%><br>文件大小：<%=rs("size")%><br>发表日期：<%=rs("date")%><br>点击次数：<%=rs("click")%>次"><%=replace(rs("title"),keyword,"<font color='red'>"&keyword&"</font>")%></a>&nbsp;<%if rs("best")=true then%>『<font color=red>推荐</font>』<%end if%></td><td aalign=center width=5%><%=rs("click")%></td><td width=15%><%=rs("date")%></td></tr>
<%
rs.movenext
loop
else
if rs.eof and rs.bof then
response.write"<tr><td colspan=6 height=100 align=center><font color=red><b>没有搜索到您需要的娱乐！</</b></font></td></tr>"
end if
end if%>
<tr height=25 class=bg><td align=center colspan=6>共有<%=rs.recordcount%>条纪录</td></tr></table>
</TD></TR></table>
<table border="0" cellspacing="0" cellpadding="0" align=center><tr>
<td  class=rightfootleft></td><td class=rightfootcenter></td></tr></table>
</td></tr></table><%call br%>
<%
rs.close
set rs=nothing
'##########################################################
case "搜索会员"
if mode="按标题" then 
mode="user_name" 
elseif mode="按内容" then  
mode="user_true_name" 
else 
mode="user_name" 
end if
sql="select * from YC_user where "&mode&" like '%"&keyword&"%' and pass=true order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>
<table border="0"   cellspacing="0" cellpadding="0"><tr>
<td class=rightcenterleft></td>
<td  class=rightcentercenter valign=top>
<table id='yecaotable' border="1"   cellspacing="0" cellpadding="0" align=center bordercolor="#bcbcbc" width=100% rules=rows frame=void>
<%if not rs.eof then
rs.movefirst
do while not rs.eof%>
<tr height=25>
<td width=80%>&nbsp;<img src="<%=rs("user_face")%>" title="<img src=<%=rs("user_face")%> border=1>" width=16 height=16 border=1 align=absmiddle>&nbsp;<a href="sms.asp?action=send&user=<%=rs("user_name")%>" title="发送短信给[<%=rs("user_name")%>]"><%=rs("user_name")%></a></td>
<td width=5%><%=rs("user_sex")%></td>
<td width=5%><img src=img/tel.gif title="<%if rs("user_tel")="" then response.write""&rs("user_tel")&"没有电话" else response.write rs("user_tel")%>"></td>
<td width=5%><img src=img/qq.gif title="<%if rs("user_qq")="" then response.write""&rs("user_name")&"没有QQ" else response.write rs("user_qq")%>"></td>
<td width=5%><img src=img/email.gif title="<%if rs("user_mail")="" then response.write""&rs("user_name")&"没有邮箱" else response.write rs("user_mail")%>"></td>
<td width=5%><img src=img/web.gif title="点击浏览&nbsp;<b><font color=red>[<%=rs("user_name")%>]</font></b>&nbsp;的主页:<%if rs("user_web")="" then response.write""&rs("user_name")&"没有主页" else response.write rs("user_web")%>" onclick="window.open('<%=rs("user_web")%>');"></td>
</tr>
<%
rs.movenext
loop
else
if rs.eof and rs.bof then
response.write"<tr><td colspan=5 height=100 align=center><font color=red><b>没有搜索到您需要的会员！</</b></font></td></tr>"
end if
end if%>
<tr height=25 class=bg><td align=center colspan=5>共有<%=rs.recordcount%>条纪录</td></tr></table>
</TD></TR></table>
<table border="0" cellspacing="0" cellpadding="0" align=center><tr>
<td  class=rightfootleft></td><td class=rightfootcenter></td></tr></table>
</td></tr></table><%call br%>
<%
rs.close
set rs=nothing
case else
Response.Write "<script>alert('没找到相关搜索栏目，返回重新输入！');location.href='search.asp';</script>"
response.end
end select
else%>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td class=righttopleft></td>
<td class=righttopcenter>&emsp;※&nbsp;欢迎使用YCMS站内搜索引擎! </td>
</tr></table>
<table border="0"   cellspacing="0" cellpadding="0"><tr>
<td class=rightcenterleft></td>
<td  class=rightcentercenter valign=top>
<br>
<ul  style=list-style-type:square;line-height:180%>
<li>本搜索引擎可以搜索站内各栏目中的相关内容；
<li>使用方法如下：
<ul style=list-style-type:square;line-height:180%>
<li>第一步：输入要搜索的栏目。
<li>第二步：输入要搜索的方式。
<li>第三步：输入要搜索的关键词。
<li>然后点击提交即可快速搜索到本站相关资讯。</ul>
</ul>
</TD></TR></table>
<table border="0" cellspacing="0" cellpadding="0"><tr>
<td  class=rightfootleft></td><td class=rightfootcenter></td></tr></table>
</td></tr></table><%call br%>
<%
end if
end sub%>
