<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.sql.*,gbase.db.*,java.util.*,gbase.init.*,gbase.util.*,java.text.*,java.io.*,gbase.init.*,gbase.html.*"%>
<%
	SeqIdGenerater theSeqIdGenerater=new SeqIdGenerater();
	ConvertSql theConvertSql=new ConvertSql();
	DBOperation theDBOperation = new DBOperation();
        ResultSet rs=null;
	String message="你的网站帐号与联系人Email不正确，请重新输入!";
	String action = request.getParameter("action")==null?"":request.getParameter("action");
	String url="support.jsp";
	
	String web_account=request.getParameter("web_account")==null?"":request.getParameter("web_account");
        String web_contacter_email=request.getParameter("web_contacter_email")==null?"":request.getParameter("web_contacter_email");
        
	String sql="";
	String password="";
	String web_contacter_email1="";
        sql = "select b.password,a.web_contacter_email from web_info a,web_user b  where a.web_account=b.web_account and a.web_account='"+web_account+"' and b.user_account='admin'";
        rs =theDBOperation.getResultSet(sql);
        if(rs.next()){
          password=rs.getString("password");
          web_contacter_email1=rs.getString("web_contacter_email");
        }
        //System.out.println("web_contacter_email1:"+web_contacter_email1);
        //System.out.println("web_contacter_email:"+web_contacter_email);
        if(web_contacter_email1.equals(web_contacter_email))
        { 
          SendMail send=new SendMail();
          send.SendMail("关于网站帐号"+web_account+"找回密码的通知!","您的网站帐号为:"+web_account+",用户帐号为:admin,密码为:"+password,web_contacter_email);
          message = "密码已发到你的邮箱"+web_contacter_email+"里了，请到您的邮箱接收您的密码！";
        }
        else
          message = "你的网站帐号与联系人Email不正确，请重新输入!";
    
%>
<script language="javascript">
	function process ( message,url){
		alert(message);
		self.location = url;
	}
</script>
<html>
	<head>
		<title></title>
	</head>
	<body onload="javascript: process('<%=message%>','<%=url%>');">
	</body>
</html>