|
是不是我的意思没有描述清楚。把这两个页的主要代码粘来吧。
wzml_manager.asp页程序如下<html>
<head>
<title>物资目录管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!-- A:link {font-style: normal; text-decoration: none; cursor: hand; color: #000000}
a.lhot2:link { color: #336699; text-decoration: none; font-size: 9pt }
.font2 { color: #800000; font-size: 11pt; font-weight: bold }
a.lhot2:active { color: #336699; text-decoration: none; font-size: 9pt }
a.lhot2:visited { color: #006699; text-decoration: none; font-size: 9pt }
a.lhot2:hover { color: #FF6600; font-size: 9pt; font-weight: none; text-decoration: underline }
A:visited {font-style: normal; text-decoration: none; color: #000000}
A:active {font-style: normal; text-decoration: none; color: #000000}
A:hover {text-decoration:underline;color:#FF6600;}
.unnamed1 { font-family: "宋体"; font-size: 12px; font-style: normal; text-decoration: none; line-height: 18px}
.title1 { font-size: 30px; line-height: 80px; font-weight: bolder; color: #6699FF; text-decoration: none; font-family: "楷体_GB2312"}
.projectname { font-family: "黑体"; font-size: 16px; font-weight: bold; line-height: normal; color: #000000; text-decoration: none}
.vicetitle { font-family: "黑体"; font-size: 16px; color: #000000; text-decoration: none; font-weight: bold}
.button { height: 21px; margin-top: 8px; margin-bottom: 8px; background-color: #99CCFF; border-style: groove}
.demo { background-color: #CCCCCC; color: #000099; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
.year { height: 18px; width: 40px; vertical-align: text-bottom}
.month { vertical-align: text-bottom; height: 18px; width: 20px}
.title12 { font-family: "宋体"; font-size: 16px; font-style: normal; color: #CC0000}
table { font-size: 9pt}
-->
</style>
</head>
<body bgcolor="#336699" background="image/tecbkgnd.gif" text="#000000">
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" height="49">
<tr>
<td height="12"><object classid="clsid 27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="760" height="125">
<param name="movie" value="flash/top.swf">
<param name="quality" value="high">
<embed src="flash/top.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="760" height="125"></embed></object></td>
</tr>
</table>
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="620" bgcolor="#CCCC33" height="22" align="left"> 您现在的位置: 首页
<marquee scrollamount=1 behavior=alternate width=20 style="position:relative;top:0px;" height="12">=>></marquee>
<font color="#0033CC">物资目录管理</font></td>
<td width="30" height="22" bgcolor="#669999"><img src="image/right.gif" width="31" height="22"></td>
</tr>
<tr valign="top">
<td colspan="2" height="355">
<table width="760" border="0" cellspacing="0" cellpadding="0" height="245">
<tr>
<td height="385" valign="top" bgcolor="#FFFFFF">
<table border="0" width="758" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center"><strong><br>
物资目录管理</strong></td>
</tr>
<tr valign="top">
<td align="center" valign="top"><form name="form1" method="post" action="wzml_manager1.asp">
物资编号
<input name="wzbh" type="text" id="wzbh">
物资名称
<input name="wzmc" type="text" id="wzmc" alt="可单独查询也可联合查询">
<input type="submit" name="Submit2" value="查询">
</form>
<a href="new_wzml.asp"> [添加新物资]</a>
<%
set rs=server.createobject("adodb.recordset"
mysql="select * from material_info1"
rs.open mysql,conn,3,3
if rs.eof then
response.write("暂无数据"
response.End
end if
page = CLng(Request("txtpage" )
RS.PageSize = 20
page = CLng(Request("txtpage" )
If page < 1 Then page = 1
If page > RS.PageCount Then page = RS.PageCount
RS.AbsolutePage = page
i= rs.pagesize*(page-1)+1
%>
<table width="747" border="0" cellpadding="2" cellspacing="1" bgcolor="#993366">
<tr bgcolor="#3399CC">
<td width="4%" height="12" align="center"><font color="#FFFF00">序号
</font></td>
<td width="16%" align="center"><font color="#FFFF00">物资编号(添加招标计划)</font></td>
<td width="18%" align="center"><font color="#FFFF00">物资名称</font></td>
<td width="29%" align="center"><font color="#FFFF00">规格型号</font></td>
<td width="4%" align="center"><font color="#FFFF00">单位</font></td>
<td width="7%" align="center"><font color="#FFFF00">修改目录</font></td>
<td width="7%" align="center"><font color="#FFFF00">删除目录
</font></td>
<td width="8%" align="center"><font color="#FFFF00">最后一次修改时间</font></td>
<td width="7%" align="center"><font color="#FFFF00">最后一次修改人</font></td>
</tr>
<br>
<%
For ipage = 1 To RS.PageSize
%>
<script language=javascript>
<!--
function sbar (st,col) { st.style.backgroundColor = '#e7e7e7'; }
function cbar (st) { st.style.backgroundColor = ''; }
// -->
</script>
<script language="JavaScript">
function del(){
if (confirm('确定删除该记录吗?'))
{
window.location.href="delete_wzml.asp?bh="+<%response.Write(rs("wzbh" )%>;
//else
//response.Redirect(wzml_manager.asp);
}
}
</script>
<tr bgcolor="#FFFFFF" onMouseOver="sbar(this)" onMouseOut="cbar(this)">
<td height="16" align="center" style="BORDER-BOTTOM: #e7e7e7 1px solid"> <%=i%> </td>
<td height="16" align="center" style="BORDER-BOTTOM: #e7e7e7 1px solid"><a href="new_zbjh.asp?bh=<%=rs("wzbh" %>"><%=rs("wzbh" %></a></td>
<td height="16" align="center" style="BORDER-BOTTOM: #e7e7e7 1px solid"> <%=rs("wzmc" %></td>
<td height="16" align="center" style="BORDER-BOTTOM: #e7e7e7 1px solid"> <%=rs("ggxh" %></td>
<td height="16" align="center" style="BORDER-BOTTOM: #e7e7e7 1px solid"> <%=rs("dw" %></td>
<td height="16" align="center" style="BORDER-BOTTOM: #e7e7e7 1px solid"><img src="image/edit.gif" width="16" height="16"><a href="edit_wzml.asp?bh=<%=rs("wzbh")%>">修改</a>
</td>
<td height="16" align="center" style="BORDER-BOTTOM: #e7e7e7 1px solid"><img src="image/del.gif" width="16" height="16"><a onClick="del();return false;" href="delete_wzml.asp?bh=<%=rs("wzbh")%>">删除</a>
</td>
<td height="16" align="center" style="BORDER-BOTTOM: #e7e7e7 1px solid"><%=rs("edit_time")%> </td>
<td height="16" align="center" style="BORDER-BOTTOM: #e7e7e7 1px solid"><%=rs("edit_user")%> </td>
</tr>
<%
rs.movenext
i=i+1
if rs.eof then exit for
next
%>
</table>
<form action="wzml_manager.asp" method="get">
<font size="2"> <%
If page = 1 Then
Response.Write " 第一页 "
Response.Write " 上一页 "
Response.Write " <a href=wzml_manager.asp?txtpage=" & (page + 1) & ">下一页</a> "
Response.Write " <a href=wzml_manager.asp?txtpage=" & RS.PageCount & ">最后一页</a> "
else
If page = RS.PageCount Then
Response.Write " <a href=wzml_manager.asp?txtpage=1>第一页</a> "
Response.Write " <a href=wzml_manager.asp?txtpage=" & (page - 1) & ">上一页</a> "
Response.Write " 下一页 "
Response.Write " 最后一页 "
else
Response.Write " <a href=wzml_manager.asp?txtpage=1>第一页</a> "
Response.Write " <a href=wzml_manager.asp?txtpage=" & (page - 1) & ">上一页</a> "
Response.Write " <a href=wzml_manager.asp?txtpage=" & (page + 1) & ">下一页</a> "
Response.Write " <a href=wzml_manager.asp?txtpage=" & RS.PageCount & ">最后一页</a> "
End If
end if
session("i")=i
%></font>
<span ><font size="2">记录数:</font></span><font size="2"><%=RS.RecordCount%></font> <span ><font size="2">当前页数/总页数:</font></span><span class="..\css\word">
</span><font color=ff0000 size="2"><%=page%></font> / <font color=0000ff size="2"><%=RS.PageCount%></font> <span class="yglz"><font size="2">转到</font></span>
<font size="2">
<input type="text" name="txtpage" value="<%=page%>" size="2" class=pc style="HEIGHT:16px; WIDTH: 25px;font-size: 9pt">
<span class="yglz">页</span></font>
<input type="submit" value="跳 转" style="height:18;WIDTH:45px;color:ffffff;background:94aad6;" id=submit1 name=submit1>
<div align="center"></div>
</form> <%
rs.close
set conn=nothing
%>
</tr>
<tr>
<td height="12"> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="760" border="0" cellspacing="0" cellpadding="0" height="62" align="center">
<tr>
<td width="760" height="62" align="center" valign="top" bgcolor="#336699">
<input name="imageField" type="image" src="image/line.gif" align="top" width="750" height="10" border="0">
<div align="center"> </div>
<p align="center"><font color="#CCCCCC">Copyright©版权所有:<font color="#FF9900">中国北车集团
</font></font> <font color="#CCCCCC"><font color="#66FFFF"> 建议采用800*600分辨率</font></font></p>
<p align="center"><font color="#FF9900"> </font> </p>
</td>
</tr>
</table>
</div>
</body>
</html>
delete_wzml.asp程序如下:
<%
set rs=server.createobject("adodb.recordset")
sql="delete from material_info1 where wzbh='"&request("bh")&"'"
rs.open sql,conn,1,1
response.Redirect"wzml_manager.asp"
rs.close
set conn=nothing
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
</body>
</html> |
|