<!--#include file="../Include/Conn.asp" -->
<!--#include file="Images/lino.gif"-->
<!--#include file="../Include/Char.asp" -->
<!--#include file="../Include/md5pass.asp"-->
<%
if session("master")<>"" and checkStr(Request("ID"))<>"" then
   Response.Cookies("UserID") = checkStr(Request("ID"))
   Response.Cookies("LinkMan") = "Admin"
   Response.Cookies("companyid") = checkStr(Request("ID"))
   Response.Redirect("Index.asp")
end if

If CheckStr(Request("Login"))="OK" Then
      m_UserName = CheckStr(Request("UserName"))
	  m_UserPWD = CheckStr(Request("UserPWD"))
      SET rs=server.createobject("adodb.recordset")
      SQL="SELECT * FROM  CityCard_League WHERE ischecked=1 and UserName = '"& m_UserName &"'"   
      rs.Open SQL,conn,1,1 
	  if rs.Eof then
	    rsErr = "对不起，该商家不存在或当前还未通过审核！"
	  elseif rs("password") <> m_UserPWD then
	        rsErr = "对不起，您输入的密码出错"
	  else
	    Response.Cookies("UserID") = rs("CompanyID")  
		Response.Cookies("LinkMan") = rs("LinkMan")
		Session("UserID")=rs("CompanyID")
	    	
	    SQL="UPDATE CityCard_League SET LoginCount ='"&rs("LoginCount")+1 &"' WHERE CompanyID="& rs("CompanyID")&""
        Conn.Execute SQL

		Response.Cookies("LoginCount") = rs("LoginCount")+1
		Response.Cookies("UserName") = rs("UserName")
		Response.Cookies("companyid") = rs("companyid")
		Response.Cookies("F_Integral") = rs("F_Integral")+0.2

		if rs("grade") <> "" Then
	      Response.Cookies("grade") = rs("grade")
		else
		  Response.Cookies("grade") = " "
		end if
		Response.cookies("iscard") = rs("iscard")
		if rs("LastLoginTime") <> "" then
		  Response.cookies("LastLoginTime") = rs("LastLoginTime")
		else
		  Response.Cookies("LastLoginTime") = "未登录过"
		end if
	    SQL="UPDATE CityCard_League SET LastLoginTime ='"& now() &"' WHERE CompanyID="& rs("CompanyID")&""
        Conn.Execute SQL
		
		Response.Cookies("LoginTime") = now()
		Response.Redirect("Index.asp")
		Response.END()
	  end if	
		
	  rs.Close
	  SET rs = Nothing
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>襄樊生活网-商家管理系统</title>
<link href="../css/Style.css" rel="stylesheet" type="text/css"><link href="../css/Menu.css" rel="stylesheet" type="text/css">
<link href="../css/aCardList.css" rel="stylesheet" type="text/css">
<SCRIPT src="../js/029bxw.js" type=text/javascript></SCRIPT>
<script language="JavaScript" type="text/JavaScript">
<!--



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>

<body onLoad="MM_preloadImages('images/xf_link1b.gif','images/xf_link2b.gif','images/xf_link3b.gif','images/xf_link4b.gif','images/xf_link5b.gif','images/ly_b_2b.gif','images/ly_b_4b.gif','images/ly_b_1b.gif','images/ly_b_3b.gif','images/ly_b_5b.gif')">
<!--#include file="../Include/cardMenu.htm" -->
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="500" valign="top"><div align="center">
      <table width="600%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="50" class="p1"> <STRONG>登录事项：</STRONG>欢迎您进入商家管理系统！只有都市网加盟商家才能登录，如果您还不是都市网加盟商家，请加盟后登录！<A 
            class=p1 
            href="reginfo.asp">现在加盟>></A></td>
          </tr>
      </table>
      <table width="100%" border="1" cellpadding="0" cellspacing="5" bordercolor="e2e2e2" bgcolor="f5f5f5">
          <tr>
            <td height="25" background="images/about_bj.gif" class="p4">&nbsp;<b>·请先输入商家的用户名和登陆密码。</b></td>
          </tr>
        </table>
    </div>      <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="5"></td>
        </tr>
        <tr>
          <td height="1" background="images/line.gif" ></td>
        </tr>
      </table>
      <div align="center">为保证图片打开速度，请将数码相机调为640*480象素进行拍摄，图片格式为：JPG、GIF，大小在200K以下。<br>
      </div>
      <table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td colspan="3"><img src="images/sjdl_01.gif" width="500" height="20"></td>
        </tr>
        <tr> 
          <td width="10"><img src="images/sjdl_02.gif" width="10" height="310"></td>
          <td width="480" align="left" background="images/sjdl_03.gif"><table width="300" border="0" cellspacing="5" cellpadding="0">
              <tr> 
                <td height="150" colspan="2"> <div align="center"> <font color="#FF0000">
                    <%
				  Response.Write rsErr  
				%>
                    </font> </div></td>
              </tr>
			  <form name="form1" method="post" action="?Login=OK">
              <tr> 
                <td width="110" height="25" align="right" class="p4">商家用户名：</td>
                <td width="175"><input name="UserName" type="text" id="UserName" size="20"></td>
              </tr>
              <tr> 
                <td height="25" align="right" class="p4">密　码：</td>
                <td><input name="UserPWD" type="password" id="UserPWD" size="20"></td>
              </tr>
              <tr> 
                <td colspan="2" align="center"><input type="submit" name="Submit" value="登录">
                  　 
                    <input type="button" name="Submit2" onClick="location.href='reginfo.asp'" value="申请加盟"></td>
              </tr>
			  </form>
            </table></td>
          <td width="10"><img src="images/sjdl_04.gif" width="12" height="310"></td>
        </tr>
        <tr> 
          <td colspan="3"><img src="images/sjdl_05.gif" width="500" height="20"></td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="../Include/CopyRight.htm" -->
</body>
</html>

