⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 search.asp

📁 学校网站管理系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/set.asp"-->
<!--#include file="inc/dll.asp"-->
<!--#include file="inc/inc.asp"-->
<!--#include file="sqlx.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;<img border=0 src='img/mor.gif' align=absmiddle>&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;<img border=0 src='img/mor.gif' align=absmiddle>&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;<img border=0 src='img/mor.gif' align=absmiddle>&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;<img border=0 src='img/mor.gif' align=absmiddle>&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="#037000" 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="#037000" 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="#037000" 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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -