📄 customer_edit.asp
字号:
<!-- #include file="admin_protect.inc" -->
<!-- #include file="../opendb.inc" -->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta Name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta Name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; chaRset=gb2312">
<title>顾客帐号资料修改</title>
</head>
<body>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open(sqlOpenDB) '打开数据库
Set Rs=Server.CreateObject("ADODB.RecordSet")
Rs.Open"Customer",Conn,1,3
%>
<%
If Request("Action")="deluser" Then
KilluserName=Request("KilluserName")
Conn.Execute "Delete From Customer Where Name='"&KilluserName&"'"
'response.Write"<Script Language=Javascript>alert('你已删除了此帐号!');"
'response.Write"Javascript:history.Go(-2)</Script>"
'url="Success.Asp"
'response.Redirect Url
Response.Redirect "Success.Asp?Success=002"
Rseponse.End
End If
%>
<p align="center"><font color="#0000FF"><b>顾客帐号资料修改</b></font></p>
<%
If Request("Action")="Edituser" Then
Password=Request.Form("Password")
Address=Request.Form("Address")
City=Request.Form("City")
Postalcode=Request.Form("Postalcode")
Country=Request.Form("Country")
Phone=Request.Form("Phone")
Fax=Request.Form("Fax")
Email=Request.Form("Email")
Conn.Execute "Update Customer Set Address='"&Address&"',Password='"&Password&"',City='"&City&"',Postalcode='"&Postalcode&"',Country='"&Country&"',Phone='"&Phone&"',Fax='"&Fax&"',Email='"&Email&"' Where Name='"&Request("EdituserName")&"'"
'response.Write"<Script Language=Javascript>alert('你已更改了此帐号!');"
'response.Write "</Script>"
'response.Write"Javascript:history.Go(-2)"
'url="Success.Asp"
'response.Redirect Url
Response.Redirect "Success.Asp?Success=001"
End If
%>
<%
Sql="Select * From Customer Where Name='"&Request("Searchuser")&"'"
Set Rs=Conn.Execute(Sql)
If Rs.Eof Or Rs.Bof Then
Response.Write"<Script Language=Javascript>alert('对不起,没有此帐号!');"
Response.Write"Javascript:history.Go(-1)</Script>"
End If
%>
<form method="POST" Name="form1" action="Customer_edit.asp">
<p align="center"> </p>
<div align="center">
<center>
<table border="1" cellspacing="1" width="50%" id="AutoNumber1" height="275">
<tr>
<td width="28%" height="14">顾客帐号</td>
<td width="72%" height="14"><%=Rs("Name")%></td>
</tr>
<tr>
<td width="28%" height="14">帐号密码</td>
<td width="72%" height="14">
<input type="text" Name="Password" size="20" value="<%=Rs("Password")%>"></td>
</tr>
<tr>
<td width="28%" height="22">地 址</td>
<td width="72%" height="22">
<input type="text" Name="Address" size="20" value="<%=Rs("Address")%>"></td>
</tr>
<tr>
<td width="28%" height="16">所在城市</td>
<td width="72%" height="16">
<input type="text" Name="City" size="20" value="<%=Rs("City")%>"></td>
</tr>
<tr>
<td width="28%" height="16">邮政编码</td>
<td width="72%" height="16">
<input type="text" Name="PostalCode" size="20" value="<%=Rs("PostalCode")%>"></td>
</tr>
<tr>
<td width="28%" height="17">所在国家</td>
<td width="72%" height="17">
<input type="text" Name="Country" size="20" value="<%=Rs("Country")%>"></td>
</tr>
<tr>
<td width="28%" height="16">联系电话</td>
<td width="72%" height="16">
<input type="text" Name="Phone" size="20" value="<%=Rs("Phone")%>"></td>
</tr>
<tr>
<td width="28%" height="16">FAX</td>
<td width="72%" height="16">
<input type="text" Name="Fax" size="20" value="<%=Rs("Fax")%>"></td>
</tr>
<tr>
<td width="28%" height="16">Email</td>
<td width="72%" height="16">
<input type="text" Name="Email" size="20" value="<%=Rs("Email")%>"></td>
</tr>
<tr>
<td width="100%" colspan="2" height="36">
<p align="center">
<input type="submit" Name="Submit" value="修改此帐号资料" class="Tips_bo">
<input type="hidden" Name="action" value="Edituser">
<input type="hidden" Name="EdituserName" value="<%=request("searchuser")%>">
</td>
</tr>
</table>
</center>
</div>
</form>
<form Name="deluser" method="post" action="Customer_edit.asp">
<div align="center">
<input type="hidden" Name="action" value="deluser"><input type="hidden" Name="killuserName" value="<%=request("searchuser")%>"><input type="submit" Name="Submit" value="删除此帐号" class="Tips_bo"></div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -