<!--#include file="Include/Const.asp" -->
<!--#include file="Include/NoHackSql.Asp" -->
<!--#include file="Include/ConnSiteData.asp" -->
<!--#include file="Include/MD5.asp" -->
<%call SiteInfo
headid=7
%>
<!--#include file="Head.Asp" -->
<div id='index_wrapper'>
<div style="clear:both;background-image:url('images/mybuzhou.jpg');width:800px;height:85px;margin-bottom:10px;" id="mySitep">
<div style="height:20px;margin-bottom:26px;text-align:right;" ><div onclick="stepcoclose()" style="width:20px;height:20px;cursor:pointer;float:right">&nbsp;</div></div>
<div style="clear:both;font-size:14px;font-weight:bold;color:#5A552B;">
<div style="width:100px;float:left;">&nbsp;</div>
<div style="width:200px;float:left;">查看今日团购价</div>
<div style="width:36px;float:left;">&nbsp;</div>
<div style="width:200px;float:left;">付款并获得优惠凭证码</div>
<div style="width:66px;float:left;">&nbsp;</div>
<div style="width:180px;float:left;">凭优惠凭证码享受超级折扣</div>
</div>
</div>
<div id=best-r class="best" style="width:586px;float:left">
<div id=best-sc>
<div class=best-tb>
<a style="width:80px;">当前位置：</a>
<a>找回密码</a>
</div>
</div>
<div id=bests>

<div style="padding:10px;">
	<%=WebContent()%>
</div>
</div>
</div>
<div style="width:200px; float:right;">
<div id=best-r class="best" style="width:200px; float:right;">
<div id=best-sc>
<div class=best-tb>
<a style="width:100px;">我的团购中心</a>       
</div>
</div>
<div id=bests>
<%Call WebMenu()%>
</div>
</div>

<div id=best-r class="best" style="width:200px; float:right;margin-top:10px;">
<div id=best-sc>
<div class=best-tb>
<a style="width:80px;font-size:14px;font-weight:bold;">信息订阅</a>       
</div>
</div>

<div id=bests>
<table cellpadding="0" cellspacing="0" width="100%px" style="padding:6px;">
<tr><td align="center">
<% Call LiangjingCMSEMail() %>
</td></tr>
</table>

</div>
</div>
</div>
<div style="clear:both;;*display:inline;overflow:;hidden;">
</div>
<div style="float:none;height:10px;"></div>
</div></div>
</div></div>
<!--#include file="Foot.Asp"-->
<%
Function WebMenu()
If session("MemName")="" Or session("GroupID")="" Or session("MemLogin")<>"Succeed" Then
  response.write "<Li>  <img src=""image/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href=""MemberRegister.asp"">注册会员</a></li>"
Else
  response.write "<Li>  <img src=""image/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href=""MemberInfo.asp"">修改注册资料</a></li>"
  response.write "<Li>  <img src=""image/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href=""MemberMessage.asp"">我的留言</a></li>"
  response.write "<Li>  <img src=""image/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href=""MemberOrder.asp"">我的订单</a></li>"
  response.write "<Li>  <img src=""image/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href=""MemberTalent.asp"">我的应聘</a></li>"
  response.write "<Li>  <img src=""image/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href=""MemberLogin.asp?Action=Out"">退出登录</a></li>"
End If
End Function

function WebLocation()
  WebLocation="&nbsp;当前位置：<a href=""index.asp"" class=""agray"">首页</a> - <a href=""MemberCenter.asp"" class=""agray"">会员中心</a> - 密码找回"&VbCrLf
end Function

function MemGroup(GroupID)
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select * from LiangJing_MemGroup where GroupID='"&GroupID&"'"
  rs.open sql,conn,1,1
  MemGroup=rs("GroupName")
  rs.close
  set rs=nothing
end function

function WebContent()
  dim rs,sql,NewPassword
  if request.QueryString("Step")="" then
%>
<table width="95%" border="0" align="center" cellpadding="3" cellspacing="5">
<form action="MemberGetPass.asp?Step=EnterNameMail" method="post" name="form" id="form">
  <tr>
    <td width="200" align="right">会员名：</td>
    <td><input name="MemName" type="text" id="MemName" size="30" maxlength="16" /></td>
  </tr>
  <tr>
    <td align="right">电子信箱：</td>
    <td><input name="Email" type="text" id="Email" size="30" maxlength="50" /></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input name="Next2" type="submit" value="下一步" /></td>
  </tr>
  </form>
</table>
<%
  elseif request.QueryString("Step")="EnterNameMail" then
    set rs = server.createobject("adodb.recordset")
    sql="select * from LiangJing_Members where MemName='"&request.form("MemName")&"' and Email='"&request.form("Email")&"'"
	rs.open sql,conn,1,1
	if rs.eof then
	  WriteMsg("会员名或电子信箱地址错误！")
      exit function
	end if
%>
<table width="95%" border="0" align="center" cellpadding="3" cellspacing="5">
<form action="MemberGetPass.asp?Step=EnterAnswer&ID=<%=rs("ID")%>" method="post" name="form" id="form">
  <tr>
    <td width="200" align="right">会员名：</td>
    <td><%=rs("MemName")%></td>
  </tr>
  <tr>
    <td align="right">电子信箱：</td>
    <td><%=rs("Email")%></td>
  </tr>
  <tr>
    <td align="right">密码保护问题：</td>
    <td><%=rs("Question")%></td>
  </tr>
  <tr>
    <td align="right">密码保护答案：</td>
    <td><input name="Answer" type="text" size="30" maxlength="100" /></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input name="Next" type="submit" value="下一步" /></td>
  </tr>
  </form>
</table>
<%
  elseif request.QueryString("Step")="EnterAnswer" Then
    If trim(request("Answer"))="" Then
	WriteMsg("请填写密码保护答案！")
	exit function
	End If
    set rs = server.createobject("adodb.recordset")
    sql="select * from LiangJing_Members where ID="&request.QueryString("ID")
    rs.open sql,conn,1,3
	if rs.eof then
	  WriteMsg("参数错误！")
      exit function
	end if
    if rs("Answer")<>MD5(trim(request("Answer"))) then
      WriteMsg("密码保护答案错误！")
      exit function
    end if
    randomize timer
    NewPassword=Int(899999*Rnd() +100000)
    rs("Password")=MD5(NewPassword)
    rs.update
    rs.close
    set rs=nothing
	Response.Write "<script language=javascript>alert('恭喜！您的密码找回成功！\n新密码为："&NewPassword&"\n请登录后修改为新的密码！');window.location.href='Index.asp';</script>"
    exit function
  end if
end function
%>