<!--#include file="conn/conn_index.asp"-->
<!--#include file="inc/setup.asp"-->
<!--#include file="inc/money.asp"-->
<!--#include file="inc/char.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/sql.asp"-->
<%
	End If
	action=ReplaceBadChar(Trim(Request.QueryString("action")))
	if action="save" then
		If Session("getcode")<>int(Trim(Request.Form("code"))) Then
			response.write"<SCRIPT language=JavaScript>alert('验证码输入错误');"                   
			response.write"javascript:history.go(-1)</SCRIPT>"                   
			response.end
		else
			tname=ReplaceBadChar(Trim(Request.Form("login_id")))
			pwd_old=Trim(Request.Form("password"))
			pwd=mistake(pwd_old)
			email=ReplaceBadChar(Trim(Request.Form("email")))
			train_name=ReplaceBadChar(Trim(Request.Form("school_name")))
			train_type=ReplaceBadChar(Trim(Request.Form("school_type")))
			province=ReplaceBadChar(int(Trim(Request.Form("hukouprovince"))))
			city=ReplaceBadChar(int(Trim(Request.Form("hukoucapital"))))
			address=ReplaceBadChar(Trim(Request.Form("address")))
			code=ReplaceBadChar(Trim(Request.Form("postcode")))
			weburl=ReplaceBadChar(Trim(Request.Form("site")))
			introduction=ReplaceBadChar(Trim(Request.Form("introduce")))
			subject=ReplaceBadChar(Trim(Request.Form("course_intro")))
			tea_intro=ReplaceBadChar(Trim(Request.Form("teacher_intro")))
			lx_person=ReplaceBadChar(Trim(Request.Form("linkman")))
			phone=ReplaceBadChar(Trim(Request.Form("phone")))
			fax=ReplaceBadChar(Trim(Request.Form("fax")))
			question=ReplaceBadChar(Trim(Request.Form("question")))
			if question="cus" then
				custom_question=ReplaceBadChar(Trim(Request.Form("custom_question")))
				if custom_question="" then
					response.write"<SCRIPT language=JavaScript>alert('自定义问题不能为空，请重来');"                   
					response.write"javascript:history.go(-1)</SCRIPT>"                   
					response.end
				else
					question=custom_question
				end if
			end if
			answer=ReplaceBadChar(Trim(Request.Form("answer")))
			area=ReplaceBadChar(Trim(Request.Form("hukoucity")))
			if fax="" then fax="未填写"
			if code="" then code="未填写"
			if weburl="" then weburl="未填写"
			
			Set rs = Server.CreateObject("ADODB.Recordset")
			sql="select * from train where tname='"&tname&"'"
			rs.open sql,conn,2,3
			if rs.eof then
				rs.addnew
				rs("tname")=tname
				rs("pwd")=pwd
				rs("email")=email
				rs("train_name")=train_name
				rs("train_type")=train_type
				rs("province")=province
				rs("city")=city
				rs("area")=area
				rs("address")=address
				rs("code")=code
				rs("weburl")=weburl
				rs("introduction")=introduction
				rs("subject")=subject
				rs("tea_intro")=tea_intro
				rs("lx_person")=lx_person
				rs("phone")=phone
				rs("fax")=fax
				rs("question")=question
				rs("answer")=answer
				rs("logo")="nophoto.gif"
				rs("setup")=date()
				rs("lock")=0
				rs("hideuser")=0
				rs("dlnum")=0
				rs("begintime")=date()
				rs("endtime")=date()
				rs("subject_num")=train_subject_num
				rs("zhuangtai")=train_zhuangtai
				rs.update
				rs.close
				set rs=nothing
			
				kk=conn.Execute("select id from train where tname='"&tname&"'")(0)
				
				Set rs = Server.CreateObject("ADODB.Recordset")
				sql="select * from tmailbox"
				rs.open sql,conn,2,3
				rs.addnew
				rs("reid")=kk
				rs("senduid")="0"
				rs("title")=tsmailtitle
				rs("sendname")="系统管理员"
				rs("sdate")=date()
				rs("mailtext")=tsmailtext
				rs.update
				rs.close
				set rs=nothing
								

				set fs=createobject("scripting.filesystemobject")
				MyFolder=server.mappath("html/train/"&kk&"")
				If NOT fs.folderexists(MyFolder) then
					fs.createfolder(MyFolder)
				End If
				
				Response.Cookies("train_name")=train_name
				Response.Cookies("admin_train_name")=tname
				Response.Cookies("admin_train_id")=kk
				Response.Cookies("train_name").expires=(now()+1/24)
				Response.Cookies("admin_train_name").expires=(now()+1/24)
				Response.Cookies("admin_train_id").expires=(now()+1/24)
				
				response.write"<SCRIPT language=JavaScript>alert('注册成功，现在为您转向用户中心！');"
				response.write"this.location.href='train/train_main_html.asp';</SCRIPT>"
				response.end
			else
				response.write"<SCRIPT language=JavaScript>alert('用户名重复，请重新选择一个用户名！');"
				response.write"javascript:history.go(-1)</SCRIPT>"
				response.end
			end if
			rs.close
			set rs=nothing
			conn.close
			set conn=nothing
		end if
	end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<link rel="Shortcut Icon" href="Images/favicon.ico">
