gusucode.com > asp+SQLServer网上书店系统设计(源代码+论文) > asp+SQLServer网上书店系统设计(源代码+论文)\网上书店asp+SQLServer\网上书店\admin\modify1.asp
<%@ language="vbscript"%> <%response.Expires = 0%> <!--#include file="conn.asp"--> <% if request.form("name")<>session("admin") then set rs3=server.createobject("adodb.recordset") sqltext="select * from admin where name='" & request.form("name") & "'" rs3.open sqltext,cn,1,1 if not rs3.EOF then Response.Redirect "messagebox.asp?msg=此管理员工已经存在,请选用其它帐号!" end if end if '查找数据库,检查商品是否已经存在 set rs=server.createobject("adodb.recordset") sqltext="select * from admin" rs.open sqltext,cn,3,3 '添加一个商品到数据库 rs("name")=request.form("name") rs("real_name")=request.form("realname") rs("pwd")=request.form("pwd") rs("address")=request.form("address") rs("home_phone")=request.form("home_phone") rs("mobile_phone")=request.form("mobile_phone") rs.update rs.close rs1.close %> <% set rs2=server.createobject("adodb.recordset") sqltext2="select * from admin where name='" & request.form("name") & "'" rs2.open sqltext2,cn,1,1 %> <html> <head> <title>修改成功</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <STYLE type=text/css>.main { FONT-SIZE: 12px } .main1 { FONT-SIZE: 14px } .main2 { FONT-SIZE: 16px } .main3 { FONT-SIZE: 7px } .main4 { FONT-SIZE: 10px } A:link { COLOR: #ffffff; TEXT-DECORATION: none } A:visited { COLOR: #ffffff; TEXT-DECORATION: none } A:active { COLOR: #ff0000; TEXT-DECORATION: none } A:hover { COLOR: #aa0000; TEXT-DECORATION: underline } </STYLE> </head> <body text="#000000" bgcolor="#e6e4f1"> <p align="center"><br> <br> </p> <div align="center"> <center> <TABLE cellSpacing=1 cellPadding=4 width=429 bgColor=#000000 height="144"> <TBODY> <TR vAlign=top bgColor=#8CAAE7> <TD class=main1 colSpan=2 width="415" height="10"></TD> </TR> <TR vAlign=top bgColor=#BECFF1> <TD class=main1 colSpan=2 width="415" height="32"><font color="#FF0000">修改成功--</font></TD></TR> <TR bgColor=#BECFF1> <TD class=main1 width=102 bgColor=#BECFF1 height=25 align="right"><SPAN class=main1>帐号:</SPAN></TD> <TD class=main1 width=301 height=25><%=rs2("name")%></TD></TR> <tr> <TD class=main1 width=102 bgColor=#BECFF1 height=25 align="right"><SPAN class=main1>姓各:</SPAN></TD> <TD class=main1 width=301 height=25 bgcolor="#BECFF1"><%=rs2("real_name")%></TD> </tr> <tr> <TD class=main1 width=102 bgColor=#BECFF1 height=25 align="right"><SPAN class=main1>密码:</SPAN></TD> <TD class=main1 width=301 height=25 bgcolor="#BECFF1"><%=rs2("pwd")%></TD> </tr> <tr> <TD class=main1 width=102 bgColor=#BECFF1 height=25 align="right"><SPAN class=main1>级别:</SPAN></TD> <TD class=main1 width=301 height=25 bgcolor="#BECFF1"><%=rs2("ad_level")%></TD> </tr> <tr> <TD class=main1 width=102 bgColor=#BECFF1 height=25 align="right"><SPAN class=main1>住址:</SPAN></TD> <TD class=main1 width=301 height=25 bgcolor="#BECFF1"><%=rs2("address")%></TD> </tr> <tr> <TD class=main1 width=102 bgColor=#BECFF1 height=25 align="right"><SPAN class=main1>家庭电话:</SPAN></TD> <TD class=main1 width=301 height=25 bgcolor="#BECFF1"><%=rs2("home_phone")%></TD> </tr> <tr> <TD class=main1 width=102 bgColor=#BECFF1 height=25 align="right"><SPAN class=main1>移动电话:</SPAN></TD> <TD class=main1 width=301 height=25 bgcolor="#BECFF1"><%=rs2("mobile_phone")%></TD> </tr> <TR vAlign=top bgColor=#BECFF1> <TD class=main1 colSpan=2 width="415" height="15"></TD></TR> <TR bgColor=#BECFF1> <TD class=main1 colSpan=2 width="415" height="27"> <p align="center"><input type="button" value="返回" name="B4" onclick="javascript:window.history.go(-2)"> </TD></TR> <TR bgColor=#8CAAE7> <TD class=main1 colSpan=2 width="415" height="4"></TD> </TR></TBODY></TABLE> </center> </div> </body> </html> <% response.end rs3.close rs2.close cn.close %>