Response.End
end if
sql="select * from zwtd_info where 发表者 like '%" & zz & "%' and 年级='" & lj & "' order by 发表时间 desc"
case 7
if bt="" or zz="" then
Response.Write("<font style='font:9pt'>对不起,请输入你要查找的标题或作者关键字!</font>")
Response.End
end if
sql="select * from zwtd_info where 发表者 like '%" & zz & "%' and 年级='" & lj & _
"' and 题目 like '%" & bt & "%' order by 发表时间 desc"
case 8
sql="select * from zwtd_info where 类别='" & lx & "' order by 发表时间 desc"
case 9
if bt="" then
Response.Write("<font style='font:9pt'>对不起,请输入你要查找的标题关键字!</font>")
Response.End
end if
sql="select * from zwtd_info where 题目 like '%" & bt & "%' and 类别='" & lx & "' order by 发表时间 desc"
case 10
if zz="" then
Response.Write("<font style='font:9pt'>对不起,请输入你要查找的作者关键字!</font>")
Response.End
end if
sql="select * from zwtd_info where 发表者 like '%" & zz & "%' and 类别='" & lx & "' order by 发表时间 desc"
case 11'题目,作者,类别
if bt="" or zz="" then
Response.Write("<font style='font:9pt'>对不起,请输入你要查找的标题或作者关键字!</font>")
Response.End
end if
sql="select * from zwtd_info where 发表者 like '%" & zz & "%' and 类别='" & lx & _
"' and 题目 like '%" & bt & "%' order by 发表时间 desc"
case 12'年级,类别
sql="select * from zwtd_info where 年级='" & lj & "' and 类别='" & lx & "' order by 发表时间 desc"
case 13''题目,年级,类别
sql="select * from zwtd_info where 年级='" & lj & "' and 类别='" & lx & _
"' and 题目 like '%" & bt & "%' order by 发表时间 desc"
case 14'作者,年级,类别
sql="select * from zwtd_info where 年级='" & lj & "' and 类别='" & lx & _
"' and 发表者 like '%" & zz & "%' order by 发表时间 desc"
case 15
if bt="" or zz="" then
Response.Write("<font style='font:9pt'>对不起,请输入你要查找的标题或作者关键字!</font>")
Response.End
end if
sql="select * from zwtd_info where 年级='" & lj & "' and 类别='" & lx & _
"' and 发表者 like '%" & zz & "%' and 题目 like '%" & bt & "%' order by 发表时间 desc"
end select
'********************************************************************
dim ymh,jls,zys,tmp,i,bs,bsy
tmp=0
ymh=Request.QueryString("page")
bs=Request.QueryString("bs")
bsy=Request.QueryString("bsy")
'*****************************
if ymh="" then
ymh=1
end if
if not isnumeric(ymh) then
Response.Write("<font style='font:9pt'>对不起,非法访问!</font>")
Response.End
end if
if bs<>"" and bs<>"next" then
Response.Write("<font style='font:9pt'>对不起,非法访问!</font>")
Response.End
end if
if bsy<>"" and not isnumeric(bsy) then
Response.Write("<font style='font:9pt'>对不起,非法访问!</font>")
Response.End
end if
'*****************************
ymh=clng(ymh)
bsy=clng(bsy)
rec.activeconnection=con
rec.source=sql
rec.cursortype=1
rec.locktype=1
rec.open
if rec.eof then
Response.Write("<font style='font:9pt'>对不起,没有相关记录!</font>")
Response.End
end if
'**********************************************************
rec.PageSize=20'一页显示记录条数
jls=rec.recordcount
zys=rec.pagecount
if zys<ymh then
Response.Write("<font style='font:9pt'>对不起,非法访问!</font>")
Response.End
end if
if zys<bsy then
Response.Write("<font style='font:9pt'>对不起,非法访问!</font>")
Response.End
end if
response.write("<table style='font:9pt' border='0' width='100%'>")
'*************************************************************
response.write("<tr><td width='100%' colspan='7'>共有" & jls & "篇文章</td></tr>")
response.write("<tr><td width='100%' colspan='7'>")
if bs="" then
for i=1 to zys
tmp=tmp+1
if tmp=11 then
tmp=0
Response.Write("<a href=search.asp?page=" & i & "&bs=next&bsy=" & i & _
"&add_result=" & add_result & "&bt=" & server.URLEncode(bt) & "&zz=" & server.htmlencode(zz) & _
"&lj=" & lj & "&lx=" & server.URLEncode(lx) & "> 下10页>></a>")
exit for
else
if i=ymh then
Response.Write("第" & i & "页 ")
上一页 [1] [2] [3] [4] [5] [6] 下一页