📄 scen.asp
字号:
<!--#include file="mdb.asp"-->
<!--#Include File="Check_hx.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/format.asp"-->
<!--#include file="inc/inc.asp"-->
<!--#include file="inc/syscode_web.asp"-->
<%
dim keyWord,SearchType
keyWord = checkspace(trim(request.QueryString("keyWord")))
SearchType = checkspace(trim(request.QueryString("SearchType")))
if request("page")<>"" then
if not isInteger(request("page")) then
Response.Write "<script language=javascript>alert('分页参数非法');javascript:history.back();</script>"
Response.End
end if
end if
start="各地景点介绍"
call head()
call menu()
select case SearchType
case"文章"
sql="select * from web where passed=0 and art_title like '%"&Jencode(keyWord)&"%' order by art_id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
end select
%>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="table-hx66s">
<tr>
<td height="23"> 你的位置:<a href='index.asp'><%=webname%></a> >> <%=start%></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="table-hx66s">
<tr>
<TD width=175 vAlign=top align=center>
<table border="0" width=165 align="center" cellpadding="0" cellspacing="1" class="b5" style="border-collapse: collapse">
<tr>
<td height="26" class="a5"> 会 员 登 录</td>
</tr>
<tr>
<td height="22"><%call userlogin()%></td>
</tr>
<tr>
<td height="26" class="a2"> 文 章 分 类</td>
</tr>
<tr>
<td><%call class_art()%></td>
</tr>
<tr>
<td height="26" class="a6"> 查 找 文 章</td>
</tr>
<tr>
<td height="25" valign="top"><%call search_Art()%></td></td>
</tr>
</table><BR>
</TD>
<td width="*" valign="top" align="right">
<table border="0" width="99%" align="center" cellpadding="0" cellspacing="1" class="b4" style="border-collapse: collapse">
<tr>
<td height="23" class="a1"> 景 点 导 航</td>
</tr>
<!--景点导航-->
<tr>
<td bgcolor="#F6F9FB">
<table width="540" border="0" cellspacing="0" cellpadding="0" align="center">
<!--景点导航-->
<tr>
<td bgcolor="#F6F9FB">
<!--#include file="scenna.asp"--></td>
</tr>
<!--景点导航-->
</table>
</td>
</tr>
<!--景点导航-->
<tr>
<td height="23" class="a1"> 景 点 列 表</td>
</tr>
<tr>
<td valign="top">
<table width="100%" border="1" align="center" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" bordercolor="#f0f0f0" style="border-collapse: collapse">
<%
const MaxPerPage=20 '单独页最大记录数 const 用来申明常量
dim totalPut
dim CurrentPage
dim TotalPages
dim i
if not Rs.eof then
Rs.MoveFirst
end if
Rs.pagesize=MaxPerPage
If trim(Request("Page"))<>"" then
CurrentPage= CLng(request("Page"))
If CurrentPage> Rs.PageCount then
CurrentPage = Rs.PageCount
End If
Else
CurrentPage= 1
End If
totalPut=Rs.recordcount
if CurrentPage<>1 then
if (currentPage-1)*MaxPerPage<totalPut then
Rs.move(currentPage-1)*MaxPerPage
dim bookmark
bookmark=Rs.bookmark
end if
end if
dim n,k
if (totalPut mod MaxPerPage)=0 then
n= totalPut \ MaxPerPage
else
n= totalPut \ MaxPerPage + 1
end if
If Not Rs.Eof Then
i=0
Do While Not Rs.Eof and i<maxperpage
if request("SearchType")="文章" then%>
<tr><td height=25 width=5%>
<img src=img/4.gif border=0> </td><td height=25 width=58%> <a Title='文章名称:<%=rs("art_title")%>
发表时间:<%=rs("art_date")%>
阅读次数:<%=rs("art_count")%>次' href="showweb.asp?art_id=<%=rs("art_id")%>&cat_id=<%=rs("cat_id")%>" target="_parent"><%=rs("art_title")%></a></td><td align=center width=10%><%=rs("art_count")%></td><td width=25%> <%=rs("art_date")%></td></tr>
<%else
Response.Write "<script>alert('非法操作,参数错误 !');window.close();</script>"
response.end
End if
Rs.MoveNext
i=i+1
Loop
%>
<tr><td align=middle height="60" colSpan=4>
<center>
<%
Response.Write "该地区有<font color='#FF0000'>"&totalPut&"</font>条景点信息。<br>"
k=currentPage
if k<>1 then
response.write "[<b>"+"<a href='Scen.asp?keyWord="&keyWord&"&SearchType="&SearchType&"&page=1'>首页</a></b>] "
response.write "[<b>"+"<a href='Scen.asp?keyWord="&keyWord&"&SearchType="&SearchType&"&page="&cstr(k-1)&"'>上一页</a></b>] "
else
Response.Write "[首页] [上一页]"
end if
if k<>n then
response.write "[<b>"+"<a href='Scen.asp?keyWord="&keyWord&"&SearchType="&SearchType&"&page="&cstr(k+1)&"'>下一页</a></b>] "
response.write "[<b>"+"<a href='Scen.asp?keyWord="&keyWord&"&SearchType="&SearchType&"&page="&cstr(n)&"'>尾页</a></b>] "
else
Response.Write "[下一页] [尾页]"
end if
Response.Write " 页次:<font color='#ff0000'>"¤tpage&"</font>/"&n&"页 20条信息/页"
%>
转到:
<select name="select" onchange="javascript:window.location='Scen.asp?keyWord=<%=keyWord%>&SearchType=<%=SearchType%>&page='+this.options[this.selectedIndex].value;">
<option>跳转</option>
<%
Dim z
For z=1 To n%>
<option value="<%=z%>">第<%=z%>页</option>
<%
Next
%>
</select>
</div></td>
</tr></table><BR>
<%Else%>
<tr><td align=middle height="60" colSpan=4>
<center><%if request("keyword")<>"" then%>该地区尚未录入景点介绍,请给管理员<a href="book.asp" target="_blank">留言</a>,谢谢!<%end if%></center></td></td></tr>
</TD></TR></TABLE><BR>
<%End If
Rs.Close%>
</TD></TR></table><BR></TD></TR></table>
<%
set rs=nothing
call footer()%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -