modifynews1.asp

来自「这是一个学生毕业时做的教务系统」· ASP 代码 · 共 109 行

ASP
109
字号
<!--#include file=conn.asp -->
<%
IF not(Session("KEY")="super" or Session("KEY")="input") THEN
response.redirect "login.asp"
response.end
END IF

page=Request.QueryString("page")
if page<=1 or page="" then page=1

set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from News order by NewsID desc"
rs.Open rs.Source,conn,1,1

rs.PageSize=50

for i=1 to rs.PageSize  *( page-1)
if not rs.EOF then
rs.MoveNext
end if
next

%>

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="copyright" content="惠州市信息产业局(bii.huizhou.gov.cn)">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href=style.css rel=stylesheet>
<link href="news.css" rel="stylesheet" type="text/css">
</head>

<body>
<br>
<table border="0" width="90%" align=center bgcolor="#000000" cellspacing="1" cellpadding="0">
<tr>
<td width="100%" bgcolor="#abb8d6" height="55" align="center"><b>修 改 新 闻</b></td>
</tr>
<tr>
<form method="POST" action="ModifyNews2.asp">
<td width="100%" height="60" align="center" bgcolor="#FFFFFF"><b>直接输入新闻ID:</b>
<input type="text" name="NewsID" size="20">
<input type="submit" value="下一步>>" >
</td>
</form>
</tr>
<tr>
<td colspan=2 bgcolor=#abb8d6 align=center height=25>其他页(当前第<%=page%>页):
<%
for i=1 to rs.PageCount
Response.Write "<a href=ModifyNews1.asp?Page=" & i & "><font color=000000>" & i &  "</font></a>  "
next
%>
</td>
</tr>
<tr>
<td colspan=2 bgcolor=#abb8d6 align=center height=25>
<table width="100%" border="0" cellspacing="1" cellpadding="0" height="25">
<tr align="center" bgcolor="#FFFFFF">
<td width="6%">ID号</td>
<td width="62%">标 &nbsp;&nbsp;&nbsp;题</td>
<td width="20%">日&nbsp;&nbsp;&nbsp;期</td>
<td width="6%">编码</td>
<td width="6%">执行</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#abb8d6">
<table border="0" cellspacing="1" width="100%" cellpadding="0">
<%
for i=1 to rs.PageSize
if not rs.EOF then
TrString="<form method=""POST"" action=""ModifyNews2.asp""><input type=hidden name=NewsID value=" & rs("NewsID") & ">" & "<tr bgcolor=ffffff><td width=6% align=center >" & rs("NewsID") & "</td>" & "<td width=62% >&nbsp;<a class=bai1 href='../ReadNews.asp?NewsID=" & rs("NewsID") & "&BigClassName="& rs("BigClassName") &"&SmallClassName=" & rs("SmallClassName") & "&SpecialID=" & rs("SpecialId") & "' target=_blank>"& trim(rs("Title")) & "</a></td>" & "<td width=20% align=center >" & rs("UpdateTime") & "</td>" & "<td width=6% align=center >" & trim(rs("EnCode")) &"</td>" & "<td width=6% align=center ><input type=submit value=""修改"" style=""border-style: double; border-color: #99CC00""></td>" & "</form>"

Response.Write TrString

rs.MoveNext
end if
next
%>

</table>
</td>
<tr>
<td colspan=2 bgcolor=#abb8d6 align=center height=25>其他页(当前第<%=page%>页):
<%
for i=1 to rs.PageCount
Response.Write "<a class=bai1 href=ModifyNews1.asp?Page=" & i & "><font color=000000>" & i &  "</font></a>  "
next
%>
</td>
</tr>	

</table>
</body>

</html>
<%
rs.Close
set rs=nothing

conn.close
set conn=nothing

%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?