<link rel="Bookmark" href="Images/favicon.ico">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<TITLE><%= homename %>--培训机构会员注册</TITLE>
<meta name="Keywords" content="<%= webmeta %>">
<meta name="Description" content="<%= webmeta1 %>">
<style type="text/css">
<!--
.STYLE6 {	color: #0099CC;
	font-size: 12pt;
	font-weight: bold;
	}
.STYLE2 {	color: #ffffff;
	font-size: 14pt;
	font-weight: bold;
}
.style193 {color: #FF6600}
.style193 {color: #FF6600}
body,td,th {
	font-size: 12px;
}
body {
	background-image: url(images/preg/indextopbackground.gif);
	background-repeat:repeat-x;
	margin-left: 0px;
	margin-top: 24px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<script language="JavaScript" src="js/check_form.js"></script>
<script language="JavaScript" src="js/opennew.js"></script>
<script language=JavaScript src="js/preg.js"></script>
<script language="JavaScript" type="text/javascript" src="js/keyfilter.js"></script>
<script language="JavaScript">
<!--
function checkMe()
{
	if(!check_form(form1)) return false;
		
	if(!form1.agree.checked)
	{
		alert("请先阅读<%= homename %>培训机构会员注册协议");
		form1.agree.focus();
		return false
	}

	return true;
}

function init()
{
}
//-->
//功能：去掉字符串前后空格
//返回值：去掉空格后的字符串
function fnRemoveBrank(strSource)
{
 return strSource.replace(/^\s*/,'').replace(/\s*$/,'');
}
function GethukouCapital(capitalid)
{
document.frames["hukoucapitalframe"].location.replace("inc/gethukoucapital.asp?capitalid="+capitalid);
}
function GethukouCity(cityid)
{
document.frames["hukoucityframe"].location.replace();
}
-->
</script>
<iframe height=0 width=0 src="" id="hukoucapitalframe"></iframe>
<iframe height=0 width=0 src="" id="hukoucityframe"></iframe>
<link href="css/preg.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE7 {color: #FF0000}
-->
</style>
</HEAD>
<BODY topMargin=0 leftmargin="0" rightmargin="0">
<!--#include file="top_reg.asp"-->
<table width="977" border="0" align="center" cellpadding="4" cellspacing="0">
  <tr>
    <td width="60" height="30" align="center">您的位置：</td>
    <td> 首页 &gt;&gt; <a href="train.asp">教育培训</a> &gt;&gt; 机构注册</td>
    <td width="120" align="center">&nbsp;</td>
  </tr>
</table>
<form action="?action=save" method="post" name="form1" id="form1" onSubmit="return checkMe()">
<%
	if treg_open=1 then
%>
<table width="977" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="9"><img src="images/treg/block_2_1.gif" width="9" height="10"></td>
        <td background="images/treg/block_2_1_bg.gif"><img src="images/treg/space.gif" width="1" height="1"></td>
        <td width="9"><img src="images/treg/block_2_2.gif" width="9" height="10"></td>
      </tr>
      <tr>
        <td background="images/treg/block_2_2_bg.gif">&nbsp;</td>
        <td valign="top" bgcolor="#EAF3D8" align="center"><table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#F9F9F9">
          <tr>
            <td width="222" bgcolor="#CFE2AA">　 公告</td>
          </tr>
          <tr valign="bottom">
            <td height="236" align="center" valign="middle"> 对不起，网站暂时停止培训机构用户注册，感谢您的支持，请稍后再试　            </td>
          </tr>
        </table></td>
        <td background="images/treg/block_2_3_bg.gif">&nbsp;</td>
      </tr>
      <tr>
        <td><img src="images/treg/block_2_3.gif" width="9" height="10"></td>
        <td background="images/treg/block_2_4_bg.gif"><img src="images/treg/space.gif" width="1" height="1"></td>
        <td><img src="images/treg/block_2_4.gif" width="9" height="10"></td>
      </tr>
    </table></td>
  </tr>
</table>
<% Else %>
<table width="977" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="9"><img src="images/treg/block_2_1.gif" width="9" height="10"></td>
        <td background="images/treg/block_2_1_bg.gif"><img src="images/treg/space.gif" width="1" height="1"></td>
        <td width="9"><img src="images/treg/block_2_2.gif" width="9" height="10"></td>
      </tr>
      <tr>
        <td background="images/treg/block_2_2_bg.gif">&nbsp;</td>
        <td valign="top" bgcolor="#EAF3D8" align="center">
		<table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#F9F9F9">
          <tr>
            <td colspan="3" bgcolor="#CFE2AA">　 用户信息</td>
          </tr>
          <tr>
            <td width="96" align="left">&nbsp;<font color="#FF0000">*</font> 用 户 名：</td>
            <td width="443" align="left"><input name="login_id" type="text" id="login_id" style="ime-mode:disabled" onKeyPress="keyFilter('1234567890abcdefghijklmnopqrstuvwxyz_')" value="" maxlength="21" check_str="用户名" check_type="string,5,"></td>
            <td width="195" align="left">(用户名请使用小写<font color="#FF0000">英文字母</font>、<font color="#FF0000">数字</font>、<font color="#FF0000">下划线_</font>及其组合，长度为5-20位)　</td>
          </tr>

          <tr>
            <td align="left">&nbsp;<font color="#FF0000">*</font> 电子邮件：</td>
            <td align="left"><input name="email" type="text" class="input" id="email" style="ime-mode:disabled" value="" size="30" check_str="电子邮件" check_type="email"></td>
            <td align="left"><span style="color:#FF0000">请输入电子邮件！</span></td>
          </tr>
          <tr>
            <td align="left">&nbsp;<font color="#FF0000">*</font> 密　　码：</td>
            <td align="left"><input name="password" type="password" class="input" id="password" check_str="密码" check_type="string,6,">
            </td>
            <td align="left">6-16位, 数字、字母或其组合</td>
          </tr>
          <tr>
            <td align="left">&nbsp;<font color="#FF0000">*</font> 确认密码：</td>
            <td align="left"><input name="password2" type="password" class="input" id="password2" check_str="确认密码" check_type="string,6," equal="password">
            </td>
            <td align="left">6-16位, 数字、字母或其组合</td>
          </tr>
          <tr>
            <td align="left">&nbsp;<font color="#FF0000">*</font> 验 证 码：</td>
            <td align="left"><input name="code" type="text" class="input" id="code" check_str="验证码" size="8" check_type="string,4,">&nbsp;&nbsp;&nbsp;<img src="GetCode.asp" vspace="2" align="absmiddle">
            </td>
            <td align="left">请正确输入验证码</td>
          </tr>
          <tr>
            <td align="left">&nbsp;<font color="#FF0000">*</font>密码提示问题：</td>
            <td align="left"><select style="width:210px;" name="question" id="question" onchange="checkQuestion()">
						<option value="">[请选择您的密码提示问题] </option>
						<option value="cus">***自定义密码提示问题***</option>
						<option value="您的家乡是?">您的家乡是?</option>
						<option value="您初中的语文老师是?">您初中的语文老师是?</option>
						<option value="您最尊重的人是?">您最尊重的人是?</option>
						<option value="您最爱吃的菜是?">您最爱吃的菜是?</option>
						<option value="您最爱读的书是?">您最爱读的书是?</option>
						<option value="您最喜欢的一首歌是?">您最喜欢的一首歌是?</option>
						<option value="您最喜欢的运动是?">您最喜欢的运动是?</option>
						<option value="您最喜欢的电影是?">您最喜欢的电影是?</option>
						<option value="您最喜欢的节日是?">您最喜欢的节日是?</option>
						<option value="您最想去的地方是?">您最想去的地方是?</option>
						<option value="您最想做的事情是?">您最想做的事情是?</option>
						<option value="您最难忘的事情是?">您最难忘的事情是?</option>
					</select></td>
            <td align="left">请选择您的密码提示问题</td>
          </tr>
			<tr  id="cus_question" style="display:none">
                   <td align="left">&nbsp;<font color="#FF0000">*</font>自定义问题：</td>
                   <td align="left"><input type="text" style="width:205px;" class="minput" name="custom_question" id="custom_question" /> <span style="FONT-SIZE: 12px; FONT-FAMILY: 宋体"><span class="STYLE7">*</span></span></td>
                   <td align="left">请输入您的密码提示问题</td>
           </tr>
          <tr>
            <td align="left">&nbsp;<font color="#FF0000">*</font>提示问题答案：</td>
            <td align="left"><input name="answer" type="text" class="input" id="answer" check_str="提示问题答案" size="30" check_type="string,1,">&nbsp;&nbsp;&nbsp;            </td>
            <td align="left">请输入您密码提示问题的答案</td>
          </tr>
          <tr>
            <td align="left">&nbsp;<font color="#FF0000">*</font>确认问题答案：</td>
            <td align="left"><input name="answer1" type="text" class="input" id="answer1" check_str="确认问题答案" size="30" check_type="string,1," equal="answer">&nbsp;&nbsp;&nbsp;            </td>
            <td align="left">请再次输入密码提示问题的答案</td>
          </tr>
          <tr>
            <td colspan="3" bgcolor="#CFE2AA">　 机构基本信息</td>
          </tr>
          <tr>
            <td align="left">&nbsp;<font color="#FF0000">*</font> 机构名称：</td>
            <td align="left"><input name="school_name" type="text" class="input" id="school_name" value="" size="60" check_str="机构名称">
            </td>
            <td align="left">请正规填写机构全称。</td>
          </tr>
          <tr>
            <td align="left">&nbsp;<font color="#FF0000">*</font> 机构类别：</td>
            <td align="left"><select name="school_type" id="school_type" check_str="机构类别">
              <option value="">=请选择=</option>
              <option value='电脑培训'>电脑培训</option>
                <option value='职业技能'>职业技能</option>
                  <option value='资格认证'>资格认证</option>
                    <option value='学历招生'>学历招生</option>
                    <option value='企业管理'>企业管理</option>
                    <option value='语言培训'>语言培训</option>
                    <option value='家教中心'>家教中心</option>
                    <option value='少儿培训'>少儿培训</option>
                    <option value='艺术健身'>艺术健身</option>
                    <option value='出国留学'>出国留学</option>
                    <option value='其它培训'>其它培训</option>
                  </select></td>
            <td align="left">&nbsp;</td>
          </tr>
          <tr>
            <td align="left">&nbsp;<font color="#FF0000">*</font> 所在地区：</td>
            <td align="left"><select name="hukouprovince" size="1" id="select11" onChange=GethukouCapital(this.options[this.selectedIndex].value) style="width:77px ">
                            <option value="0" selected>省份</option>
<%
	set rs_job=server.createobject("adodb.recordset")
	job_sql="select * from job_provinceandcity where fid=0 order by date desc"
	rs_job.open job_sql,conn,1,1
	do while not rs_job.eof
	response.write"<OPTION value="&rs_job("id")&">"&rs_job("province_city")&"</option>"
	rs_job.movenext
	loop
	rs_job.close
	set rs_job=nothing
%>
			</select><span id="load300"></span> <span id="chukoucapital">
                          <select name=hukoucapital id="select12" onchange=GethukouCity(this.options[this.selectedIndex].value) style="width:77px ">
                            <option value="0" selected>地级市</option>
                          </select>
                  </span><span id="load400"></span> <span id="chukoucity">
                          <select name="hukoucity" id="hukoucity">
                            <option value="" selected>县级地区</option>
                       </select>
                        </span></td>
            <td align="left">&nbsp;</td>
          </tr>
          <tr>
            <td align="left">&nbsp;<font color="#FF0000">*</font> 机构地址：</td>
            <td align="left"><input name="address" type="text" class="input" id="address" value="" size="60" check_str="机构地址"></td>
            <td align="left">&nbsp;</td>
          </tr>
          <tr>
            <td align="left">&nbsp;&nbsp;&nbsp;邮政编码：</td>
            <td align="left"><input name="postcode" type="text" class="input" id="postcode" style="ime-mode:disabled" value="" size="8">
            </td>
            <td align="left">&nbsp;</td>
          </tr>
          <tr>
            <td align="left">&nbsp;&nbsp;&nbsp;机构网站：</td>
            <td align="left"><input name="site" type="text" class="input" id="site" value="" size="60"></td>
            <td align="left">&nbsp;</td>
          </tr>
          <tr>
            <td colspan="2">&nbsp;<font color="#FF0000">*</font> 机构介绍：<br>
              &nbsp;
              <textarea name="introduce" cols="72" rows="15" class="textarea" id="introduce" check_str="机构介绍" check_type="string,,2000"></textarea></td>
            <td align="left" valign="baseline">培训机构的简单介绍。<br>
              字数不超过2000字。 </td>
          </tr>
          <tr>
            <td colspan="2">&nbsp;<font color="#FF0000">*</font> 主要课程：<br>
              &nbsp;
              <textarea name="course_intro" cols="72" rows="12" class="textarea" check_str="主要课程" check_type="string,,2000"></textarea>
            </td>
            <td align="left" valign="baseline">简要描述主要开展的培训项目。<br>
              字数不超过2000字。</td>
          </tr>
          <tr>
            <td colspan="2">&nbsp;<font color="#FF0000">*</font> 师资介绍：<br>
              &nbsp;
              <textarea name="teacher_intro" cols="72" rows="12" class="textarea" id="teacher_intro" check_str="主要课程" check_type="string,,2000"></textarea>
            </td>
            <td align="left" valign="baseline">简要描述主要的师资力量。<br>
              字数不超过2000字。</td>
          </tr>
          <tr>
            <td colspan="3" bgcolor="#CFE2AA"> 　 联系方式</td>
          </tr>
          <tr>
            <td align="right">&nbsp;<font color="#FF0000">*</font> 联 系 人：</td>
            <td align="left"><input name="linkman" type="text" class="input" id="linkman" value="" size="20" check_str="联系人">
            </td>
            <td align="left">&nbsp;</td>
          </tr>
          <tr>
            <td align="right">&nbsp;<font color="#FF0000">*</font> 联系电话：</td>
            <td align="left"><input name="phone" type="text" class="input" id="phone" style="ime-mode:disabled" value="" size="30" check_str="联系电话">
            </td>
            <td align="left">请填写“区号-电话-分机”</td>
          </tr>
          <tr>
            <td align="right">&nbsp;&nbsp;&nbsp;传　　真：</td>
            <td align="left"><input name="fax" type="text" class="input" id="fax" style="ime-mode:disabled" value="" size="30">
            </td>
            <td align="left">&nbsp;</td>
          </tr>
          <tr>
            <td colspan="3">　
              <input name="agree" type="checkbox" id="agree" value="1">
              我已阅读并同意《<a href="#" onClick="opennew('read.asp','agreement',620,500,1);return false;"><u><font color=#FF0000><%=homename%>训机构会员注册协议</font></u></a>》</td>
          </tr>
          <tr valign="bottom">
            <td height="50" colspan="3">　
              <input name="imageField2" type="image" src="images/treg/lijizhuce.gif" border="0" style="width:118;height:28;">
            </td>
          </tr>
        </table></td>
        <td background="images/treg/block_2_3_bg.gif">&nbsp;</td>
      </tr>
      <tr>
        <td><img src="images/treg/block_2_3.gif" width="9" height="10"></td>
        <td background="images/treg/block_2_4_bg.gif"><img src="images/treg/space.gif" width="1" height="1"></td>
        <td><img src="images/treg/block_2_4.gif" width="9" height="10"></td>
      </tr>
    </table></td>
  </tr>
</table>
<% End If %>
</form>
<!--#include file="end.asp"-->