|
楼主 |
发表于 2008-6-30 15:30:56
|
显示全部楼层
谢linhaidate。
以我的问题为例:比如“经典图片”,它对应一个文件pic.asp,我用记事本打开此文件,代码如下:
%>
<!--#include file="inc/St_conn.asp"-->
<!--#include file="admin/config.asp"-->
<!--#include file="inc/St_sysbody.asp"-->
<!--#include file="inc/St_syssub.asp"-->
<!--#include file="inc/St_function.asp"-->
<%
sql="select * from St_pic where pass=true and date=#"&date()&"#"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
one=rs.recordcount
title=""&shotanpic&""
loadhead
response.write"<table border='0' cellspacing='0' cellpadding='0' align='center' class='dabg'><tr><td class='left'></td><td class='width' valign='top'><table width='100%' border='0' cellspacing='0' cellpadding='0'><td valign=top>"& vbCrLf
st_replace "st_login",""&st_login&""
st_replace "st_search",""&st_search&""
st_replace "st_pictaxis",""&st_pictaxis&""
st_replace "st_picbest",""&st_picbest&""
st_replace "st_picclassify",""&st_picclassify&""
br()
response.write"</td><td width='5'></td><td valign=top align=right>"& vbCrLf
if request("class")<>"" then
sql="select * from St_pic where class="&request("class")&" and pass=true order by id DESC"
else
sql="select * from St_pic where pass=true order by id DESC"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
totalcs=rs.recordcount
shotantop="共有图片 "&totalcs&" 张,今日更新 <font color=red>"&one&"</font> 张"
titletop ""&shotantop&"",0,2,0,"","","",0
response.write"<table cellspacing='0' cellpadding='0' border=1 bordercolor=#bcbcbc bgcolor=ffffff width=100% rules=rows frame=void id=sttable>"& vbCrLf
if not rs.bof and not rs.eof then
rs.pagesize=cint(shotanshow(3))
pages=rs.pagecount
mypage=request("page")
if mypage=""then
mypage=1
else
mypage=cint(mypage)
end if
rs.absolutepage=mypage
i=1
i2=1
end if
do while not rs.eof
response.write"<td height=120>"& vbCrLf
response.write"<table border=0 cellpadding=0 cellspacing=0><tr><td colspan=3 width=""100%"" align=center>"& vbCrLf
response.write"<table border=0 cellpadding=0 cellspacing=0 width=""100%""><tr height=4><td width=7><img src=""images/st_top_left.gif"" width=7 height=4 border=0></td><td background=""images/st_top_bg.gif"" width=""*""><img src=""images/st_top_bg.gif"" border=0 height=4></td><td width=7 align=right><img src=""images/st_top_right.gif"" border=0 width=7 height=4></td></tr></table>"& vbCrLf
response.write"</td></tr><tr><td colspan=3 width=""100%"" align=center>"& vbCrLf
response.write"<table border=0 cellpadding=0 cellspacing=0 width=""100%""><tr><td width=4 height=""100%"">"& vbCrLf
response.write"<table border=0 cellpadding=0 cellspacing=0 width=""100%"" height=""100%""><tr><td height=4><img src=""images/st_left_top.gif"" border=0 width=4></td></tr><tr><td background=""images/st_left_bg.gif""></td></tr><tr><td height=4 valign=bottom><img src=""images/st_left_end.gif"" border=0 width=4></td></tr></table></td>"& vbCrLf
response.write"<td align=center width=""*""><a href=showpic.asp?id="&rs("id")&" target=""pic"" onfocus=""this.blur()""><img src="&rs("pic")&" border=0 TITLE='图片名称:"&rs("title")&"<br>发表会员:"&rs("user")&"<br>添加时间:"&rs("date")&"<br>点击次数:"&rs("click")&"次' width=115 height=90></a></td>"& vbCrLf
response.write"<td width=4 height=""100%""><table border=0 cellpadding=0 cellspacing=0 width=""100%"" height=""100%""><tr><td height=4><img src=""images/st_right_top.gif"" border=0 width=4></td></tr><tr><td background=""images/st_right_bg.gif""></td></tr><tr><td height=4 valign=bottom><img src=""images/st_right_end.gif"" border=0 width=4></td></tr></table>"& vbCrLf
response.write"</td></tr></table></td></tr><tr><td colspan=3 width=""100%"" align=center>"& vbCrLf
response.write"<table border=0 cellpadding=0 cellspacing=0 width=""100%""><tr height=4><td width=7><img src=""images/st_end_left.gif"" width=7 height=4 border=0></td><td background=""images/st_end_bg.gif"" width=""*""><img src=""images/st_end_bg.gif"" border=0 height=4></td><td width=7 align=right><img src=""images/st_end_right.gif"" border=0 width=7 height=4></td></tr></table></td></tr></table></td>"& vbCrLf
if i=4 then
response.Write"</tr><tr>"
i=0
end if
if i2=rs.pagesize then exit do end if
i=i+1
i2=i2+1
rs.movenext
loop
if rs.eof and rs.bof then
response.write"<tr><td colspan=6 height=100 align=center><font color=red><b>暂时没有图片!</b></font></td></tr>"& vbCrLf
else
response.write"<tr class=bg><td colspan=""3"" height=25 align=center>"& vbCrLf
pginfo "图片","张"
end if
response.write"</td></tr></table>"& vbCrLf
titlebom 2
response.write"</td></tr></table></td><td class=right></td></tr></table>"& vbCrLf
rs.close
set rs=nothing
foot
%>
它关联点是哪句呀? |
|