📄 pic_body.asp
字号:
<%sub pic_body()%>
<TABLE bgcolor="#000000" align=center border=1 cellPadding=0 cellSpacing=0 width=760 borderColor="<%=border%>" frame=vsides rules=none>
<TBODY>
<TR>
<td height="24" align="right">
<%sql="select * from piccat"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
if request.querystring("piccat_id")<>Cstr(rs("piccat_id")) then%>
<img src=img/none.gif border=0><img src=img/link2.gif border='0'> <a href="pic.asp?piccat_id=<%=rs("piccat_id")%>"><%=rs("piccat_name")%></a>
<%else%> <img src=img/none.gif border=0><img src=img/link2.gif border='0'> <font color="#0066ff"><%=rs("piccat_name")%></font>
<%end if
rs.movenext
loop
if rs.eof and rs.bof then%>
当前还没有照片分类
<%end if
dim totalpic,Currentpage,totalpages,i
sql="select * from pic order by pic_id DESC"
if request.querystring("piccat_id")<>"" then
sql="select * from pic where piccat_id="&request.querystring("piccat_id")&" order by pic_id DESC"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
totalcs=rs.recordcount%>
</TD>
</TR>
<TR>
<TD width="760" background="img/menu_bg2.gif" height="4"></TD>
</TR>
</TBODY>
</TABLE>
<TABLE align=center border=1 cellPadding=0 cellSpacing=0 width=760 borderColor="<%=border%>" frame=vsides rules=none>
<TBODY>
<TR>
<td width=553 align=left vAlign=top bgcolor="#000000"><%call br%>
<table width='530' height="25" border='0' align="center" cellpadding='3' cellspacing='0' background="img/mainbg.gif">
<tr>
<td> <img src="img/biao.gif" align="absmiddle"> 当前共有<span><%=totalcs%></span>个照片</td>
</tr>
</table>
<table width="530" border="0" cellpadding="1" cellspacing="0" align="center">
<tr>
<%
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 align="center" valign="middle">
<table border='0' cellpadding='0' cellspacing='5'><tr><td align='center' width='135'><table border='0' cellspacing='0' cellpadding='0' align='center'><tr><td height='10'><img src='img/bg_0ltop.gif' width='10' height='10'></td><td height='10' background='img/bg_01.gif'></td><td height='10'><img src='img/bg_0rtop.gif' width='10' height='10'></td></tr><tr><td width=10 background=img/bg_03.gif> </td><td align='center' valign='middle' bgcolor='#0000'>
<a href="javascript:openwin('repic.asp?pic_id=<%=rs("pic_id")%>')">
<img src="<%=rs("pic_pic")%>" border="0" width="100" height="125" border="0" title="图片名称:<%=rs("pic_name")%><br>点击次数:<%=rs("pic_count")%>次"></a>
</td><td width='10' background='img/bg_04.gif'> </td></tr><tr><td height='10'><img src='img/bg_0lbottom.gif' width='10' height='10'></td><td height='10' background='img/bg_02.gif'></td><td height='10'><img src='img/bg_0rbottom.gif' width='10' height='10'></td></tr></table>
</td></tr></table>
</td>
<%
i=i+1
if i mod 4 = 0 then%>
</tr><tr>
<%
end if
rs.movenext
loop
else
if rs.eof and rs.bof then
%>
<table width="530" border="0" cellspacing="0" cellpadding="10" align="center">
<tr>
<td bgcolor="#000000" colspan="2" height="22" align="center">当前没有照片!</td>
</tr>
</table>
<%end if%></table>
<%end if
if not request("type")=1 then%>
<form name="form1" method="post" action="pic.asp?cscat_id=<%=request.querystring("piccat_id")%>">
<TABLE cellSpacing=1 cellPadding=0 width="530" align=center border=0 bgcolor="#999999">
<TBODY>
<TR>
<TD align=middle width="35%" height=25 bgcolor="#333333"><IMG height=14 src="img/cha.gif" width=14 align=absMiddle> 共[<font color="#FF6666"><%=totalcs%></font>]个作品 分[<font color="#FF6666"><%=totalpages%></font>]页</TD>
<TD width="40%" align=middle bgcolor="#333333"><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?page=1&piccat_id="&request.querystring("piccat_id")&">首页</a> "
response.write "<a href=pic.asp?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?page="&CurrentPage+1&"&piccat_id="&request.querystring("piccat_id")
response.write ">下一页</a> <a href=pic.asp?page="&totalpages&"&piccat_id="&request.querystring("piccat_id")&">尾页</a>"
end if
%>
<IMG height=11 src="img/gt.gif" width=11 align=absMiddle></TD>
<TD align=middle width="25%" bgcolor="#333333">
<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="轉向" class="button"> </TD>
</TR>
</FORM>
</TABLE>
<%end if%>
<%call br%><%call br%>
</td>
</TD>
<td width=1 height="190" background="img/xu.gif"></TD>
<td width=204 align=left vAlign=top background=img/left_bg2.gif>
<TABLE width=100% border=0 align=center cellPadding=0 cellSpacing=0>
<TBODY>
<TR><td width=204><img src=img/left_top2.gif usemap="#Map" border="0"><map name="Map"><area shape="rect" coords="61,11,87,24" href="book.asp?page=1" title="留言本"><area shape="rect" coords="134,11,160,24" title="帮助信息未设"></map></td></tr>
</table>
<TABLE width=196 border=0 align=right cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<td align=center height="24" background="img/title.jpg"><strong>点 击 排 行</strong></td>
</tr>
<tr><td align="left"><%call br%>
<%sql="SELECT top 10 * FROM pic ORDER by pic_count DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
%> <img src=img/none.gif border=0><img src=img/title.gif border='0'> <a href="javascript:openwin('repic.asp?pic_id=<%=rs("pic_id")%>')" title="点击次数:<%=rs("pic_count")%>次"><%=rs("pic_name")%></a><br>
<%rs.movenext
loop
if rs.eof and rs.bof then%>当前还没有照片<%end if%><%call br%></td></tr>
<TR>
<td align=center height="24" background="img/title.jpg"><strong>站 长 推 荐</strong></td>
</tr>
<tr><td align="center"><%call br%>
<%sql="SELECT top 2 * FROM pic where isbest = 1 ORDER by pic_date DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
%><table border='0' cellpadding='0' cellspacing='5'><tr><td align='center' width='135'><table border='0' cellspacing='0' cellpadding='0' align='center'><tr><td height='10'><img src='img/bg_0ltop.gif' width='10' height='10'></td><td height='10' background='img/bg_01.gif'></td><td height='10'><img src='img/bg_0rtop.gif' width='10' height='10'></td></tr><tr><td width=10 background=img/bg_03.gif> </td><td align='center' valign='middle' bgcolor='#000000'>
<a href="javascript:openwin('repic.asp?pic_id=<%=rs("pic_id")%>')">
<img src="<%=rs("pic_pic")%>" border="0" width="140" height="170" border="0" title="图片名称:<%=rs("pic_name")%><br>点击次数:<%=rs("pic_count")%>次"></a>
</td><td width='10' background='img/bg_04.gif'> </td></tr><tr><td height='10'><img src='img/bg_0lbottom.gif' width='10' height='10'></td><td height='10' background='img/bg_02.gif'></td><td height='10'><img src='img/bg_0rbottom.gif' width='10' height='10'></td></tr></table>
</td></tr></table><%call br%>
<%rs.movenext
loop
if rs.eof and rs.bof then%>当前还没有照片<%end if%>
</td></tr>
</table>
</td>
</tr>
</table>
<%
rs.close
set rs=nothing
end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -