📄 pic.asp
字号:
<!--#Include File="Check_hx.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="mdb.asp"-->
<!--#include file="inc/inc.asp"-->
<!--#include file="inc/format.asp"-->
<%
start="精美图片"
dim founderr
founderr=false
if request.querystring("piccat_id")<>"" then
if not isInteger(request.querystring("piccat_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
piccat_id=request.querystring("piccat_id")
mtyid2=piccat_id
call head()
call menu()
aabb01=""
mtyid2=int(mtyid2)
aabb01=aabb01+"<table border=0 width=760 align=center bgcolor=#FFFFFF cellpadding=0 cellspacing=0 height=20 class=table-hx66s><tr><td><table border=0 align=center bgcolor=#FFFFFF width=756 cellpadding=0 cellspacing=0>"
set hx01=conn.execute("select piccat_id,piccat_name,sid from piccat order by piccat_id")
do while not hx01.eof
if hx01("sid")=0 then
if hx01("piccat_id")=mtyid2 then
hx1=hx1+"<a href=pic.asp?piccat_id="&hx01("piccat_id")&" title="&hx01("piccat_name")&"><font color=red>"&hx01("piccat_name")&"</font></a> <img src=img/menu.gif align=absmiddle border=0> "
else
hx1=hx1+"<a href=pic.asp?piccat_id="&hx01("piccat_id")&" title="&hx01("piccat_name")&">"&hx01("piccat_name")&"</a> <img src=img/menu.gif align=absmiddle border=0> "
end if
end if
if mtyid2=hx01("sid") then
hx66010=hx66010+" or piccat_id="&hx01("piccat_id") '显示页所需变量pic.asp
hx2=hx2+"<a href=pic.asp?piccat_id="&hx01("piccat_id")&" title="&hx01("piccat_name")&">"&hx01("piccat_name")&"</a> <img src=img/menu.gif align=absmiddle border=0> "
end if
if mtyid2=hx01("piccat_id") then
hx6603=hx01("sid")
if hx6603<>0 then
hxa01="select piccat_id,piccat_name,sid from piccat where sid="&hx6603&" order by piccat_id"
set hx02=conn.execute(hxa01)
do while not hx02.eof
if hx02("piccat_id")=mtyid2 then
hx5=hx5+"<a href=pic.asp?piccat_id="&hx02("piccat_id")&" title="&hx02("piccat_name")&"><font color=red>"&hx02("piccat_name")&"</font></a> <img src=img/menu.gif align=absmiddle border=0> "
else
hx5=hx5+"<a href=pic.asp?piccat_id="&hx02("piccat_id")&" title="&hx02("piccat_name")&">"&hx02("piccat_name")&"</a> <img src=img/menu.gif align=absmiddle border=0> "
end if
hx02.movenext
loop
hx02.close
set hx02=nothing
end if
end if
hx01.movenext
loop
hx01.close
set hx01=nothing
'if hx1<>"" then aabb01=aabb01+"<tr align=center><td background=img/B_bg.gif height=23><img src=img/menu.gif align=absmiddle border=0> "&hx1&" </td></tr>"
if hx2<>"" then aabb01=aabb01+"<tr align=center><td><img src=img/menu.gif align=absmiddle border=0> "&hx2&"</td></tr>"
if hx3<>"" then aabb01=aabb01+"<tr align=center><td><img src=img/menu.gif align=absmiddle border=0> "&hx3&"</td></tr>"
if hx4<>"" then aabb01=aabb01+"<tr align=center><td><img src=img/menu.gif align=absmiddle border=0> "&hx4&"</td></tr>"
if hx5<>"" then aabb01=aabb01+"<tr align=center><td><img src=img/menu.gif align=absmiddle border=0> "&hx5&"</td></tr>"
aabb01=aabb01+"</table></td></tr></table>"
response.write aabb01
dim totalpic,Currentpage,totalpages,i
sql="select pic_id,pic_name,pic_spic,pic_count,pic_url,pic_date,pic_desc from pic where passed=0 order by pic_id DESC"
if request.querystring("piccat_id")<>"" then
sql="select pic_id,pic_name,pic_spic,pic_count,pic_url,pic_date,pic_desc from pic where (piccat_id="&piccat_id&hx66010&") and passed=0 order by pic_id DESC"
elseif request("keyword")<>"" then
sql="select pic_id,pic_name,pic_spic,pic_count,pic_url,pic_date,pic_desc from pic where passed=0 and "&request("select")&" like '%"&request("keyword")&"%' order by pic_id DESC"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
totalcs=rs.recordcount%>
<table width=760 border=0 align=center cellpadding=0 cellspacing=0 bgcolor=#FFFFFF class="table-hx66s">
<TBODY>
<TR vAlign=top align=left>
<TD width=188>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 图 片 分 类</td>
</tr>
</table>
<div style="padding-top:5px;padding-bottom:5px;" class="table-right">
<table width="100%" border=0 cellspacing="0" cellpadding="0">
<tr><td height="7"> </td>
<tr><td>
<%
response.write " <font color=#FF0000>·</font> <a href=pic.asp>全部图片</a><BR>"
sql="select * from piccat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
if request("piccat_id")=cstr(rs1("piccat_id")) then
sql2 = "select * from piccat where sid="&rs1("piccat_id")&""
Set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open sql2,conn,1,1
response.write " <font color=#FF0000>· "&rs1("piccat_name")&"</a></font> (小类:"
response.write rs2.recordcount&"个)<BR>"
else
sql2 = "select * from piccat where sid="&rs1("piccat_id")&""
Set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open sql2,conn,1,1
response.write " <font color=#FF0000>·</font> <a href='?piccat_id="&rs1("piccat_id")&"'>"&rs1("piccat_name")&"</a> (小类:"
response.write rs2.recordcount&"个)<BR>"
end if
rs1.movenext
loop
rs1.close
set rs1=nothing%>
</td></tr>
<tr><td height="7"> </td>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 热 门 排 行</td>
</tr>
</table>
<table width="100%" border=0 cellspacing="0" cellpadding="0">
<%sql="SELECT top "&toppicnum&" pic_id,pic_name,pic_spic,pic_count,pic_url,pic_date FROM pic where passed=0 ORDER by pic_count DESC"
set rs3=server.createobject("adodb.recordset")
rs3.open sql,conn,1,1
do while not rs3.eof
%><tr><td width="6"></td><td height=22 class=table-xia><font color=#FF0000>·</font><a href='showpic.asp?pic_id=<%=rs3("pic_id")%>' target='_blank' Title='图片名称:<%=rs3("pic_name")%>
点击次数:<%=rs3("pic_count")%>
文件大小:<%=rs3("pic_url")%>
上传时间:<%=rs3("pic_date")%>'><%=left(rs3("pic_name"),14)%></a></td><td width="6"></td></tr>
<%rs3.movenext
loop
if rs3.eof and rs3.bof then%><div align=center><br>当前还没有图片<br><br></div><%end if%></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 站 长 推 荐</td>
</tr>
</table>
<table width="100%" border=0 cellspacing="0" cellpadding="0">
<%sql="SELECT top "&bestpic&" pic_id,pic_name,pic_spic,pic_count,pic_url,pic_date FROM pic where isbest = 1 ORDER by pic_id DESC"
set rs3=server.createobject("adodb.recordset")
rs3.open sql,conn,1,1
do while not rs3.eof
%><tr><td width="6"></td><td height=22 class=table-xia><font color=#FF0000>·</font><a href='showpic.asp?pic_id=<%=rs3("pic_id")%>' target='_blank' Title='图片名称:<%=rs3("pic_name")%>
点击次数:<%=rs3("pic_count")%>
文件大小:<%=rs3("pic_url")%>
上传时间:<%=rs3("pic_date")%>'><%=left(rs3("pic_name"),14)%></a></td><td width="6"></td></tr>
<%rs3.movenext
loop
if rs3.eof and rs3.bof then%><div align=center><br>当前还没有图片<br><br></div><%end if%></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 图 片 查 找</td>
</tr>
</table>
<form name="form2" method="post" action="pic.asp"><div align=center><input type='radio' name='select' value='pic_name' checked>名称 <input type='radio' name='select' value='pic_desc'>简介 <input type='radio' name='select' value='review'>评论<br><input type='text' name='keyword' size='15' value='搜索关键字' maxlength='50' onfocus="this.value=''" class="input"> <input type='submit' name='search' value='搜索' onmouseover="this.className='boton'" onmouseout="this.className='botoff'">
</div></form>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 本 站 声 明</td>
</tr>
</table>
<div style="LINE-HEIGHT: 180%"> 本站部分图片来自网上收集,其版权归作者本人所有,如果有任何侵犯您权益的地方,请<font color=green>联系我们</font>,我们将马上进行整理,谢谢。</div>
</TD>
<TD>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> <%if request("piccat_id")<> "" then%>本分类共有<%elseif request("keyword")<>"" then%>共搜索到<%else%>当前共有<%end if%><span><%=totalcs%></span>张图片</td>
</tr>
</table>
<table width="99%" border="1" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" style="border-collapse: collapse" class="table-left" align="right" frame=lhs><tr bgcolor="#FFFFFF">
<%
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>hx66img("<%=rs("pic_spic")%>","showpic.asp?pic_id=<%=rs("pic_id")%>","图片名称:<%=rs("pic_name")%>
点击次数:<%=rs("pic_count")%>
文件大小:<%=rs("pic_url")%>
上传时间:<%=rs("pic_date")%>");</SCRIPT></TD>
<%
i=i+1
if i mod 3 = 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("piccat_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">
<form name="form1" method="post" action="pic.asp?select=<%=request("select")%>&keyword=<%=request("keyword")%>&piccat_id=<%=request.querystring("piccat_id")%>">
<TABLE align=center border=0>
<TBODY>
<TR>
<TD align=middle width="200" height=25><IMG height=14 src="img/so.gif" width=14 align=absMiddle> 共[<font color="#FF6666"><%=totalcs%></font>]个作品 分[<font color="#FF6666"><%=totalpages%></font>]页</TD>
<TD width="200" align=middle><IMG height=11 src="img/lt.gif" width=11 align=absMiddle>
<%
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&piccat_id="&request.querystring("piccat_id")&">首页</a> "
response.write "<a href=pic.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&CurrentPage-1&"&piccat_id="&request.querystring("piccat_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&"&piccat_id="&request.querystring("piccat_id")
response.write ">下一页</a> <a href=pic.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&totalpages&"&piccat_id="&request.querystring("piccat_id")&">尾页</a>"
end if
%>
<IMG height=11 src="img/rt.gif" width=11 align=absMiddle></TD>
<TD align=middle width="150">
<select name="page" class="lanyu">
<%
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="转向" onmouseover="this.className='boton'" onmouseout="this.className='botoff'" class="botoff"></TD>
</TR></FORM></TABLE></TD></TR>
<tr align="center"><td height="10" colspan="3"></td></tr></table><br>
</td>
</TR></TBODY></TABLE>
<%
rs.close
set rs=nothing
call footer()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -