photo_modifyfile.asp
来自「这是一个学生毕业时做的教务系统」· ASP 代码 · 共 132 行
ASP
132 行
<!--#include file=include/conn.asp -->
<%
IF not(Session("KEY")="super" or Session("KEY")="input") THEN
response.redirect "login.asp"
response.end
END IF
%>
<%
dim key
if trim(Request.QueryString("key"))<>"" then
key=trim(Request.QueryString("key"))
end if
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
a { font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none; color: <%=fontcolor%>; text-decoration: none}
a:hover { font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none; color: <%=fontcolor%>; text-decoration: underline}
td { font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none; color: <%=fontcolor%>}
br { font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none; color: <%=fontcolor%>}
.bk { font-size: 9pt; border: 1px solid #CCCCCC<%=xcolor%> solid}
body { font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none}
.an { font-family: "宋体"; font-size: 9pt; background-color: <%=bgcolor%>; border: 1px <%=xcolor%> solid; color: <%=fontcolor%>}
.xzy { border: <%=xcolor%> solid; border-width: 0px 1px 1px}
.zx { border: <%=xcolor%> solid; border-width: 0px 0px 1px 1px}
.sxz { border: <%=xcolor%> solid; border-width: 1px 0px 1px 1px}
.s { border: <%=xcolor%>; border-style: solid; border-top-width: 1px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px}
.y { border: <%=xcolor%>; border-style: solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 0px}
.font { font-family: "Arial Black"; font-size: 14pt; color: <%=fontcolor%>}
.x { border: <%=xcolor%>; border-style: solid; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px}
.z { border: <%=xcolor%>; border-style: solid; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 1px}
.sx { border: <%=xcolor%>; border-style: solid; border-top-width: 1px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px}
.bk1 {
border: 1px solid #CCCCCC;
}
-->
</style>
<link href="admin/news.css" rel="stylesheet" type="text/css">
</head>
<body text="#000000">
<table width="600" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td>
<%
Response.Write"<table width='100%' border='0' cellspacing='0' cellpadding='5'>"
Dim ipagecount
Dim ipagecurrent
Dim strorderBy
Dim irecordsshown
if request.querystring("page")="" then
ipagecurrent=1
else
ipagecurrent=cint(request.querystring("page"))
end if
if key<>"" then
sql = "SELECT minipic,ck,name,id FROM photo_show where name like '%"&key&"%' ORDER BY id DESC"
else
sql = "SELECT minipic,ck,name,id FROM photo_show ORDER BY id DESC"
end if
Set rs = Server.CreateObject("ADODB.Recordset")
rs.pagesize = 9
rs.cachesize = 9
rs.open sql,conn,1,1
ipagecount = rs.pagecount
If ipagecurrent > ipagecount Then ipagecurrent = ipagecount
If ipagecurrent < 1 Then ipagecurrent = 1
if ipagecount=0 then
response.write "<tr><td align='center'>没有任何文件</tr></td>"
else
rs.absolutepage = ipagecurrent
irecordsshown = 0
do while irecordsshown<9 and NOT rs.EOF
Response.Write"<tr align='center'>"
for i=1 to 3
Response.Write"<td width='33%'>"
if not rs.eof then
Response.Write"<table align=center bgcolor='#ffffff' border=0 cellpadding=5 cellspacing=0 class='bk1'><tbody><td><img src='"&rs("minipic")&"' border='0' width=151 height=104 class='bk'></td></tbody></table><br>"&rs("name")&" [<a class=bai1 href='../admin/photo_savefile2.asp?id="&rs("id")&"&cz=del'>删除</a>|<a class=bai1 href='../admin/photo_addfile.asp?id="&rs("id")&"&cz=editfile'>编辑</a>]</td>"
irecordsshown = irecordsshown +1
rs.movenext
end if
next
Response.Write"</tr>"
loop
end if
rs.Close
set rs=nothing
Response.Write"</table>"
Response.Write"<table width='100%' border='0' cellspacing='0' cellpadding='5' class='s'><form name='form1' method='get' action='photo_modifyfile.asp'><tr><td height='20' align='center'>每页显示 9 个文件 共有 "&ipagecount&" 页 当前为第 "&ipagecurrent&" 页 "
if ipagecurrent=1 then
Response.Write"首页 | "
else
Response.Write"<a class=bai1 href='photo_modifyfile.asp?key="&key&"&page=1'>首页</a> | "
end if
if ipagecurrent=1 then
Response.Write"上一页 | "
else
Response.Write"<a class=bai1 href='photo_modifyfile.asp?key="&key&"&page="&ipagecurrent-1&"'>上一页</a> | "
end if
if ipagecount>ipagecurrent then
Response.Write"<a class=bai1 href='photo_modifyfile.asp?key="&key&"&page="&ipagecurrent+1&"'>下一页</a> "
else
Response.Write"下一页"
end if
if ipagecount>ipagecurrent then
Response.Write"| <a class=bai1 href='photo_modifyfile.asp?key="&key&"&page="&ipagecount&"'>末页</a> "
else
Response.Write"| 末页 | "
end if
%>
<br>
<%
Response.Write"搜索文件:<input type='text' name='key' size='15' class='an'> <input type='submit' name='Submit' value='确定' class='an'></td></tr></form></table>"
%>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?