📄 modi_acc.asp
字号:
<%@ Language=VBScript %>
<!--#include file="../../include/memconn.asp"-->
<%
id=Request.QueryString("id")
action=Request.QueryString("action")
set rs=server.CreateObject("adodb.recordset")
if action="buy" then
sql1="select mem_account from mem_buy where mem_id="&id&""
else
sql1="select mem_account from mem_sell where mem_id="&id&""
end if
rs.Open sql1,conn,1,1
if rs.EOF then
Response.Write "用户不存在。"
else
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<style type="text/css">
<!--
body,p,td,input {font-family:宋体;font-size:14.8px}
.head {font-family:宋体;font-size:14pt}
-->
</style>
</HEAD>
<BODY bgcolor="#FFFFFF">
<p> </p>
<form action="" method="post">
<table width="500" border="1" cellspacing="0" cellpadding="0" align="center">
<tr align="center">
<td height="30" colspan="2"><b class="head">修改用户信息</b></td>
</tr>
<tr>
<td height="30" width="95" align="right">用户名: </td>
<td height="30" width="399">
<input type="text" name="account" size="30" value="<%=rs("mem_account")%>">
</td>
</tr>
<tr>
<td height="30" width="95" align="right">口令: </td>
<td height="30" width="399">
<input type="text" name="password" size="30">
</td>
</tr>
<tr align="center">
<td height="30" colspan="2">
<input type="submit" name="Submit" value=" 修 改 ">
<input type="reset" name="Reset" value=" 取 消 ">
</td>
</tr>
</table>
</form>
</BODY>
</HTML>
<%
set rs=nothing
end if
%>
<%
if Request.ServerVariables("REQUEST_METHOD")="POST" then
action=Request.QueryString("action")
id=Request.QueryString("id")
account=Request.Form("account")
password=Request.Form("password")
call addto(action,id,account,password)
call conn_end
end if
' ----------- addto 函数(添加用户) -----------
function addto(action,id,account,password)
if action="buy" then
sql="update mem_buy set mem_account='"&account&"',mem_password='"&password&"'"
sql=sql&" where mem_id="&id&""
else
sql="update mem_sell set mem_account='"&account&"',mem_password='"&password&"'"
sql=sql&" where mem_id="&id&""
end if
conn.execute(sql)
if conn.errors.count=0 then
%>
<SCRIPT LANGUAGE=javascript>
<!--
alert("用户信息已修改,请记好用户名和口令。")
history.go(-2)
//-->
</SCRIPT>
<%
else
%>
<SCRIPT LANGUAGE=javascript>
<!--
alert("因发生系统错误,操作不能完成,请与管理员联系。")
history.go(-1)
//-->
</SCRIPT>
<%
end if
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -