<%
if Session("m_UserID")="" then
%> 
<table width="170" height="92" border="0" align="center" cellpadding="0" cellspacing="0">
  <form action="chklogin.asp" method="post" name="loginFM" id="loginFM" onSubmit="checkReg(this)">
    <tr> 
      <td height="16" colspan="2"><a href="javascript:loginFM.submit()">
        <script language="JavaScript">
					function checkReg(theform){
						if(!CheckEmpty(theform.txtName,"用户名")) return false;
						if(!CheckEmpty(theform.txtPassWord,"密码")) return false;
					}
					</script>
        </a></td>
    </tr>
    <tr> 
      <td width="52" height="25" align="right">账 号：</td>
      <td width="120" height="25"><input name="txtName" type="text" id="txtName" size="15"></td>
    </tr>
    <tr> 
      <td height="26" align="right">密 码：</td>
      <td height="26"> <input name="txtPassWord" type="password" id="txtPassWord" size="15"></td>
    </tr>
    <tr align="center"> 
      <td height="40" colspan="2"><a href="javascript:loginFM.submit()"> <img src="images/login.gif" hspace="5" border="0" align="absmiddle"></a> 
        <a href="contract.asp"><img src="images/reg.gif" width="55" height="18" hspace="5" border="0" align="absmiddle"></a></td>
    </tr>
  </form>
</table>
<%
Else
%>
<table width="170" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="37%" height="30" align="right"><strong><font color="#FF0000">欢迎您，</font></strong></td>
    <td width="63%" height="30"><strong><%=Session("m_LoginName")%></strong></td>
  </tr>
  <tr align="center"> 
    <td height="30" colspan="2"><strong><font color="#006699">[</font><a href="logout.asp" style="color:#006699">退出登录</a><font color="#006699">][</font><a href="reginfo.asp" style="color:#006699">修改资料</a><font color="#006699">]</font></strong></td>
  </tr>
  <tr align="center"> 
    <td height="10" colspan="2">上次登录时间<br> <%
	strSQL="Select top 2 l_time From web_log Where m_id=" & Session("m_UserID") & " and l_event='登录网站' Order by id Desc"
	Set rs=Server.CreateObject("ADODB.RecordSet")
	rs.open strSQL,conn,1,1
	if rs.recordcount<=1 then
		response.Write("您是第一次登录")
	Else
		rs.movenext
		response.Write(rs("l_time"))
	End if
	rs.close
	%> </td>
  </tr>
</table>
<%
End if
%>


