⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 to_memberedit.asp

📁 不是我做的一个留言板
💻 ASP
字号:
<!--#include file="conn.asp" -->
<!--#include file="session.asp" -->
<!--#include file="../function/md5.asp" -->
<%
web_id="../language/"&l_id
web_id=web_id&"/CHECK.ASP"
call include(web_id)


'判断EMAIL是否合法
function IsValidEmail(email)
dim names, name, i, c
IsValidEmail = true
names = Split(email, "@")
if UBound(names) <> 1 then
   IsValidEmail = false
   exit function
end if
for each name in names
   if Len(name) <= 0 then
     IsValidEmail = false
     exit function
   end if
   for i = 1 to Len(name)
     c = Lcase(Mid(name, i, 1))
     if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
       IsValidEmail = false
       exit function
     end if
   next
   if Left(name, 1) = "." or Right(name, 1) = "." then
      IsValidEmail = false
      exit function
   end if
next
if InStr(names(1), ".") <= 0 then
   IsValidEmail = false
   exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
   IsValidEmail = false
   exit function
end if
if InStr(email, "..") > 0 then
   IsValidEmail = false
end if

end function

'判断OICQ号码是否合法
Function chkoicq(oicq)
    Dim re1
    Set re1 = new RegExp
    re1.IgnoreCase = false
    re1.global = false
    re1.Pattern = "[0-9]{4,9}$"
    chkoicq = re1.Test(oicq)
End Function
'修改开始
username=session_cookie_name

dim errmsg,founderr
errmsg=""
founderr=false

realname=trim(request("realname"))
          homeaddr=trim(request("homeaddr"))

			mphone=trim(request("mphone"))
                      
	                 homephone=trim(request("homephone"))
	
	
			postcode=trim(request("postcode"))
                          
		
	                 jobaddr=trim(request("jobaddr"))
         
	
			jobphone=trim(request("jobphone"))

                      msn=trim(request("msn"))
                     
                        
	sex=trim(request("sex"))
if sex="male" then
		sex="男"
	else
		sex="女"
end if
	birthday=trim(Request.Form("birthyear"))&L_CLASS_year&trim(Request.Form("birthmonth"))&L_CLASS_month&trim(Request.Form("birthday"))&L_CLASS_day
if not isdate(birthday) then 
	birthday=""
end if               
		
if IsValidEmail(trim(request("email")))=false then
		errmsg=errmsg+"<br>"+"<li>"&L_CHECK_USER3
response.write"<Script Language='JavaScript'>window.alert('"&L_CHECK_USER3&"');</Script>"
  		founderr=true
	else
		email=trim(request("email"))
end if

if trim(request("oicq"))<>"" then
	if not isnumeric(trim(request("oicq"))) or len(trim(request("oicq")))>12 then
			errmsg=errmsg+"<br>"+"<li>"&L_CHECK_USER4
                       response.write"<Script Language='JavaScript'>window.alert('"&L_CHECK_USER4&"');</Script>"
			founderr=true
	          else
			oicq=trim(request("oicq"))
	end if
end if
                 
                website=trim(request("website"))
if left(website,7)<>"http://" and website<>"" then
		website="http://"&website
end if
               
fice=trim(request("fice"))


 if founderr=false then
      
        set rs2=server.CreateObject("adodb.recordset")
	sql2="select * from [user] where username='"&username&"' and g_id='"&session_cookie_gid&"'"
	rs2.open sql2,conn,2,3
	rs2("realname")=realname
	rs2("sex")=sex
    if birthday<>"" then
		rs2("birthday")=birthday
     end if
	rs2("mphone")=mphone
	rs2("homeaddr")=homeaddr
	rs2("homephone")=homephone
	rs2("postcode")=postcode
	rs2("jobaddr")=jobaddr
	rs2("jobphone")=jobphone
	rs2("email")=email
	rs2("oicq")=oicq
	rs2("msn")=msn
	rs2("website")=website
	rs2("fice")=fice
	rs2.update
	rs2.close
	set rs2=nothing
	errmsg=errmsg+"<br>"+"<li>"&L_CHECK_USER5
end if

log_url="memberedit.asp"
log_msg=errmsg

%>
<!--#include file="welcom.asp" -->


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -