?? 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 + -