<!--#include file="Inc/Conn.asp"-->
<!--#include file="Lock.asp"-->
<!--#include file="Inc/eshopcode.asp"-->
<!--#include file="Admin/MD5.asp"-->
<%
If Request.QueryString("action")="login" Then
username=checkstr(Trim(Request.Form("username")))
pwd=MD5(Trim(Request.Form("pwd")))
sql = "Select * From [User] Where [UserName]='"&username&"' and [PassWord]='"&pwd&"'"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
If rs.Eof or rs.Bof Then
        Response.write "<script language='javascript'>" & chr(13)
		Response.write "alert('密码或者用户名错误!');" & Chr(13)
		Response.write "window.document.location.href='Index.asp';"&Chr(13)
		Response.write "</script>" & Chr(13)
        Response.End 
Else
Session("MyUserName")=username
Session("MyPassWord")=pwd
Session.Timeout = 60
        Response.write "<script language='javascript'>" & chr(13)
		Response.write "alert('欢迎登陆!');" & Chr(13)
		Response.write "window.document.location.href='javascript:window.close()';"&Chr(13)
		Response.write "</script>" & Chr(13)
        Response.End 
End if
End if
%>
<HTML>
<HEAD>
<TITLE>会员登录</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="ziyan/Style.css" rel="stylesheet" type="text/css">
<script language=javascript>
	function CheckForm()
	{
		if(document.UserLogin.username.value=="")
		{
			alert("请输入用户名！");
			document.UserLogin.username.focus();
			return false;
		}
		if(document.UserLogin.pwd.value == "")
		{
			alert("请输入密码！");
			document.UserLogin.pwd.focus();
			return false;
		}
	}
</script>
</HEAD>
<BODY bgcolor="#D9D9D9" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<br>
<TABLE width="80%" height="95%"
border=0 align="center" cellPadding=1 cellSpacing=1 bgcolor="#CCCCCC">
  <TBODY>
    <TR align=middle> 
      <TD height="22" bgcolor="#eeeeee" 2> 
        <div align="left">对不起，如要购买商品，必须先进行登录，如果您还没有注册为我们的会员，请<a href="Register.asp"><font color="#FF0000">注册</font></a>后再购买商品！&nbsp; 
          <br>
          如果您已经是会员，请先登录： </div></TD>
    </TR>
    <TR vAlign=top align=middle> 
      <TD height="160" valign="middle" bgcolor="#FFFFFF"> 
        <form action='Login.asp?action=login' method='post' name='UserLogin' onSubmit='return CheckForm();'>
          <TABLE cellSpacing=0 cellPadding=0 width=100% height="47">
            <TBODY>
              <TR> 
                <TD align=middle height="47" width="100%"> <TABLE cellSpacing=1 width=100% height="68">
                    <TBODY>
                      <TR> 
                        <TD  width=345 height=18><div align="right">会员登录名称：</div></TD>
                        <TD  width=447 height=18>
<input name='username' type='text' id='username' maxlength='16' style="width:120"> </TD>
                      </TR>
                      <tr> 
                        <TD  width=345 height=1><div align="right">会员登录密码：</div></TD>
                        <TD  width=447 height=1>
<input name='pwd' type='password' id='pwd' maxlength='16' style="width:120"> </TD>
                      </tr>
                      <TR> 
                        <TD  colSpan=2 height="22"> 
                          <DIV align=center> 
			<input name='Login' type='submit' id='Login' value=' 登录 '>
                              &nbsp; </DIV></TD>
                      </TR>
                    </TBODY>
                  </TABLE></TD>
              </TR>
            </TBODY>
          </TABLE>
        </FORM></TD>
    </TR>
    <TR vAlign=top align=middle> 
      <TD height="22" bgcolor="#eeeeee" 2> 
        <p>&nbsp;</p></TD>
    </TR>
  </TBODY>
</TABLE>
</BODY>
</HTML>