📄 register.asp
字号:
<!--#include file="../../Include/Reference.asp"-->
<!--#include file="../../include/public.asp"-->
<!--#include file="../../Include/SendMail.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Opt_Page_Title%></title>
<link href="<%=HomeDir%>css/style.css" rel="stylesheet" type="text/css">
<style type=text/css>
<!--
BODY{
margin:0px;
FONT-SIZE: 12px;
FONT-FAMILY:"Verdana";
background-color:#FFFFFF;
}
INPUT{
BORDER-TOP-WIDTH: 1px; PADDING-RIGHT: 1px; PADDING-LEFT: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE: 9pt; BORDER-LEFT-COLOR: #cccccc; BORDER-BOTTOM-WIDTH: 1px; BORDER-BOTTOM-COLOR: #cccccc; PADDING-BOTTOM: 1px; BORDER-TOP-COLOR: #cccccc; PADDING-TOP: 1px; HEIGHT: 20px; BORDER-RIGHT-WIDTH: 1px; BORDER-RIGHT-COLOR: #cccccc
}
-->
</style>
<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.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>
</head>
<body background="<%=HomeDir%>Images/bg.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="../../Head.asp"-->
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="760" height="1" align="center">
<tr>
<td width="780" height="1">
<div align="center"><img src="<%=HomeDir%>images/userreg.gif" width="758" height="117" border="0"></div>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="760" height="528" align="center">
<tr>
<td width="780" height="1" colspan="3">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" height="1" bgcolor="#B5B2B5" colspan="2"><img border="0" src="<%=HomeDir%>images/blank_1.gif"></td>
</tr>
<tr>
<td width="100%" bgcolor="#7B7D7B" height="1" colspan="2"><img border="0" src="<%=HomeDir%>images/blank_2.gif"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="136" height="545" background="<%=HomeDir%>images/bg_l.gif" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="122">
<tr>
<td width="100%" height="104" valign="top">
<p align="center"><img src="<%=HomeDir%>images/ureg.gif" width="134" height="85">
</td>
</tr>
<tr>
<td width="100%" height="18"></td>
</tr>
</table>
</td>
<td width="612" height="545" valign="top" bgcolor="#FFFFFF">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="73">
<tr>
<td width="100%" height="30">
<p style="margin-left: 20">您的位置: <a href="/">首页</a> > <a href="/aboutus">
</a>用户注册
</td>
</tr>
<tr>
<td width="100%" height="31"><%
if len(request("IFOK"))>0 then
Set ASPObj = Server.CreateObject("BlueEncrypt.Decode")
UserPSW1=ASPObj.EncryptStr(request("UserPSW1"))
UserPSW2=ASPObj.EncryptStr(request("UserPSW2"))
Set ASPObj = Nothing
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 '1',0,'"&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&"'"
'response.write strSQL
'response.end
set rs=cn.Execute(strSQL)
if Lcase(Trim(rs("result")))="fail" then
Response.Redirect "../../include/ErrorMsg.asp?title=会员注册&msg="&rs("msg")
else
Response.write "<center> <br><br><br><p class='titletext'>"&rs("msg")&" 会员编号:<b><font color=red>"&rs("UserID")&"</font></b>"
Subject="注册新用户成功! --" & Opt_System_CompanyName
MailFile = "../../Include/MailTemplate/reg.txt"
if Send_Email(Email,Subject,MailFile,"$注册人$",UserName,"$注册ID$",rs("UserID"),"$密码$",request("UserPSW1"),"","","","","","","","","","","","","","","","","","") then
Response.Write "<br>您的用户名和密码已经发入您的注册邮箱, 请查收您的邮箱"
end if
end if
rs.close
else
%>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<form name=add_cust onSubmit="return Check()" action="" method=post>
<td>
<table cellspacing=1 bordercolordark=#ffffff cellpadding=4 width="100%" border=0>
<tbody>
<tr align=middle bgcolor="#cccccc">
<td colspan=2>
<div align="center">下面各项都必须填写</div>
</td>
</tr>
<tr>
<td align=right width="31%" bgcolor=#dddddd>身份</td>
<td width="69%">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -