📄 pic.asp
字号:
<!--#include file="head.asp" -->
<%
sub navigation()
response.write " >> "
response.write "图片展示--"&a125_title
end sub
%>
<table border="0" cellpadding="0" cellspacing="0" width="996" height="50" bgcolor="#ffffff">
<tr>
<!--左边-->
<td width="216" valign="top" background="images/2/left_bg.gif">
<div align="center">
<%call a125_tianqi()%>
</div>
<div align="center">
<% Call a125_acticletype(15,-3,"景点分布") %>
</div>
<div align="center">
<% call a125_Search5() %>
</div>
<div align="center">
<% Call a125_otherInfo(1,8,20,"pic",0) %>
</div>
</td>
<td width="780" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="780" height="20" >
<tr>
<TD width="100%" height="20" ><IMG height=45 src="images/2/class_top2.gif" width=780></TD>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="780" height="31" background="images/pic_daohang_Bg.gif">
<tr>
<td style='FILTER: DropShadow(Color=#ffffff, OffX=1, OffY=1, Positive=1); PADDING-TOP: 2px'> <span style="letter-spacing: 3px">首页 >> <a href='pic.asp'>全部景点</a>
<%
dim founderr
founderr=false
if request.querystring("cat_id")<>"" then
if not isInteger(request.querystring("cat_id")) then
founderr=true
Response.Write "<script language=javascript>alert('参数非法');javascript:history.back();</script>"
end if
end if
if request("page")<>"" then
if not isInteger(request("page")) then
founderr=true
Response.Write "<script language=javascript>alert('参数非法');javascript:history.back();</script>"
end if
end if
if request("keyword")<>"" then
if instr(request("keyword"),"'")>0 then
founderr=true
Response.Write "<script language=javascript>alert('搜索参数非法');javascript:history.back();</script>"
end if
end if
dim keyword,cat_id,totalpic,Currentpage,totalpages,i
keyword=request("keyword")
cat_id=request("cat_id")
if request.querystring("cat_id")<>"" then
sql="select * from a125_pic where piccat_id="&request.querystring("cat_id")&" order by piccat_id desc"
set rs1=conn.execute(sql)
Response.Write ">> <a href=""pic.asp?cat_id="&rs1("piccat_id")&""">"&rs1("piccat_name")&"</a>"
rs1.close
elseif request.querystring("keyword")<>"" then
Response.Write ">> 搜索结果 关键词:"&keyword
end if
%>
</span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="780" height="160" style="border: 0px solid #CECFCE">
<tr>
<td bgcolor="#FFFFFF" width="780">
<!--主要内容开始-->
<%
sql="select id,pic_name,pic_spic,pic_count,pic_url,pic_date,pic_desc from a125_p_news order by id DESC"
if request.querystring("cat_id")<>"" then
sql="select id,pic_name,pic_spic,pic_count,pic_url,pic_date,pic_desc from a125_p_news where piccat_id="&request.querystring("cat_id")&" order by id DESC"
elseif request("keyword")<>"" then
sql="select id,pic_name,pic_spic,pic_count,pic_url,pic_date,pic_desc from a125_p_news where pic_name like '%"&keyword&"%' or pic_desc like '%"&keyword&"%' order by id DESC"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
totalcs=rs.recordcount
%>
<TABLE id=middle cellSpacing=0 cellPadding=0 align=center boder="0">
<TBODY>
<TR vAlign=top align=center>
<TD>
<table width="100%" border="1" align="center" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF" bordercolor="#f0f0f0" style="border-collapse: collapse"><tr bgcolor="#FFFFFF">
<%
dim picperpage
picperpage = 12
if not rs.eof then
rs.movefirst
rs.pagesize=picperpage
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rs.pagecount then
currentpage=rs.pagecount
end if
else
currentpage=1
end if
if currentpage<>1 then
if (currentpage-1)*picperpage<totalcs then
rs.move(currentpage-1)*picperpage
dim bookmark
bookmark=rs.bookmark
end if
end if
if (totalcs mod picperpage)=0 then
totalpages=totalcs\picperpage
else
totalpages=totalcs\picperpage+1
end if
i=0
do while not rs.eof and i<picperpage
%>
<TD style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; PADDING-TOP: 5px" align=middle><SCRIPT type=text/javascript>a125Pic("<%=rs("pic_spic")%>","picnews.asp?id=<%=rs("id")%>","图片名称:<%=rs("pic_name")%>
点击次数:<%=rs("pic_count")%>
文件大小:<%=rs("pic_url")%>
上传时间:<%=rs("pic_date")%>","<%=rs("pic_name")%>");</SCRIPT></TD>
<%
i=i+1
if i mod 4 = 0 then%>
</tr><tr bgcolor="#FFFFFF">
<%
end if
rs.movenext
loop
else
if rs.eof and rs.bof then
%>
<td align=middle height="60" colSpan=3><%if request("cat_id")<> "" then%>该分类暂时没有图片<%elseif request("keyword")<>"" then%>没有找到包含[<b><font color=red><%=request("keyword")%></font></b>]的图片!<%else%>没有任何图片,请管理员到后台添加!<%end if%></td>
<%end if
end if%>
</tr><tr bgcolor="#ffffff"><td height="10" colspan="3"></td></tr><tr bgcolor="#FFFFFF"><TD colspan="3">
<TABLE align=center border=0>
<form name="form1" method="post" action="pic.asp?select=<%=request("select")%>&keyword=<%=request("keyword")%>&cat_id=<%=request.querystring("cat_id")%>">
<TR>
<TD align=middle width="37%" height=25> 共[<font color="#FF6666"><%=totalcs%></font>]个作品 分[<font color="#FF6666"><%=totalpages%></font>]页</TD>
<TD width="40%" align=middle>
<%
if CurrentPage<2 then
response.write "<font color='999966'>首页 上一页</font> "
else
response.write "<a href=pic.asp?select="&request("select")&"&keyword="&request("keyword")&"&page=1&cat_id="&request.querystring("cat_id")&">首页</a> "
response.write "<a href=pic.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&CurrentPage-1&"&cat_id="&request.querystring("cat_id")&">上一页</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href=pic.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&CurrentPage+1&"&cat_id="&request.querystring("cat_id")
response.write ">下一页</a> <a href=pic.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&totalpages&"&cat_id="&request.querystring("cat_id")&">尾页</a>"
end if
%>
</TD>
<TD align=middle width="23%">
<select name="page">
<%
i=1
for i=1 to totalpages
if i=currentpage then
%>
<option value=<%=i%> selected>第<%=i%>页</option>
<%else%>
<option value=<%=i%>>第<%=i%>页</option>
<%end if
next%>
</select><input type="submit" name="Submit2" value="转 向"> </TD>
</TR>
</FORM>
</TABLE>
</TD>
</TR>
<tr align="center"><td height="1" colspan="3"></td></tr></table><br>
</td>
</TBODY></TABLE>
<%
rs.close
set rs=nothing
%>
<!--主要内容结束-->
</td>
</tr>
</table>
</td>
<!--网站右边-->
</tr></table>
<!--#include file="foot.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -