<!-- #include file="conn.asp" -->
<!-- #include file="inc.asp" -->
<%
Call Check_Session("Tch")
set rs=server.createobject("ADODB.Recordset")
sql="select * from teacher where id="&makeid("tch","in",Session("Tch_ID"))
rs.open sql,conn,1,1

types=rs("types")
color_num=rs("color_num")
color_time=rs("color_time")
top_num=rs("top_num")
top_used=rs("top_used")
top_time=rs("top_time")
index_num=rs("index_num")
index_time=rs("index_time")
color=array("000088","0000ff","008800","008888","0088ff","00a010","1100ff","111111","333333","50b000","880000","8800ff","888800","888888","aa00cc","aaaa00","ccaa00","ff0000","ff0088","ff00ff","ff8800","ff0005","ff88ff","ee0005","ee01ff","3388aa")

%>
<script language="JavaScript">
<!--
function  check1() {
   if (teacher.school.value=="") {
		alert("请填写所在学校！");
		teacher.school.focus();		
		    return (false);
  }
  if (teacher.spec.value=="") {
		alert("请填写所学专业！");
		teacher.spec.focus();		
		    return (false);
  }
   if (teacher.edu.value=="") {
		alert("请填写目前就读年级！");
		teacher.edu.focus();		
		    return (false);
  }
 else
 check();
}
function  check2() {
   if (teacher.school.value=="") {
		alert("请填写任教学校！");
		teacher.school.focus();		
		    return (false);
  }
  if (teacher.edu.value=="") {
		alert("请选择您的教龄！");
		teacher.edu.focus();		
		    return (false);
  }
  if(document.teacher.shenfen[0].checked==false && document.teacher.shenfen[1].checked==false && document.teacher.shenfen[2].checked==false && document.teacher.shenfen[3].checked==false)
		{
			alert("请选择您目前的身份!");
			document.teacher.shenfen[0].focus();
			return false;
		}
 else
	check();
}
function  check3() {
  if (teacher.spec.value=="") {
		alert("请填写您目前的身份！");
		teacher.spec.focus();		
		    return (false);
  }
   if (teacher.edu.value=="") {
		alert("请填写您的学历！");
		teacher.edu.focus();		
		    return (false);
  }
 else
	check();
}
function  check() {
  if (teacher.iname.value=="") {
		alert("请填写您的姓名！");
		teacher.iname.focus();		
		    return (false);
  }
  if(document.teacher.sex[0].checked==false && document.teacher.sex[1].checked==false)
		{
			alert("请选择您的性别!");
			document.teacher.sex[0].focus();
			return false;
		}
  if (teacher.teach.value=="") {
		alert("请填写可提供家教的科目！");
		teacher.teach.focus();		
		    return (false);
  }
  if (teacher.tel.value=="") {
		alert("请填写联系方式！");
		teacher.tel.focus();		
		    return (false);
  }
    	if (isNaN(teacher.qq.value)){
		alert("QQ号码只能填数字！");
		teacher.qq.focus();		
		    return (false);
    }
 else
	document.teacher.submit();
}// -->
</script>
<html>
<head>
<title>登记家教学员信息-我要找家教工作</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<BODY LEFTMARGIN=0 TOPMARGIN=10 MARGINWIDTH=0 MARGINHEIGHT=0><div align="center">
<!-- #include file="head.asp" -->
    <table width="778" height="30" border="0" cellpadding="0" cellspacing="0" bgcolor="FBFCED">
      <tr>
        <td height="30" valign="bottom">&nbsp;&nbsp;&nbsp;<strong>当前位置</strong>：【<a href="http://www.whjiajiao.com" title="www.whjiajiao.com"><font color=red><b>武汉家教网</b></font></a>】 → <a href="index.asp">首页</a> → 登记/修改教员信息</td>
      </tr>
      <tr>
        <td align="center" valign="bottom"><img src="IMAGES/line.gif" width="730" height="2"></td>
      </tr>
    </table>
    <TABLE WIDTH=778 BORDER=0 CELLPADDING=0 CELLSPACING=0 bgcolor="FBFCED">
  <TR>
    <TD align="center">
      <br>
	<table width="660"  border="1" cellpadding="5" cellspacing="0" borderColorLight=#cccccc borderColorDark=#ffffff bgcolor="#eeeeee">
      <form name="teacher" method="post" action="tch_mod_save.asp">
	  <tr>
      <td width="22%" align="right">ID：</td>
      <td bgcolor="#FFFFFF"> 
          &nbsp;<span class="font_red_b" style="font-size:16px"><%=makeid("tch","out",Rs("id"))%></span> &nbsp;&nbsp;（帐号：<span class="font13" style="color:#0000FF"><%=Rs("username")%></span>）</td>
    </tr>
	  <tr>
      <td align="right">*&nbsp;姓名：</td>
      <td bgcolor="#FFFFFF" class="font12_red"> 
          &nbsp;<input name="iname" type="text" value="<%if rs("iname")="-" then Response.Write("") else Response.Write(""&rs("iname")&"") end if%>" size="15" maxlength="4">
          （请填写您的真实姓名
          <% If rs("types")=2 Then Response.Write(",您的姓名在网站上将显示为X老师")%>
          ）</td>
    </tr>
	<tr> 
      <td align="right">*&nbsp;性别：</td>
        <td bgcolor="#FFFFFF">
          &nbsp;<input type="radio" name="sex" value="男" <% If rs("sex")="男" Then Response.Write("checked") end if%>>
男&nbsp;&nbsp;
<input type="radio" name="sex" value="女" <% If rs("sex")="女" Then Response.Write("checked") end if%>>
女&nbsp;&nbsp;&nbsp;<span class="font12_red">（必填）</span></td>
      </tr>
      <tr> 
      <td align="right">*&nbsp; 可教授课程：</td>
        <td bgcolor="#FFFFFF" class="font12_red">
		&nbsp;<input name="teach" type="text" value="<%if rs("teach")="-" then Response.Write("") else Response.Write(""&rs("teach")&"") end if%>" size="50" maxlength="50">
（如:初三数学，必填） </td>
      </tr>
	  <% If rs("types")=1 Then %>
	  <tr>
      <td width="20%" height="2" align="right">*&nbsp;学校：</td>
      <td height="2" bgcolor="#FFFFFF" class="font12_red"> 
          &nbsp;<input type="text" name="school" size="40" value="<%if rs("school")="-" then Response.Write("") else Response.Write(""&rs("school")&"") end if%>">
          （为方便查询，请使用学校全称，必填）</td>
    </tr>
	  <tr> 
      <td align="right">*&nbsp;专业：</td>
        <td bgcolor="#FFFFFF" class="font12_red">
          &nbsp;<input name="spec" type="text" size="40" value="<%if rs("spec")="-" then Response.Write("") else Response.Write(""&rs("spec")&"") end if%>">
          （必填） </td>
      </tr>

      <tr> 
      <td align="right">*&nbsp;年级：</td>
        <td bgcolor="#FFFFFF" class="font12_red">
		&nbsp;<select name="edu">
            <option <% If rs("edu")="大一" Then Response.Write("selected") end if%> value="大一">大一</option>
			<option <% If rs("edu")="大二" or rs("edu")="-" Then Response.Write("selected") end if%> value="大二">大二</option>
			<option <% If rs("edu")="大三" Then Response.Write("selected") end if%> value="大三">大三</option>
			<option <% If rs("edu")="大四" Then Response.Write("selected") end if%> value="大四">大四</option>
			<option <% If rs("edu")="研究生" Then Response.Write("selected") end if%> value="研究生">研究生</option>
			<option <% If rs("edu")="硕士" Then Response.Write("selected") end if%> value="硕士">硕士</option>
			<option <% If rs("edu")="其他" Then Response.Write("selected") end if%> value="其他">其他</option>
          </select>
		（必填） </td>
      </tr>
	  <% Elseif rs("types")=2 then %>
	  <tr>
      <td width="20%" height="2" align="right">*&nbsp; 任教学校：</td>
      <td height="2" bgcolor="#FFFFFF" class="font12_red"> 
          &nbsp;<input type="text" name="school" size="30" value="<%if rs("school")="-" then Response.Write("") else Response.Write(""&rs("school")&"") end if%>">
          （请填写真实学校名称，此项将对外保密，必填）</td>
    </tr>
	<tr>
      <td width="20%" height="2" align="right">*&nbsp;学校类型：</td>
      <td height="2" bgcolor="#FFFFFF" class="font12_red"> 
          &nbsp;<select name="tschool">
            <option <% If rs("tschool")="小学" Then Response.Write("selected") end if%> value="小学">小学</option>
            <option <% If rs("tschool")="普通初中" Then Response.Write("selected") end if%> value="普通初中">普通初中</option>
			<option <% If rs("tschool")="重点初中" Then Response.Write("selected") end if%> value="重点初中">重点初中</option>
			<option <% If rs("tschool")="普通高中" Then Response.Write("selected") end if%> value="普通高中">普通高中</option>
			<option <% If rs("tschool")="重点高中" Then Response.Write("selected") end if%> value="重点高中">重点高中</option>
			<option <% If rs("tschool")="中专" Then Response.Write("selected") end if%> value="中专">中专</option>
			<option <% If rs("tschool")="大学" Then Response.Write("selected") end if%> value="大学">大学</option>
			<option <% If rs("tschool")="培训机构" Then Response.Write("selected") end if%> value="培训机构">培训机构</option>
			<option <% If rs("tschool")="其他" Then Response.Write("selected") end if%> value="其他">其他</option>
          </select>
          （此项将显示在本站“学校”一栏信息中，必填）</td>
    </tr>
		<tr> 
      <td align="right">*&nbsp; 所授课程：</td>
        <td bgcolor="#FFFFFF" class="font12_red">
          &nbsp;<input name="spec" type="text" size="30" value="<%if rs("spec")="-" then Response.Write("") else Response.Write(""&rs("spec")&"") end if%>">
          （必填） </td>
      </tr>
	<tr>
      <td width="20%" height="2" align="right">*&nbsp;目前身份：</td>
      <td height="2" bgcolor="#FFFFFF"> 
        &nbsp;<input name="shenfen" type="radio" value="在职" <% If rs("shenfen")="在职" or rs("shenfen")="-" Then Response.Write("checked") end if%>>
        在职
        <input type="radio" name="shenfen" value="退休" <% If rs("shenfen")="退休" Then Response.Write("checked") end if%>>
        退休
        <input type="radio" name="shenfen" value="离职" <% If rs("shenfen")="离职" Then Response.Write("checked") end if%>>
        离职
        <input type="radio" name="shenfen" value="进修" <% If rs("shenfen")="进修" Then Response.Write("checked") end if%>>
        进修&nbsp;&nbsp;&nbsp;&nbsp;<span class="font12_red">（必填） </span></td>
    </tr>
	<tr> 
        <td align="right">*&nbsp;教龄： </td>
        <td bgcolor="#FFFFFF" class="font12_red">
		&nbsp;<select name="edu">
            <%
			for a=1 to 10
	        Response.Write("<option ")
			If rs("edu")=a&"年" Then
			Response.Write("selected ")
			End If
			Response.Write("value="&a&"年>"&a&"&nbsp;年</option>")
			next
			If rs("edu")="10年以上" Then
			Response.Write("selected ")
			end if
			Response.Write("value=10年以上>10年以上</option>")
			%>
          </select>
		（必填）</td>
      </tr>
<%Else%>
<tr>
      <td height="2" align="right">毕业学校：</td>
      <td height="2" bgcolor="#F7F7F7" class="font12">
        &nbsp;<input type="text" name="school" size="40" value="<%if rs("school")="-" then Response.Write("") else Response.Write(""&rs("school")&"") end if%>">
    （选填）</td>
	  </tr>
   <tr> 
      <td align="right">*&nbsp;目前身份：</td>
        <td bgcolor="#FFFFFF" class="font12_red">
          &nbsp;<input name="spec" type="text" size="40" value="<%if rs("spec")="-" then Response.Write("") else Response.Write(""&rs("spec")&"") end if%>">
          （如：联想公司电脑工程师，必填）</td>
      </tr>
	  <tr> 
        <td align="right">*&nbsp;学历： </td>
        <td bgcolor="#FFFFFF" class="font12_red">
		 &nbsp;<input name="spec" type="text" size="30" value="<%if rs("edu")="-" then Response.Write("") else Response.Write(""&rs("edu")&"") end if%>">
		 （必填）</td>
      </tr>
	  <% End If %>
	  <tr>
        <td align="right">*&nbsp;联系电话：</td>
        <td bgcolor="#FFFFFF" class="font12_red">
		&nbsp;<input name="tel" type="text" size="40" value="<%if rs("tel")="-" then Response.Write("") else Response.Write(""&rs("tel")&"") end if%>">
		（请如有多个请用逗号隔开，必填）</td>
      </tr><tr>
        <td align="right">E-mail：</td>
        <td bgcolor="#F7F7F7" class="font12">
          &nbsp;<input name="email" type="text" value="<%if rs("email")="-" then Response.Write("") else Response.Write(""&rs("email")&"") end if%>" size="30">
          （选填） </td>
      </tr>
