<%response.buffer=true%>
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=bbsinfo("bbsname")%></title>
<LINK 
href="css.css" type=text/css rel=stylesheet>
</head>
    
<body>
<!--#include file="top.asp"-->
<!--#include file="md5.asp"-->

<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="8" background="images/left.gif">&nbsp;</td>
    <td valign="top" bgcolor="#FFFFFF"> 
      <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
        <tr>
          <td><table width="100%" border="0" cellspacing="1" cellpadding="0">
              <tr> 
                <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td height=6></td>
                    </tr>
                  </table>
                  <table width="754" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td width=6 height=6><img src="images/index_2.gif" width="6" height="6"></td>
                            <td width="742" background="images/index_3.gif"></td>
                            <td width=6> <div align="right"><img src="images/index_1.gif" width="6" height="6"></div></td>
                          </tr>
                        </table>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td width=1 bgcolor="C6C3C4"></td>
                            <td height=6 bgcolor="FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="8">
                                <tr> 
                                  <td><img src="images/Order_26.gif" width="10" height="10"> 
                                    <a href="index.asp"><%=bbsinfo("bbsname")%></a> → 用户登陆</td>                                                                                    
                                </tr>                                                                                    
                              </table></td>                                                                                    
                            <td width=1 bgcolor="C6C3C4"></td>                                                                                    
                          </tr>                                                                                    
                        </table>                                                                                    
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">                                                                                    
                          <tr>                                                                                     
                            <td width=5 height=5><img src="images/left_data_4.gif" width="5" height="5"></td>                                                                                    
                            <td width="742" background="images/left_data_6.gif"></td>                                                                                    
                            <td width=5> <div align="right"><img src="images/left_data_5.gif" width="5" height="5"></div></td>                                                                                    
                          </tr>                                                                                    
                        </table></td>                                                                                    
                    </tr>                                                                                    
                  </table>                                                                                    
                  <br>                                                                                    
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">                                                                                    
                    <tr><form method='POST' name='login' action='chklogin.asp'>                                                                                
                      <td bgcolor="F4F4F4">                                                                                    
                        <table width="747" border="0" align="center" cellpadding="0" cellspacing="0">                                                                                    
                          <tr>                 
                            <td height='26' align='center' width="745">               
 <%comeurl=Replace(Request.Form("comeurl"),"'","''")              
if comeurl="" then              
comeurl=Request.ServerVariables("HTTP_REFERER")              
end if              
                
username=trim(Request.Form("username"))                
password=md5(Request.Form("password"))                
cookies=int(request.form("cookies"))                
                
set rs=conn.execute("select * from [member] where username='"&username&"'")                
if rs.eof and rs.bof then                
response.write"你的用户名或密码错误<br><a href='javascript:history.go(-1)'>返回重新登陆</a>"        
response.end                     
elseif password<>rs("password") then                 
response.write"你的用户名或密码错误<br><a href='javascript:history.go(-1)'>返回重新登陆</a>"          
response.end      
    
elseif rs("lock")=1 then                 
response.write"该帐号已被锁定<br><a href='javascript:history.go(-1)'>请联系管理员</a>"          
response.end              
else                 
response.write"登陆成功!<a href='index.asp'>进入论坛首页</a><br><meta http-equiv=refresh content=3;url="&comeurl&"><a href='"&comeurl&"'>"&comeurl&"</a>"                
name=rs("username")                
pass=rs("password")  
pic=rs("pic") 
         
Response.Cookies("esung")("username")=name                
Response.Cookies("esung")("password")=pass          
Response.Cookies("esung")("pic")=pic                   
Response.Cookies("esung")("Cookies")=Cookies                
if int(cookies)<>0 then                
Response.Cookies("esung").Expires=date+int(cookies)                
end if                
end if      
riqi=now()     
conn.execute("update member set zjdlsj='"&riqi&"' where username='"&username&"'")                
Set rs1 = Server.CreateObject("ADODB.Recordset")             
SQL1= "Select * from online where name='"&name&"'"             
rs1.open sql1, conn, 1, 3             
if rs1.eof then            
rs1.AddNew             
  rs1("name")=name             
  rs1("ip")=request.servervariables("remote_addr")             
  rs1("ltime")=now()             
  rs1.Update             
  else             
  end if            
%>                
                
                
</td>                
                          </tr>                
                        </table>                                                                                 
                      </td>                                                                                
                    </tr>                                                                                
                  </table>                                                                                
                                                                                                  
                </td>                                                                                
              </tr>                                                                                
            </table></td>                                                                                
        </tr>                                                                                
      </table>                                                            
      <!--#include file="down.asp"-->                                                                                
    </td>                                                                                
    <td width="8" background="images/right.gif">&nbsp;</td>                                                                                
  </tr>                                                                                
</table>                                                                                
</body>                                                                                
</html>                                                                                
