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

📄 admin_memberedit.asp

📁 不是我做的一个留言板
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
bg_id=1
%>
<!--#include file="../main/conn.asp" -->
<!--#include file="admin_session.asp" -->
<!--#include file="../function/function.asp" -->
<!--#include file="../function/md5.asp" -->
<head>
<SCRIPT src="../js/win_js.js"></SCRIPT>
</HEAD> 
<SCRIPT>SL_open(730,470);</SCRIPT> 
<%
web_id1="../language/"
web_id=web_id1&l_id&"/USER_INFO.ASP"
call include(web_id)
web_id1="../language/"
web_id=web_id1&l_id&"/CHECK.ASP"
call include(web_id)
userid=request.QueryString("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
response.Buffer=true
response.Expires=0
username=userid
dim errmsg,founderr
errmsg=""
founderr=false
'修改个人资料
sub editbasic
			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_USER_year&trim(Request.Form("birthmonth"))&L_USER_month&trim(Request.Form("birthday"))&L_USER_day
if not isdate(birthday) then 
	birthday=""
end if

	money_=trim(request("momey"))	
if not isnumeric(money_) or money_>900000 then
 		errmsg=errmsg+"<br>"+"<li>。"&L_USER_MONEY&L_CHECK_USER1
response.write"<Script Language='JavaScript'>window.alert('"&L_USER_MONEY&L_CHECK_USER2&"');</Script>"
	founderr=true
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
                
	
	if not founderr 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
           fice=trim(request("fice"))
           zw=trim(request("zw"))
           if zw="" then
            zw="没有(NO)"
            end if
         
        rs2("momey")=money_
	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("zw")=zw
	rs2.update
	rs2.close
	set rs2=nothing
	errmsg=errmsg+"<br>"+"<li>"&L_CHECK_USER5
	end if
end sub


if request.Form("method")="sys" then
	call editsys
end if
if request.Form("method")="basic" then
	call editbasic
end if
set rs=server.CreateObject("adodb.recordset")
sql="select * from [user] where username='"&username&"' and g_id='"&session_cookie_gid&"'"
rs.open sql,conn,1,1
dim sex,birthyear,birthmonth,birthday
sex=rs("sex")
birthyear=year(rs("birthday"))
birthmonth=month(rs("birthday"))
b_day=day(rs("birthday"))
%>
<script language="JavaScript">
<!--
function checkform2(){
			
	if (document.form2.email.value.length == 0 && !document.form2.email.value.match( /^.+@.+$/ ) ) {
		alert("<%=L_CHECK_USER3%>");
		document.form2.email.focus();
		return false;
	}
	return true;
	}
//-->
</script>

<table border="1" width="100%" bgcolor=<%=top_bg_color%> bordercolor=<%=top_borderbg_color%>>
                                <tr> 
     <%                             
errmsg=request.QueryString("errmsg")
if errmsg=1 then
errmsg=userid&L_USER_UPpassOK
end if
RESPONSE.WRITE "<td colspan=2 align=center>"&L_USER_USERPASS&errmsg
RESPONSE.WRITE "</td></tr><tr><td colspan=2><p>"
%>          
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan -->
<script Language="JavaScript"><!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.pass.value == "")
  {
    alert("<%=L_CHECK_USER6%>");
    theForm.pass.focus();
    return (false);
  }

  if (theForm.pass.value.length > 20)
  {
    alert("<%=L_CHECK_USER7%>");
    theForm.pass.focus();
    return (false);
  }
  return (true);
}

//-->
</script>
<!--#include file="../js/java_check.asp" -->
<form method="POST" action="admin_pass_edit.asp" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">    <%
RESPONSE.WRITE "**"&L_USER_editpass
RESPONSE.WRITE ":<input name=id type=hidden value="&userid&">"   

⌨️ 快捷键说明

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