<?php require("conn.php"); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>找回密码</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></head>
<script language="javascript">
function refresh_code() { user_form.imgcode.src="verifycode.php?a="+Math.random(); }
function onfocus_check(id) { id.style.border='2px #FF0000 solid'; }
function onblur_check(id) { id.style.border='1px #6CB5FF solid'; }

function user_form_check() {
if (user_form.username.value=='') { alert('请输入用户名!'); user_form.username.focus(); return false; }
check_value='abcdefghijklmnopqrstuvwxyz0123456789_';
username_length=user_form.username.value.length;
for(i=1;i<=username_length;i++) {
if (check_value.indexOf(user_form.username.value.charAt(i))==-1) { alert('用户名只能输入字母、数字、下划线!'); user_form.username.focus(); return false; } }
if (username_length<4 || username_length>20) { alert('用户名的长度在4-20之间!'); user_form.username.focus(); return false; }
if (user_form.userpassword.value=='') { alert('请输入密码!'); user_form.userpassword.focus(); return false; }
if (user_form.userpassword_1.value=='') { alert('请再次输入密码!'); user_form.userpassword_1.focus(); return false; }
if (user_form.userpassword.value!=user_form.userpassword_1.value) { alert('两次输入密码必须相同!'); user_form.userpassword_1.focus(); return false; }
if (user_form.email.value=='') { alert('请输入电子邮箱!'); user_form.email.focus(); return false; }
var filter=/^\s*([A-Za-z0-9_-]+(\.\w+)*@(\w+\.)+\w{2,3})\s*$/;
if (!filter.test(document.user_form.email.value)) { alert('请输入正确的电子邮箱格式!'); user_form.email.focus(); return false; }
if (user_form.yourname.value=='') { alert('请输入姓名!'); user_form.yourname.focus(); return false; }
if (user_form.province_name.value=='') { alert('请选择所在区域!'); user_form.province_name.focus(); return false; }
if (user_form.city_name.value=='') { alert('请选择所在区域!'); user_form.city_name.focus(); return false; }
if (user_form.address.value=='') { alert('请输入地址!'); user_form.address.focus(); return false; }
if (user_form.mobile.value=='') { alert('请输入移动电话!'); user_form.mobile.focus(); return false; }
if (isNaN(user_form.mobile.value)) { alert('移动电话必须为数字!'); user_form.mobile.focus(); return false; }
if (user_form.mobile.value.length<11 || user_form.mobile.value.length>11) { alert('请输入正确的移动电话号码!'); user_form.mobile.focus(); return false; }
if (user_form.code.value=='') { alert('请输入验证码!'); user_form.code.focus(); return false; }
}

var xmlHttp
function sort_list(id)
{
var url='city_select.php?id='+id;
if (window.ActiveXObject)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")	
}
else if (window.XMLHttpRequest)
{
xmlHttp=new XMLHttpRequest()
}
xmlHttp.open("GET",url,true)
xmlHttp.onreadystatechange=stateChanged
xmlHttp.send(null)
}

function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("city_sort").innerHTML=xmlHttp.responseText
}
}
</script>
<body onLoad="javascript:sort_list('');"><table width="100%" height="110"  border="0" cellpadding="0" cellspacing="0">
  <tr><td height="13" align="center">&nbsp;</td></tr>
  <tr>
    <td height="80" align="center"><table width="970" border="0" cellpadding="0" cellspacing="0" style="font-size:12px;">
      <tr>
        <td width="310"><img src="images/logo.jpg" width="310" height="80"></td>
        <td align="right">&nbsp;</td>
		</tr>
    </table></td>
  </tr>
  <tr>
    <td style="height:10px;"></td>
  </tr>
</table><table width="100%"  border="0" cellpadding="0" cellspacing="0">
          <tr><td align="center"><form name="user_form" method="post" action="login_action.php?type_action=add" onSubmit="return user_form_check()" enctype="multipart/form-data"><table width="970" border="0" cellpadding="0" cellspacing="0" style="border:1px #BCDFFF solid;">
            <tr>
              <td height="30" colspan="2" align="left" background="images/sort_top.jpg"><table width="960" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="120" align="left" style="font-size:14px;font-weight:bold;">　找回密码</td>
                    <td width="850" style="font-size:12px;">&nbsp;</td>
                  </tr>
              </table></td>
            </tr>
            <tr><td height="20" colspan="2"></td></tr>
            <tr>
              <td width="310" height="40" align="left" style="font-size:12px;line-height:160%;"><font color="#FF0000">&nbsp; </font></td>
              <td width="660" align="left" style="font-size:12px;line-height:160%;"><font color="#FF0000">*</font> 用 户 名：
              <input type="text" name="username" style="width:200px;height:20px;line-height:20px;border:1px #6CB5FF solid;" onFocus="javascript:onfocus_check(username);" onBlur="javascript:onblur_check(username);"></td>
            </tr>
            <tr>
			
              <td height="40" align="left" style="font-size:12px;line-height:160%;">&nbsp;                </td>
              <td height="40" align="left" style="font-size:12px;line-height:160%;"><font color="#FF0000">*</font> 电子邮箱：
              <input name="email" type="text" id="email" style="width:200px;height:20px;line-height:20px;border:1px #6CB5FF solid;" onFocus="javascript:onfocus_check(email);" onBlur="javascript:onblur_check(email);"></td>
            </tr>
            <tr>
              <td height="40" align="left" style="font-size:12px;line-height:160%;"><label for="code"> </label></td>
              <td height="40" align="left" style="font-size:12px;line-height:160%;"><label for="code"><font color="#FF0000">*</font> 验 证 码：</label>
                <input type="text" name="code" id="textfield" style="width:40px;height:20px;line-height:20px;border:1px #6CB5FF solid;" onFocus="javascript:onfocus_check(code);" onBlur="javascript:onblur_check(code);"/>
                <a href="javascript:refresh_code();"><img id="imgcode" src="VerifyCode.php" alt="验证码" border="0" /></a> </td>
            </tr>
            <tr>
              <td height="80" colspan="2" align="center" style="font-size:12px;line-height:160%;">              <input name="imageField" type="image" src="images/find_button.jpg" width="90" height="30" border="0"></td>
            </tr>			
			</table>
        </form></td>
        </tr>
      </table>  
  <table width="100%"  border="0" cellpadding="0" cellspacing="0">
    <tr><td height="120" align="center" style="font-size:12px;"><p>家教源码，家教网源码，家教网站源码　　　版权所有</p>
      <p>咨询QQ：741940577</p></td>
    </tr>
  </table>
  </body>
</html>