?? mod_user.asp
字號:
<%response.buffer=true%>
<HTML>
<HEAD>
<TITLE><%=title%></TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link rel="stylesheet" type="text/css" href="css/index1.css">
<link rel="stylesheet" type="text/css" href="css/toolbar2.css">
<META content="Microsoft FrontPage 4.0" name=GENERATOR>
<base target="_self">
</HEAD>
<BODY background="image/A-bg.gif" leftMargin=0 topMargin=0>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 class=c width=400>
<tr>
<td width=100% height="197" align="center">
<table border="0" cellspacing="0" cellpadding="0" height="85" bgcolor="#eeeeee" width="100%">
<tr>
<td align="center">
<%
ID=trim(request.form("yourid"))
passwd=trim(request.form("passwdold"))
realname=trim(request.form("name"))
num=trim(request.form("num"))
email=trim(request.form("email"))
department=request.form("department")
yourclass=trim(request.form("yourclass"))
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("CSTUDY.mdb")
set rootrs= server.createobject("adodb.recordset")
mySQL = "SELECT * FROM user where ID=" & ID & ""
set rs=conn.execute(mySQL)
if rs("dept")<>department then
sql1= "UPDATE class Set amount=amount+1 where dept = '" & department & "'"
conn.Execute(sql1)
end if
SQL = "Update user Set passwd="
SQL = SQL & "'" & passwd & "'" & ","
SQL = SQL & "name="
SQL = SQL & "'" & realname & "'" & ","
SQL = SQL & "num="
SQL = SQL & "'" & num & "'" & ","
SQL = SQL & "email="
SQL = SQL & "'" & email& "'" & ","
SQL = SQL & "dept="
SQL = SQL & "'" & department& "'" & ","
SQL = SQL & "class="
SQL = SQL & "'" & yourclass& "'"
SQL = SQL & " where ID=" & ID
Conn.Execute SQL
rs.close
set rs=nothing
conn.Close
set conn=nothing
%>
用戶信息更改成功!!<br>
<p></p>
<a href="index.asp">返回</a>
</td>
</tr>
</table>
</td>
<td valign="middle" align="center">
</td>
</tr>
</table>
</BODY>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -