?? modify_member.asp
字號:
<%@ Language=VBScript %>
<%
function fixQuotes(theString)
fixQuotes=Replace(theString,"'","''")
end function
DIM username,password
username=Session("username")
if username="" then
response.redirect "../syspages/error_InvalidReqest.htm"
end if
On Error Goto 0
Set con=Server.CreateObject("ADODB.Connection")
con.Open Application("DBCon_ConnectionString")
'再次檢查是否存在此用戶,并得到有效值
strSql="select yonghu,youxiao,zhuceriqi from yonghu where yonghu='"+username+"'"
Set rs1=con.Execute(strSql)
if rs1.EOF then
response.redirect "../syspages/error_nothisuser.htm"
'錯誤:沒有這個用戶
end if
'修改用戶信息
strSql="Update yonghu SET yonghu='"+fixQuotes(TRIM(username))
strSql=strSql+"',kouling='"+fixQuotes(TRIM(Request.Form("kouling")))
strSql=strSql+"',danwei='"+fixQuotes(TRIM(Request.Form("danwei")))
strSql=strSql+"',guojia='"+fixQuotes(TRIM(Request.Form("guojia")))
strSql=strSql+"',chengshi='"+fixQuotes(TRIM(Request.Form("chengshi")))
strSql=strSql+"',dizhi='"+fixQuotes(TRIM(Request.Form("dizhi")))
strSql=strSql+"',youbian='"+fixQuotes(TRIM(Request.Form("youbian")))
strSql=strSql+"',lianxiren='"+fixQuotes(TRIM(Request.Form("lianxiren")))
strSql=strSql+"',dianhua='"+fixQuotes(TRIM(Request.Form("dianhua")))
strSql=strSql+"',e_mail='"+fixQuotes(TRIM(Request.Form("e_mail")))
strSql=strSql+"',zhuye='"+fixQuotes(TRIM(Request.Form("zhuye")))
strSql=strSql+"',youxiao="+cstr(rs1("youxiao"))
strSql=strSql+" WHERE yonghu='"+Session("username")+"'"
insertnum=0
Set rs=con.Execute(strSql,insertnum)
if insertnum>0 then
'成功
response.redirect "../syspages/sys_modifysuc.htm"
else
response.redirect "../syspages/error.htm"
end if
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -