📄 edit.asp
字号:
<!--#include file="../Session.asp"-->
<html>
<head>
<title>信息系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/site.css" rel="stylesheet" type="text/css">
<body>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From Info Order By id DESC", conn, 3, 2
if rs.eof and rs.bof then
Response.write "<script>alert(""尚无记录,请添加!"");location.href=""Add.asp"";</script>"
Response.end
else
order=0
count=rs.RecordCount
pagesize=10
pagecount=count\(pagesize+1)+1
page=request.QueryString("page")
if page="" then
page=1
end if
%>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
<tr valign="middle">
<td height="40" align="center" class="tdstyle"><a href="../Sorry.asp"><font color="#000000" size="2"><strong>添加信息</strong></font></a><font color="#1478eb">
</font>|<font color="#1478eb"> </font><a href="InfoClass.asp"><font color="#000000"><strong>管理分类</strong></font></a></td>
</tr>
</table>
<form name="del" method="post" action="Del.asp">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
<tr valign="middle">
<td height="50" colspan="6" align="center" class="tdstyle"><font color="#000000" size="3"><strong>信息列表</strong></font></td>
</tr>
<tr valign="middle">
<td width="8%" align="center" class="tdstyle"><strong>ID</strong></td>
<td width="45%" align="center" class="tdstyle"><strong>标 题</strong></td>
<td width="15%" align="center" class="tdstyle"><strong>类别</strong></td>
<td width="16%" align="center" class="tdstyle"><strong>添加时间</strong></td>
<td width="8%" align="center" class="tdstyle"><strong>修改</strong></td>
<td width="8%" align="center" class="tdstyle"><strong>删 除</strong></td>
</tr>
<%
if not rs.eof then
rs.Move (page-1)*pagesize
i=(page-1)*pagesize
do while (not rs.eof) and (order<pagesize)
i=i+1
order=order+1
%>
<tr valign="middle">
<td align="center" class="tdstyle"><%=i%></td>
<td align="center" class="tdstyle"><a href="View.asp?id=<%=rs("id")%>" target="_blank"><%=rs("Heading")%></a></td>
<td align="center" class="tdstyle"><%=rs("Class")%></td>
<td align="center" class="tdstyle"><%=rs("Date")%></td>
<td align="center" class="tdstyle"><input name="Submit2" type="button" class="button2" value="修 改" onclick="window.location='../Sorry.asp'"></td>
<td align="center" class="tdstyle">
<input type="checkbox" name="sel<%=i%>">
<input type=hidden name=id<%=i%> value=<%=rs("id")%>></td>
</tr>
<%
rs.movenext
loop
end if
%>
<tr align="center" valign="middle">
<td colspan="6" class="tdstyle"><font color="#000000">共<%=count%>条记录/每页<%=pagesize%>条/共<%=pagecount%>页</font>
<%if page>1 then%> <a href="Edit.asp?page=1">第一页</a> <a href="Edit.asp?page=<%=page-1%>">上
页</a> <%end if%> <%if (page-pagecount)<0 then%> <a href="Edit.asp?page=<%=(page+1)%>">下
页</a> <a href="Edit.asp?page=<%=pagecount%>">最后页</a>
<%end if%> </td>
<tr align="center" valign="middle">
<td colspan="6" class="tdstyle">
<input type=hidden name=coun value=<%=i%>>
<input type="submit" class="button" value="确 定"> <input type="reset" class="button" value="重 置">
</td>
</tr>
</table>
</form>
</body>
</html>
<%end if
rs.close
set rs=nothing%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -