modify.asp

来自「蓝芒3.0A最新所有功能完整破解版」· ASP 代码 · 共 697 行 · 第 1/2 页

ASP
697
字号
<% ModuleCode="M0920" %>
<!--#include file="../../Include/Reference.asp"-->
<%
Call PrintPageHead
%>
<!--#include file="../../include/public.asp"-->
<SCRIPT language=javascript>
function changeform()
{
	if (document.add_cust.Status[0].checked)
	{
		document.add_cust.Vocation[0].selected = true;
		document.add_cust.Vocation[0].text = "请选择";
		document.add_cust.Vocation.disabled = false;

		document.add_cust.Employee[0].selected = true;
		document.add_cust.Employee[0].text = "请选择";
		document.add_cust.Employee.disabled = false;

		document.add_cust.Trade[0].selected = true;
		document.add_cust.Trade[0].text = "请选择";
		document.add_cust.Trade.disabled = false;

		document.add_cust.Fund.value = "";
		document.add_cust.Fund.disabled = false;

		document.add_cust.Range.value = "";
		document.add_cust.Range.disabled = false;

		document.add_cust.Introduce.value = "";
		document.add_cust.Introduce.disabled = false;
		
		document.add_cust.Status.value = "企业";
	}
	else
	{
		document.add_cust.Vocation[0].selected = true;
		document.add_cust.Vocation[0].text = "不用选";
		document.add_cust.Vocation.disabled = true;

		document.add_cust.Employee[0].selected = true;
		document.add_cust.Employee[0].text = "不用选";
		document.add_cust.Employee.disabled = true;

		document.add_cust.Trade[0].selected = true;
		document.add_cust.Trade[0].text = "不用选";
		document.add_cust.Trade.disabled = true;

		document.add_cust.Fund.value = "不用填";
		document.add_cust.Fund.disabled = true;

		document.add_cust.Range.value = "不用填";
		document.add_cust.Range.disabled = true;

		document.add_cust.Introduce.value = "不用填";
		document.add_cust.Introduce.disabled = true;

		document.add_cust.Status.value = "个人";
	}
}

function changeProvince()
{
	document.add_cust.Province.value=document.add_cust.AProvince.value.substring(0,document.add_cust.AProvince.value.indexOf("|"));
	document.add_cust.EProvince.value=document.add_cust.AProvince.value.substring(document.add_cust.AProvince.value.indexOf("|")+1,document.add_cust.AProvince.value.length);
}

function Check()
{
  if (document.add_cust.UserName.value == "")
  {
    alert("公司名称(中文)或者个人姓名不能为空,要填写!");
    document.add_cust.UserName.focus();
    return false;
  }

  if (document.add_cust.EUserName.value == "")
  {
    alert("公司名称(英文)或者个人姓名不能为空,要填写!");
    document.add_cust.EUserName.focus();
    return false;
  }
  
  if (document.add_cust.ChangePass.checked) {
  if (document.add_cust.UserPSW1.value.length < 5 || document.add_cust.UserPSW1.value.length > 16)
  {
    alert("密码为5-16位 a-z,A-Z,0-9 的字母数字组合!");
    document.add_cust.UserPSW1.focus();
    return false;
  }}
  
  if (document.add_cust.UserPSW2.value != document.add_cust.UserPSW1.value)
  {
    alert("请确认您两次输入的密码是一样的。");
    document.add_cust.UserPSW2.focus();
    return false;
  }
  
  
  if (document.add_cust.Email.value.indexOf("@") == -1 )
  {
    alert("请填写正确的电子邮件地址!");
    document.add_cust.Email.focus();
    return false;
  }
  
  if (document.add_cust.Country.value == "")
  {
    alert("国家中文名不能为空,请填写!");
    document.add_cust.Country.focus();
    return false;
  }

  if (document.add_cust.ECountry.value == "")
  {
    alert("国家英文名不能为空,请填写!");
    document.add_cust.ECountry.focus();
    return false;
  }
  
  if (document.add_cust.Province.value == "")
  {
    alert("省份中文名不能为空,请填写!");
    document.add_cust.Province.focus();
    return false;
  }

  if (document.add_cust.EProvince.value == "")
  {
    alert("省份英文名不能为空,请填写!");
    document.add_cust.EProvince.focus();
    return false;
  }
    
  if (document.add_cust.City.value == "")
  {
    alert("城市中文名不能为空,请填写!");
    document.add_cust.City.focus();
    return false;
  }
  
  if (document.add_cust.City.value == "")
  {
    alert("城市英文名不能为空,请填写!");
    document.add_cust.ECity.focus();
    return false;
  }
  
  if (document.add_cust.Addr.value == "")
  {
    alert("地址中文不能为空,请填写!");
    document.add_cust.Addr.focus();
    return false;
  }
  
  if (document.add_cust.EAddr.value == "")
  {
    alert("地址英文不能为空,请填写!");
    document.add_cust.EAddr.focus();
    return false;
  }
  
  if (document.add_cust.PostCode.value == "")
  {
    alert("邮政编码不能为空,请填写!");
    document.add_cust.PostCode.focus();
    return false;
  }
  
  if (document.add_cust.Tel.value == "")
  {
    alert("电话号码不能为空,请填写!");
    document.add_cust.Tel.focus();
    return false;
  }
  
  if (document.add_cust.Status.value =="企业") {
    if (document.add_cust.Vocation.value == "0")
    {
      alert("请选择所属行业!");
      document.add_cust.Vocation.focus();
      return false;
    }
    
    
    if (document.add_cust.Employee.value == "0")
    {
      alert("请选择公司的规模!");
      document.add_cust.Employee.focus();
      return false;
    }
    
    if (document.add_cust.Trade.value == "0")
    {
      alert("请选择公司的类型!");
      document.add_cust.Trade.focus();
      return false;
    }
    
    if (document.add_cust.Fund.value == "")
    {
      alert("请填写公司的注册资金!");
      document.add_cust.Fund.focus();
      return false;
    }
    
    if (document.add_cust.Range.value == "")
    {
      alert("请填写公司的主营业务!");
      document.add_cust.Range.focus();
      return false;
    }
    
    if (document.add_cust.Introduce.value == "")
    {
      alert("请选择公司的介绍!");
      document.add_cust.Introduce.focus();
      return false;
    }
   }
  
  return true;
}
</SCRIPT>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="<%=Opt_Table_BGColor%>">
        <tr> 
          <td colspan="3">
<%
	if len(request("IFOK"))>0 then
		if request("ChangePass")="Y" then
			Set ASPObj = Server.CreateObject("BlueEncrypt.Decode")
			UserPSW1=ASPObj.EncryptStr(request("UserPSW1"))
			UserPSW2=ASPObj.EncryptStr(request("UserPSW2"))
			Set ASPObj = Nothing
		else
			UserPSW1=""
			UserPSW2=""
		end if
		UserName=request("UserName")
		EUserName=request("EUserName")
		Email=request("Email")
		Country=request("Country")
		ECountry=request("ECountry")
		Province=request("Province")
		EProvince=request("EProvince")
		City=request("City")
		ECity=request("ECity")
		Addr=request("Addr")
		EAddr=request("EAddr")
		PostCode=request("PostCode")
		Tel=request("Tel")
		Fax=request("Fax")
		Web=request("Web")
		QQ=request("QQ")
		MSN=request("MSN")
		CorpUser=request("CorpUser")
		Status=request("Status")
		Vocation=request("Vocation")
		Employee=request("Employee")
		Trade=request("Trade")
		Fund=request("Fund")
		if Fund="" then
			Fund="null"
		end if
		Range=request("Range")
		Introduce=request("Introduce")
		InIP=Request.ServerVariables("REMOTE_ADDR")
		if not check_tel(Tel)=0 then
				Response.Write "<br>电话号码格式有误!"
				response.end		
		end if	
		if not check_tel(fax)=0 then
				Response.Write "<br>传真号码格式有误!"
				response.end
		end if	
		strSQL="SP_UserHandle '2',"&session("UserID")&",'"&UserPSW1&"','"&UserPSW2&"','"&UserName&"','"&EUserName&"','"&EMail&"','"&Country&"','"&ECountry&"','"&Province&"','"&EProvince&"','"&City&"','"&ECity&"','"&Addr&"','"&EAddr&"','"&PostCode&"','"&Tel&"','"&Fax&"','"&Web&"','"&Status&"','"&Vocation&"','"&Employee&"','"&Trade&"',"&Fund&",'"&Range&"','"&Introduce&"','"&InIP &"','"&QQ&"','"&MSN&"','"&CorpUser&"'"
		set rs=cn.Execute(strSQL)		
		if rs("result")="fail" then
			Response.Redirect "../../include/ErrorMsg.asp?title=会员注册&msg="&rs("msg")
		else
			Response.write "<center>&nbsp;<br><br><br><b><font color=red class='titletext'>"&rs("msg")&"</font></b>"
		end if
		rs.close
	else
		strSQL="SP_TableInfo 'T_DNS_UserInfo','UserID="&session("UserID") & "'"
		set rs=cn.Execute(strSQL)
		if not (rs.bof and rs.eof) then
%>
<font color="<%=Opt_Font_TitleColor%>" class="titletext"><strong>个人资料</strong></font>
            <table cellspacing=0  cellpadding=0 width="98%" align=left bordercolorlight=<%=Opt_Table_BGColor%> border=0>
              <tbody> 
              <tr valign=top> 
                <td> 
                  <div align=center>
                  <form name=add_cust onSubmit="return Check()"  action="" method=post>
                      <table bordercolor="<%=Opt_Table_BGColor%>" cellspacing="1"  cellpadding="3" width="100%" border="0">
                        <tbody>
                        <tr align=middle bgcolor="<%=Opt_TR_BGColor%>"> 
                          <td colspan=2>
                            下面各项都必须填写
                          </td>
                        </tr>
                        <tr> 
                          <td align=right width="20%" bgcolor=<%=Opt_TR_BGColor%>>会员编号</td>
                          <td width="80%" bgcolor=<%=Opt_TD_BGColor1%>>&nbsp;<b><font color=red><%=rs("UserID")%></font></b>
                          </td>
                        </tr>                        
                        <tr> 
                          <td align=right width="20%" bgcolor=<%=Opt_TR_BGColor%>>身份</td>
                          <td width="80%" bgcolor=<%=Opt_TD_BGColor1%>> 
						<%
						if rs("Status")="企业" then
								select1="CHECKED"
								select2=""								
						else
								select1=""
								select2="CHECKED"
						end if
						%>
                            <input name="Status" type=radio <%=select1%> value="企业" onClick=changeform()>
                            企业 
                            <input name="Status" type=radio <%=select2%> value="个人" onClick=changeform()>
                            个人 </td>
                        </tr>
                        <tr> 
                          <td align=right width="20%" 
                              bgcolor=<%=Opt_TR_BGColor%>>公司名称(中文)<br>
                            个人则填姓名</td>
                          <td width="80%" bgcolor=<%=Opt_TD_BGColor1%>> 
                            <input class="input" size=40 name=UserName value="<%=rs("UserName")%>">
                          </td>
                        </tr>
                        <tr> 
                          <td align=right width="20%" 
                              bgcolor=<%=Opt_TR_BGColor%>>公司名称(英文)<br>
                            个人则填姓名拼音 </td>
                          <td width="80%" bgcolor=<%=Opt_TD_BGColor1%>> 
                            <input class="input" size=40 name=EUserName value="<%=rs("EUserName")%>">
                          </td>
                        </tr>
          				<tr> 
          				  <td align=right  bgcolor=<%=Opt_TR_BGColor%>>公司联系人</td>
          				  <td bgcolor=<%=Opt_TD_BGColor1%>> 
          				    <input class="input" name="CorpUser" size="20" maxlength="50" value="<%=rs("CorpUser")%>">&nbsp;当选择企业时,须填写
          				  </td>
          				</tr>
                        <tr> 
                          <td align=right width="20%" bgcolor=<%=Opt_TR_BGColor%>>登录密码</td>
                          <td width="80%" bgcolor=<%=Opt_TD_BGColor1%>> 

⌨️ 快捷键说明

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