急!快来人帮帮忙!一个更新的问题!
现在一点头绪都没有,希望大家耐心看看以下代码,其它的都做好了就是更新内容了,帮我写一个修改内容的代码吧,多谢了,完成后我重谢一个小时的时间了。
<!-- #include file="conn.asp"-->
<!-- #include file="virusSearch.asp"-->
<html>
<head>
<meta http-equiv="content-Type" content="text/html;charset=gb2312">
<title>::..-->>病毒防治首页<<--..::</title>
<style>
table{border-color:#99CCFF}
.td{color:#660000}
</style>
<body background="images/bg.gif">
<table align=center>
<tr>
<td align="center"><font color=#FFFF00 face="楷体_GB2312" size=5><b>--->>病毒防治/处理记录<<---</font><b></td>
</tr>
<tr>
<td align="center"><br><font color=#FFFFFF><a href="virus_edit.asp">填写</a></font></td>
</tr>
</table>
<%
Sql = "Select * From virus"
if request("from")="search" then
sql="select * from virus where (1=1) "
if request("StartDate")<>"" then
sql=sql&" and (datas>=#"&request("StartDate")&"#)"
end if
if request("EndDate")<>"" then
sql=sql&" and (datas<=#"&request("EndDate")&"#)"
end if
end if
set rs=Server.CreateObject("adodb.RecordSet")
rs.open sql,conn,1,1
zong=rs.recordcount
rs.pagesize=10
maxpage=rs.pagecount
If rs.EOF then
Response.Write "没有处理过任何病毒呢!"
Else
page=request("p")
if page="" then
page=1
end if
I = (page-1)*10
Response.Write "<table border=1 cellspacing='0' align='center' cellpadding='1'>"
%>
<tr>
<td width=40 height="30"> </td>
<td width=130 height="30" align="center"><b><font color="#FFFFFF">处理时间</font></td>
<td width=120 height="30" align="center"><b><font color="#FFFFFF">处理人员</font></td>
<td width=380 height="30" align=center>
<font color="#FFFFFF"><b>备 注</font></td>
<%if session("username")="admin" then%>
<td width=65><font color="#FFFFFF"> 删除</font></td>
<td width=65><font color="#FFFFFF"> 修改</font></td>
<% end if%>
</tr>
<%
rs.move i
while i<page*10
if not rs.eof then
Response.Write "<tr>"
Response.Write "<td align='center' class='td'>" & I+1 & "</td>"
Response.Write "<td class='td'>" & rs("datas")& "</td>"
Response.Write "<td class='td'>" & rs("ren")& "</td>"
Response.Write "<td class='td' width=280>" & rs("demo")& "</td>"
if session("username")="admin" then
response.Write "<td><font color=#ff0033><a href='delvirus.asp?id="&rs("id")&"'>删除</a></font></td>"
response.Write "<td><font color=#ff0033><a href='updatevirus.asp?id="&rs("id")&"'>修改</a></font></td>"
end if
Response.Write "</tr>"
rs.MoveNext
end if
I = I + 1
Wend
Response.Write "</table>"
End If
%>
<br><hr color="#6699CC" width="800">
<div align="center">
<center>一共有<font size="" color="#FF0000"><%=zong%></font>条记录;
<td width="431" height="22" align="center">共有 <%=maxpage%> 页 [
<%
For k=1 to maxpage
Response.Write "<a href=virus.asp?p="&k&"&s="&ShowNum&">"&k&"</a> "
Next
%>
] </td></center>
</div>
<hr color="#6699CC" width="800">
<center><!-- #include file="bottom.asp"--></center>
</body>
</html>