<?php
	require_once('inc/conn.php');
	require_once('inc/constant.php');
	$opendb=new mydb();
	$config_sql="select * from ls_config ";
	$config_query=$opendb->query($config_sql);
	$config_rows=mysql_fetch_assoc($config_query);
	
	
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>找回密码</title>
<script language="JavaScript" type="text/JavaScript">
<!--
/*
  if(form1.password.value.length<5)
  {
  errors+="密码长度不能少于5个字符";

  }
*/

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
	if (val) { nm=val.name; if ((val=val.value)!="") {
	  if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
		if (p<1 || p==(val.length-1)) errors+='- '+nm+' 必须是邮箱地址.\n';
	  } else if (test!='R') { num = parseFloat(val);
		if (isNaN(val)) errors+='- '+nm+' 必须包含数字.\n';
		if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
		  min=test.substring(8,p); max=test.substring(p+1);
		  if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
	} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' 不能为空：\n'; }
  } if (errors) alert('请更正下列错误:\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>

<body><form action="" method="post" name="form1">
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <table width="80%" height="125" border="0" align="center" cellpadding="0" cellspacing="0" id="table11">
	<tr bgcolor="#E6E6E6"> 
	  <td width="180" height="86" align="center" style="font-size: 9pt; font-family: 宋体,MingLiU, Arial; color: #000000; table-layout: fixed; word-break: break-all"><span class="STYLE1">&nbsp;用户名：</span>　 
		<input type="text" name="admin" size="10" maxlength="20" style="font-size: 9pt; font-family: 宋体,MingLiU, Arial; color: #000000" onMouseOver="this.style.background='#FDE8FF';" onMouseOut="this.style.background='#FFFFFF'" onFocus="this.select(); "></td>
	  <td width="341" style="font-size: 9pt; font-family: 宋体,MingLiU, Arial; color: #000000; table-layout: fixed; word-break: break-all"> 
		<div align="left"><span style="letter-spacing: -1pt"><span class="STYLE1">网站Email：</span> 
		  <input type="text" name="adminemail" size="24" maxlength="20" style="font-size: 9pt; font-family: 宋体,MingLiU, Arial; color: #000000" onMouseOver="this.style.background='#FDE8FF';" onMouseOut="this.style.background='#FFFFFF'" onFocus="this.select(); ">
		  </span></div></td>
	  <td width="75" valign="middle" style="font-size: 9pt; font-family: 宋体,MingLiU, Arial; color: #000000; table-layout: fixed; word-break: break-all"> 
		<label> </label> <div align="right"> 
		  <input type="button" name="button" id="button" value="找回密码"   onClick="MM_validateForm('admin','','R','adminemail','','isEmail');if(document.MM_returnValue){form1.action='getadminpassword.php';form1.submit();}">
		</div></td>
	  <td width="33" style="font-size: 9pt; font-family: 宋体,MingLiU, Arial; color: #000000; table-layout: fixed; word-break: break-all">　 
		<input type="hidden" name="ls" id="hiddenField" value="forget"></td>
	</tr>
	<tr bgcolor="#E6E6E6"> 
	  <td height="30" colspan="4" align="left" style="padding-left:20px;font-size: 9pt; font-family: 宋体,MingLiU, Arial; color: #000000; table-layout: fixed; word-break: break-all">请输入用户名和网站邮箱地址，密码将发送到您的电子邮箱。谢谢使用蓝信外贸网站管理系统。</td>
	</tr>
  </table>
</form>
</body>
</html>