<tr>
        <td align="right">QQ：</td>
        <td bgcolor="#F7F7F7" class="font12">
          &nbsp;<input name="qq" type="text" size="20" value="<%if rs("qq")=0 then Response.Write("") else Response.Write(""&rs("qq")&"") end if%>">
          （选填）</td>
      </tr>
	  <tr> 
        <td align="right">可提供家教的时间： </td>
        <td bgcolor="#F7F7F7" class="font12">
		&nbsp;<input name="ttime" type="text"  size="50" value="<%if rs("ttime")="不限" then Response.Write("") else Response.Write(""&rs("ttime")&"") end if%>">
		（不填表示不限）</td>
      </tr>
	  <tr>
        <td align="right">可提供家教的区域：</td>
        <td bgcolor="#F7F7F7" class="font12">
		&nbsp;<input name="tarea" type="text" value="<%if rs("tarea")="不限" then Response.Write("") else Response.Write(""&rs("tarea")&"") end if%>" size="50">
		（不填表示不限）</td>
      </tr><tr> 
        <td align="right">期望待遇： </td>
        <td bgcolor="#F7F7F7" class="font12">
		&nbsp;<input name="pay" type="text" size="20" value="<%if rs("pay")="面议" then Response.Write("") else Response.Write(""&rs("pay")&"") end if%>">
		（不填表示面议）</td>
      </tr><tr>
        <td align="right">其他说明：</td>
        <td bgcolor="#F7F7F7" class="font12">
          &nbsp;<textarea name="content" cols="70" rows="5"><%if rs("content")="无" then Response.Write("") else Response.Write(""&rs("content")&"") end if%></textarea>
          （不填表示无）</td>
      </tr>
	  <tr align="center">
        <td colspan="2" class="font_red_b">使 用 道 具 （<a href="#" class="a_blue">道具功能说明</a>）</td>
        </tr>
	  <tr>
        <td align="right"><span class="font_red_b">变色</span>道具(<span class="font_blue_b"><%=color_num%></span>)：</td>
        <td bgcolor="#FFFFFF" class="font12">
		<%
		if color_time>=now() then
        	Response.Write("<select name=color_value title='修改颜色请重新选择' style='width:80px'>")
			for i=0 to 26
			if rs("color_value")=color(i) then
			Response.Write("<option style='background: #"&color(i)&"' value='"&color(i)&"' selected></option>")
			else
			Response.Write("<option style='background: #"&color(i)&"' value='"&color(i)&"'></option>")
			end if
			next
			Response.Write("</select>")
			Response.Write("&nbsp;&nbsp;&nbsp;&nbsp;（目前的道具到 <span class=font_blue_b>"&color_time&"</span> 之前有效）")
		elseif color_num>0 then
        	Response.Write("<select name=color_value style='width:80px'>")
			Response.Write("<option value='-' selected>不使用</option>")
			for i=0 to 26
			Response.Write("<option style='background: #"&color(i)&"' value='"&color(i)&"'></option>")
			next
			Response.Write("</select><input name='color_add' type='hidden' value='OK'>")
			Response.Write("&nbsp;&nbsp;（每个变色道具有效时间为<span class=font_blue_b>3天</span>，使用后可以修改颜色）")
		else
			Response.Write("您没有变色道具可以使用 [ <a href='pro.asp' class='a_blue' target=_blank><strong>点击购买</strong></a> ]")
		end if
		%></td>
        </tr>
	  <tr>
        <td align="right"><span class="font_red_b">置顶</span>道具(<span class="font_blue_b"><%=top_num%></span>)：</td>
        <td bgcolor="#FFFFFF" class="font12">
		<%
		if top_time>=now() and top_num>0 then
			Response.Write("增加 ")
			Response.Write("<select name=top_used>")
			for i=0 to top_num
			Response.Write("<option value="&i&">"&i&"</option>")
			next
			Response.Write("</select> 个置顶道具<br>")
			Response.Write("（您已经使用了 <span class=font_blue_b>"&top_used&"</span> 个置顶道具，目前的道具到 <span class=font_blue_b>"&top_time&"</span> 之前有效）")
		elseif top_time>=now() then
			Response.Write("您已经没有置顶道具可以使用，要增加置顶道具的个数，请[ <a href='pro.asp' class='a_blue' target=_blank><strong>点击购买</strong></a> ]<br>")
			Response.Write("您目前已经使用了 <span class=font_blue_b>"&top_used&"</span> 个置顶道具，道具到 <span class=font_blue_b>"&top_time&"</span> 之前有效")
		elseif top_num>0 then
			Response.Write("使用 <select name=top_used_add>")
			for i=0 to top_num
			Response.Write("<option value="&i&">"&i&"</option>")
			next
			Response.Write("</select> 个/次")
			Response.Write("&nbsp;&nbsp;（置顶道具有效时间为<span class=font_blue_b>3天/次</span>，个数越多越靠前，使用后可增加个数）")
		else
			Response.Write("您没有置顶道具可以使用 [ <a href='pro.asp' class='a_blue' target=_blank><strong>点击购买</strong></a> ]")
		end if
		%>		</td>
        </tr>
	  <tr>
        <td align="right"><span class="font_red_b">首页</span>道具(<span class="font_blue_b"><%=index_num%></span>)：</td>
        <td bgcolor="#FFFFFF" class="font12">
		<%
		set rs1=server.createobject("ADODB.Recordset")
		sql1="select * from teacher where index_time>now and types="&types
		rs1.open sql1,conn,1,1
		if types=1 then
		index_now= 5 - rs1.recordcount
		elseif types=2 then
		index_now= 3 - rs1.recordcount
		else
		index_now=0
		end if
		rs1.close
		set rs1=nothing
		if index_time>=now() and index_num>0 then
			Response.Write("延长 ")
			Response.Write("<select name=index_time>")
			for i=0 to index_num
			Response.Write("<option value="&i&">"&i&"</option>")
			next
			Response.Write("</select> 天")
			Response.Write("&nbsp;&nbsp;（目前的首页道具到 <span class=font_blue_b>"&index_time&"</span> 之前有效）")
		elseif index_time>=now() then
			Response.Write("您已经没有首页道具可以使用，要延长首页道具请[ <a href='pro.asp' class='a_blue' target=_blank><strong>点击购买</strong></a> ]<br>")
			Response.Write("目前的首页道具到 <span class=font_blue_b>"&top_time&"</span> 之前有效")
		elseif index_num>0 and index_now>0 then
			Response.Write("使用 <select name=index_time_add>")
			for i=0 to index_num
			Response.Write("<option value="&i&">"&i&"</option>")
			next
			Response.Write("</select> 个")
			Response.Write("&nbsp;&nbsp;（每个首页道具有效时间为<span class=font_blue_b>1天</span>，显示在首页的推荐栏内，每天共有8个名额）")
		elseif index_num>0 then
			Response.Write("今天首页道具的使用名额已满，请等待")
		else
			Response.Write("您没有首页道具可以使用 [ <a href='pro.asp' class='a_blue' target=_blank><strong>点击购买</strong></a> ]")
		end if
		%>		</td>
        </tr>
	  <tr align="center" bgcolor="FBFED7">
      <td height="11" colspan="2">
	  <INPUT name=tch_id type=hidden value="<%=makeid("tch","out",rs("id"))%>">
	  <INPUT class="input3" name=B1 type=button onClick="check<%=rs("types")%>()" value="确 认 提 交">
      <INPUT name=Reset type=reset value=重新填写 class="input2">
      </td>
    </tr></form>
  </table>
      <br></TD>
  </TR>
</TABLE>
<!-- #include file="foot.asp" -->
</div>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>