📄 setupdw.asp
字号:
<!--#include file="../superno.asp"-->
<!--#include file="filetou.asp"-->
<!--#include file="../../moban/fun.asp"-->
<%
sql="SELECT * FROM BMlist order by id"
set rs=server.createobject("ADODB.Recordset")
rs.Open sql,conn, 1, 3
zs=rs.recordcount
sellr="<select size='1' name='BM_NAME'>"
if not rs.eof then
do while not rs.eof
sellr=sellr&" <option>"&rs("网点名")&"</option>"
rs.movenext
loop
rs.move 0,1
end if
sellr=sellr&" </select>"
call savetext("bm_name.htm",sellr)
b1=request.form("b1")
b2=request("b2")
if b1<>"" or b2<>"" then
for i=1 to zs
if b2="" then
lr=request.form("t"&i)
if lr="" then response.redirect "../ever.asp?lr=网点名不能为空"
rs("网点名")=lr
else
if rs("id")=int(b2) then
rs.delete
end if
end if
rs.update
rs.move i,1
if rs.eof then exit for
next
lr=request.form("new")
if lr<>"" then
rs.addnew
rs("网点名")=lr
rs.update
end if
rs.close
set conn=nothing
response.redirect "setupdw.asp"
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<Link Rel="STYLESHEET" Href="index.CSS" Type="text/css">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>设置部门</title>
</head>
<body bgcolor="#99CCFF">
<div align="center">
<center>
<table border="1" width="80%" bordercolorlight="#000000" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" bgcolor="#C0C0C0">
<tr>
<td width="100%" valign="top" align="center">
<table border="0" width="100%" bgcolor="#000080">
<tr>
<td width="50%"><font color="#FFFFFF"> 设置部门</font></td>
<td width="50%">
</td>
</tr>
</table>
<form method="POST">
<table border="1" width="99%" cellpadding="2" bgcolor="#D5D5D5" bordercolorlight="#60789F" bordercolordark="#D5D5D5" cellspacing="0">
<%
IF NOT RS.EOF THEN
for i=1 to zs
Response.Write " <tr>"
Response.Write " <td align='right'> </td>"
Response.Write " <td ><input type='text' name='T"&i&"' size='29' style='border: 1 solid #219FD6' value='"&rs("网点名")&"'></td>"
Response.Write " <td ><a href='?b2="&rs("id")&"'>删除</a> <a href='setupdw2.asp?id="&rs("id")&"'>设置</a></td>"
Response.Write " </tr>"
rs.movenext
next
ELSE
Response.Write "<TR><TD> </TD><TD>还没有设置任何单位</TD><TD> </TD></TR>"
END IF
rs.close
set conn=nothing
%>
<tr>
<td width="79" align="right">新增:</td>
<td width="215"><input type="text" name="new" size="29" style="border: 1 solid #219FD6"></td>
<td width="291"> </td>
</tr>
<tr>
<td align="center"> </td>
<td align="center"><input type="submit" value="提交" name="B1"></td>
<td align="center"> </td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -