<!--#include file="Conn.asp" -->
<!--#include file="Comm/Site_Class.asp" -->
<!--#include file="Comm/md5.asp" -->
<%
Dim strMenu,PageTitle
strMenu = ""

Set Qsite = New Site_Class

Qsite.SiteConfig()
Qsite.GotoErrPage()

If Not instr(1,Request.ServerVariables("http_Referer"),Request.ServerVariables ("SERVER_NAME"),1)=8 Then
	Qsite.ShowMsg "请不要非法提交数据" , "Index.asp"
End If

If Qsite.ComRegClose = "1" Then
	Response.Redirect("ErrPage.asp?str="& Qsite.ComRegCloseNote)
	Response.End()
End If

Dim Rs,ComId
Dim UserName,PassWord,PassWord2,Question,Answer,Email
Dim CompanyName,CompanyIndustry,CompanyNature,CompanyFormation
Dim RegFunds,EmployeeNum,CompanyContent
Dim CompanyLocation_Province,CompanyLocation_City,CompanyLocation_County
Dim Contact,Tel,Mobile,Fax,QQ,CompanyAddr,Postcode,leaveWord,Mobile1

Dim FromIp

FromIp = Request.ServerVariables("REMOTE_ADDR")

leaveWord   =   request.Form( "CompanyName") 
Mobile1   =   request.Form( "Mobile") 

CompanyContent   =   request.Form( "CompanyContent") 

if   Instr(CompanyContent, "KTV")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 
	if   Instr(CompanyContent, "已核实")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 
		if   Instr(CompanyContent, "核实")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 
		if   Instr(CompanyContent, "已核")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 
	if   Instr(CompanyContent, "按摩")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 
	
		if   Instr(CompanyContent, "女")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 
		if   Instr(CompanyContent, "男")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 
if   Instr(leaveWord, "酒店")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 
	
if   Instr(leaveWord, "宾馆")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 
	
if   Instr(leaveWord, "龙吟")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 
if   Instr(leaveWord, "嘉澳")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 	
if   Instr(leaveWord, "蓝磨")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 	
	if   Instr(leaveWord, "大富豪")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 
	if   Instr(leaveWord, "国际")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 		
	if   Instr(leaveWord, "KTV")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 	
	if   Instr(leaveWord, "男")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 
	if   Instr(leaveWord, "女")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 
	if   Instr(leaveWord, "高级服务员")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
response.End() 
    end   if 
	
if   Instr(Mobile1, "15527008555")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 	
	
if   Instr(Mobile1, "15029295539")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 	
	
if   Instr(Mobile1, "15091196002")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 	

	if   Instr(Mobile1, "15291180551")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 	
		if   Instr(Mobile1, "15021797513")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 	
			if   Instr(Mobile1, "13816433441")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 	
				if   Instr(Mobile1, "13062768606")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 
				if   Instr(Mobile1, "13062768606")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 		
					if   Instr(Mobile1, "13636506739")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 	
					if   Instr(Mobile1, "71428288")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 	
						if   Instr(Mobile1, "15821604151")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 
						if   Instr(Mobile1, "15221543815")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 
						if   Instr(Mobile1, "2345561")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 	
						if   Instr(Mobile1, "15229297500")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 	
						if   Instr(Mobile1, "7708")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 
						if   Instr(Mobile1, "7500")> 0   then 
        response.write( "您的公司简介里含有本站不允许出现的文字，如有疑问请致电我们:0512-69937211！ ") 
		response.End() 
    end   if 		
If Request.Form <> "" Then
	UserName = LCase(Qsite.chgStr(Trim(Request.Form("UserName"))))
	PassWord = LCase(Qsite.chgStr(Trim(Request.Form("PassWord"))))
	PassWord2 = LCase(Qsite.chgStr(Trim(Request.Form("PassWord2"))))
	Email = Qsite.chgStr(Trim(Request.Form("Email")))
	
	CompanyName = Qsite.chgStr(Trim(Request.Form("CompanyName")))
	CompanyIndustry = Qsite.chgStr(Trim(Request.Form("CompanyIndustry")))
	CompanyNature = Qsite.chgStr(Trim(Request.Form("CompanyNature")))
	CompanyFormation = Qsite.chgStr(Trim(Request.Form("CompanyFormation")))
	RegFunds = Qsite.chgStr(Trim(Request.Form("RegFunds")))
	EmployeeNum = Qsite.chgStr(Trim(Request.Form("EmployeeNum")))
	CompanyLocation_Province = Qsite.chgStr(Trim(Request.Form("Province")))
	CompanyLocation_City = Qsite.chgStr(Trim(Request.Form("City")))
	CompanyLocation_County = Qsite.chgStr(Trim(Request.Form("County")))
	CompanyContent = Qsite.chgStr(Trim(Request.Form("CompanyContent")))
	
	Contact = Qsite.chgStr(Trim(Request.Form("Contact")))
	Tel = Qsite.chgStr(Trim(Request.Form("Tel")))
	Mobile = Qsite.chgStr(Trim(Request.Form("Mobile")))
	Fax = Qsite.chgStr(Trim(Request.Form("Fax")))
	QQ = Qsite.chgStr(Trim(Request.Form("QQ")))
	CompanyAddr = Qsite.chgStr(Trim(Request.Form("CompanyAddr")))
	Postcode = Qsite.chgStr(Trim(Request.Form("Postcode")))

	If Qsite.CheckUserName(UserName) = True Then
		Qsite.ShowMsg "用户名称只能是字母，数字或下划线" , ""
	End If
	If Qsite.CheckStr(UserName , Qsite.RegNoName) = True Then
		Qsite.ShowMsg "输入的用户名称含有非法字符，请返回重新输入" , ""
	End If
	If Qsite.CheckStr(PassWord , "&|<|>|\|'") = True Or Qsite.CheckStr(PassWord2 , "&|<|>|\|'") = True Then
		Qsite.ShowMsg "输入的密码含有非法字符，请返回重新输入" , ""
	End If
	If PassWord <> PassWord2 Then
		Qsite.ShowMsg "输入的两次密码不一致" , ""
	End If
	If Email = "" Or IsNull(Email) Then
		Qsite.ShowMsg "请输入邮箱地址" , ""
	End If
	If Not Qsite.IsValidEmail(Email) Then
		Qsite.ShowMsg "输入的电子信箱不正确，请返回重新输入" , ""
	End If
	
	If CompanyName = "" Or IsNull(CompanyName) Then
		Qsite.ShowMsg "请输入公司名称" , ""
	End If
	If Qsite.CheckStr(CompanyName , Qsite.RegNoName) = True Then
		Qsite.ShowMsg "输入的公司名称含有非法字符，请返回重新输入" , ""
	End If
	If CompanyIndustry = "" Or IsNull(CompanyIndustry) Then
		Qsite.ShowMsg "请选择所属行业" , ""
	End If
	If CompanyNature = "" Or IsNull(CompanyNature) Then
		Qsite.ShowMsg "请选择公司性质" , ""
	End If
	If CompanyFormation = "" Or IsNull(CompanyFormation) Then
		Qsite.ShowMsg "请输入成立时间" , ""
	End If
	If RegFunds = "" Or IsNull(RegFunds) Or Not IsNumeric(RegFunds) Then
		Qsite.ShowMsg "请输入注册资金"
	End If
	If EmployeeNum = "" Or IsNull(EmployeeNum) Then
		Qsite.ShowMsg "请选择员工人数" , ""
	End If
	If CompanyLocation_Province = "" Or IsNull(CompanyLocation_Province) Then
		Qsite.ShowMsg "请选择公司所在地" , ""
	End If
	If CompanyLocation_City = "" Or IsNull(CompanyLocation_City) Then
		Qsite.ShowMsg "请选择公司所在地" , ""
	End If
	If CompanyLocation_County = "" Or IsNull(CompanyLocation_County) Or CompanyLocation_County = "不限" Then
		Qsite.ShowMsg "请选择公司所在地" , ""
	End If
	If CompanyContent = "" Or IsNull(CompanyContent) Then
		Qsite.ShowMsg "请输入公司简介" , ""
	End If
	If Contact = "" Or IsNull(Contact) Then
		Qsite.ShowMsg "请输入联系人" , ""
	End If
	If Qsite.CheckStr(Contact , Qsite.RegNoName) = True Then
		Qsite.ShowMsg "输入的联系人含有非法字符，请返回重新输入" , ""
	End If
	If Tel <> "" And IsNull(Tel) Then
		Qsite.ShowMsg "请输入联系电话" , ""
	End If
	If Not Qsite.IsValidTel(Tel) Then
		Qsite.ShowMsg "输入的联系电话不正确，请返回重新输入" , ""
	End If
	If Mobile <> "" And Not Qsite.IsValidTel(Mobile) Then
		Qsite.ShowMsg "输入的手机号码不正确，请返回重新输入" , ""
	End If
	If Fax <> "" And Not Qsite.IsValidTel(Fax) Then
		Qsite.ShowMsg "输入的传真号码不正确，请返回重新输入" , ""
	End If
	If QQ <> "" And Not IsNumeric(QQ) Then
		Qsite.ShowMsg "输入的QQ号码不正确，请返回重新输入" , ""
	End If
	If CompanyAddr <> "" And IsNull(CompanyAddr) Then
		Qsite.ShowMsg "请输入通讯地址" , ""
	End If
	If Postcode = "" Or IsNull(Postcode) Then
		Qsite.ShowMsg "请输入邮政编码" , ""
	End If
	If Postcode <> "" And Not IsNumeric(Postcode) Then
		Qsite.ShowMsg "输入的邮政不正确，请返回重新输入" , ""
	End If
	Postcode = Replace(Postcode , "０" , "0")
	Postcode = Replace(Postcode , "１" , "1")
	Postcode = Replace(Postcode , "２" , "2")
	Postcode = Replace(Postcode , "３" , "3")
	Postcode = Replace(Postcode , "４" , "4")
	Postcode = Replace(Postcode , "５" , "5")
	Postcode = Replace(Postcode , "６" , "6")
	Postcode = Replace(Postcode , "７" , "7")
	Postcode = Replace(Postcode , "８" , "8")
	Postcode = Replace(Postcode , "９" , "9")
		
	Set Rs = server.createobject("ADODB.Recordset")
	If Not IsObject(Conn) Then ConnectionDatabase()
	
	Rs.Open "select * from CompanyTbl where UserName = '"& UserName &"'" , Conn , 1 , 1
	If Not Rs.Eof Then
		Qsite.ShowMsg "此用户名称已存在，请返回重新选择" , ""
	End If
	Rs.Close
	Rs.Open "select * from CompanyTbl where Email = '"& Email &"'" , Conn , 1 , 1
	If Not Rs.Eof Then
		Qsite.ShowMsg "此电子信箱已经注册，请返回重新输入" , ""
	End If
	Rs.Close
	
	PassWord = MD5(PassWord)
	
	Rs.Open "select * from CompanyTbl where (ComId is null)" , Conn , 3 , 2
	Rs.AddNew
	Rs("UserName") = UserName
	Rs("PassWord") = PassWord
	Rs("Email") = Email
	
	Rs("CompanyName") = CompanyName
	Rs("CompanyIndustry") = CompanyIndustry
	Rs("CompanyNature") = CompanyNature
	Rs("CompanyFormation") = CompanyFormation
	Rs("RegFunds") = RegFunds
	Rs("EmployeeNum") = EmployeeNum
	Rs("CompanyLocation_Province") = CompanyLocation_Province
	Rs("CompanyLocation_City") = CompanyLocation_City
	Rs("CompanyLocation_County") = CompanyLocation_County
	Rs("CompanyContent") = CompanyContent
	
	Rs("Contact") = Contact
	Rs("Tel") = Tel
	Rs("Mobile") = Mobile
	Rs("Fax") = Fax
	Rs("QQ") = QQ
	Rs("CompanyAddr") = CompanyAddr
	Rs("Postcode") = Postcode

	Rs("RegFromIp") = FromIp
	Rs("RegDate") = Qsite.FormatDate(Now())
	Rs("EditDate") = Qsite.FormatDate(Now())
	Rs("ThisLoginIp") = FromIp
	Rs("ThisLoginDate") = Qsite.FormatDate(Now())
	Rs("LoginQuantity") = 1
	Rs("IsLock") = "0"
	Rs("IsYear") = "0"
	Rs("IsSh") = Qsite.NewComSh
	Rs("MemberType") = 0
	Rs.Update
	If Qsite.NewComSh = "0" Then
		Session("ComId") = ""
	Else
		ComId = Rs("ComId")
		Session("ComId") = ComId
	End If
	Session("UserName") = UserName
	Session("PassWord") = PassWord
	Session("PassWord2") = PassWord2
	Session("RealName") = CompanyName
	Session("Email") = Email
	Session("IsLock") = "0"
	Session("UserType") = "Company"
	Rs.Close
	
	If Err Then
		Session("ComId") = ""
		Session("UserName") = ""
		Session("PassWord") = ""
		Session("PassWord2") = ""
		Session("RealName") = ""
		Session("Email") = ""
		Session("IsLock") = ""
		Session("UserType") = ""
		Qsite.ShowMsg "操作失败" , ""
	Else
		Response.Redirect("Company_Reg_2.asp")
		Response.End()
	End If
End If

PageTitle = Qsite.SiteName & " - 企业注册页面"
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=PageTitle%> - 胶州人才网</title>
 <meta name="keywords" content="关于胶州人才网站,胶州招聘网站,胶州人力资源,胶州人才市场,胶州找工作,胶州兼职,胶州培训,胶州职业顾问,胶州职业规划,胶州人事代理">
 <meta name="description" content="胶州人才网是胶州地区内最具影响力的人才网站之一，为企业提供一站式的人才招聘服务，帮助个人求职者与企业搭建最佳互动平台，打造胶州地区权威求职招聘网站!！">
<!--#include file="top.asp" -->
     <table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="47" background="../images/Company_Register_step1.jpg">&nbsp;</td>
      </tr>
      <tr>
        <td height="326" valign="top" background="../images/Company_Register_r4_c2.jpg">
<table width="800" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr> 
              <td width="90" align="center"><font color="#666666"><strong>会员帐号注册</strong></font></td>
              <td width="710"> 
                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0">
                  <tr height="1">
                    <td background="../images/ico_point.gif"></td>
                  </tr>
                </table></td>
            </tr>
          </table>
<form id="RegForm" name="RegForm" method="post" action="" style="margin:0" onSubmit="return CheckForm();">
			<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
				<tr>
					<td width="700">&nbsp;</td>
				</tr>
				<tr>
					<td><img src="Images/Reg_Img_01.jpg" width="196" height="26" /></td>
				</tr>
				<tr>
					<td height="35" class="td_line_col_FFFFFF">欢迎您加入！请妥善保管好您的注册信息，以免造成不必要的麻烦。</td>
				</tr>
				<tr>
					<td height="35" class="td_line_col_FFFFFF" style="line-height:25px;padding-top:10px;padding-bottom:10px;">用户名称：<%=Session("UserName")%><br />
						登录密码：<%=Session("PassWord2")%><br />
						电子信箱：<%=Session("Email")%></td>
				</tr>
<%
dim msg,jmail,adm_mail,mailyesorno,mailserver,mailname,mailpassword,sitename,CLStr
jmail="1"
adm_mail=Session("Email")
mailyesorno="1"
mailserver="smtp.189.cn"
mailname="ks189@189.cn"
mailpassword="wujun0102"
sitename="胶州人才网"
CLStr=Chr(13) & Chr(10)



 
Set msg = Server.CreateObject("JMail.Message")
msg.silent = true
msg.Logging = true
msg.Charset = "gb2312"
msg.MailServerUserName = mailname
msg.MailServerPassword = mailpassword   
msg.From = mailname
msg.FromName = sitename
msg.AddRecipient adm_mail
msg.Subject = "胶州新人才通知：("&Session("UserName")&")您已成功注册企业会员！"
msg.Body = "登录账号为："&Session("UserName")&" "&CLStr&"登录密码为："&Session("PassWord2")&""&CLStr&"请牢记此账号密码，详情您可以通过登陆胶州人才网查询！"&CLStr&"胶州人才网网址：http://www.521jz.net  "
msg.Send (mailserver)
msg.close
set msg = nothing
%>
				<tr>
					<td>&nbsp;</td>
				</tr>
<%
If Qsite.NewComSh = "0" Then
%>
				<tr>
					<td height="35"><font color="#FF6600">提醒：现在您帐号还处在审核期，请等待管理员审核，审核后您可以进入管理中心发布招聘信息！</font> </td>
				</tr>
<%
Else
%>
				<tr>
					<td height="35">现在您可以 <a href="Company/Index.asp"><font color="#FF000">进入管理中心</font></a> 发布招聘信息！ </td>
				</tr>
<%
End If
%>
				<tr>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
				</tr>
			</table>
	    </form> 
</td>
      </tr>
      <tr>
        <td height="17" background="../images/Company_Register_r10_c2.jpg"></td>
      </tr>
    </table>
<table width="974" height="8" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr height="8">
        <td height="8"></td>
      </tr>
    </table>
  <!--#include file="foot.asp" -->
