<!--#include file="../conn.asp" -->
<!--#include file="inc.asp" -->
<%
if Trim(Request.QueryString("ation"))="log" then
username=Trim(Request.Form("username"))
password=Trim(Request.Form("password"))
username=Trim(Replace(username,"'",""))
password=Trim(Replace(password,"'",""))
set rs=server.CreateObject("adodb.recordset")
sql="select * from diaryuser where username='"&username&"'"
rs.open sql,conn,1,3
if rs.eof then
response.Write("<script language=JavaScript>alert('没有这个用户.')</script>")
else
if password<>rs("password") then
response.Write("<script language=JavaScript>alert('密码错误.')</script>")
else
username=rs("username")
userid=rs("userid")
session("username")=username
session("userid")=userid
session("Password")=rs("Password")
session("photouserid")=userid
session("s0huuser")="yes"
session.timeout=200
ip=Request.ServerVariables("REMOTE_ADDR")
if rs("loginip")<>ip then
rs("lasttime")=rs("logintime")
rs("lastip")=rs("loginip")
rs("loginip")=ip
end if
rs("logintime")=Now()
rs.Update
rs.close
Response.Redirect diarydir&"mybook.asp"
end if
end if
end if
%>

<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>心情日记本·分享你我的心情</title>
<meta name="keywords" content="日记,日记,日记,日记,日记,免费,免费,免费,免费,日记,心情日记,网络日记,免费日记,隐私日记,交换日记,粉可爱留言本、日记本申请">
<link href="<%=alltubg%>css.css" rel="stylesheet" type="text/css">
<script src="<%=alltubg%>alt.js"></script>
<script language="JavaScript">
function CheckForm()
{
    if (document.regform.username.value.length == 0) {
		alert("请填写用户名.");
		document.regform.username.focus();
		return false;
	}

    if (document.regform.password.value.length == 0) {
		alert("请输入你的密码.");
		document.regform.password.focus();
		return false;
	}

}
</script>
</head>
<body background="<%=bgrnd%>" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0">
<table width="985" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td> <!--#include file="head.asp" -->
      <table width="985" border="0" cellspacing="0" cellpadding="0" height="452">
        <tr> 
          <td width="20">&nbsp;</td>
          <td height="452" background="<%=alltubg%>bg1.gif" width="703"> 
            <table width="703" border="0" cellspacing="0" cellpadding="0" height="452">
              <tr> 
                <td height="5" width="56"></td>
                <td width="288"></td>
                <td rowspan="3" width="21"></td>
                <td width="284"></td>
                <td width="57"></td>
              </tr>
              <tr> 
                <td height="380" width="56">&nbsp;</td>
                <td width="288"> <img border="0" src="<%=alltubg%>loing_img.jpg" width="275" height="355"></td>
                <td align="center">
                  
            <table border="0" width="245" id="table7" cellspacing="0" cellpadding="0" background="<%=alltubg%>loing.gif" height="274">
              <tr> 
                <td height="84" width="245" colspan="2">　</td>
              </tr>
              <tr> 
                <td height="19" width="245" colspan="2"> 
                  <p align="center"> <img border="0" src="<%=alltubg%>denlu.gif" width="103" height="16"> 
                </td>
              </tr>
              <tr> 
                <td height="19" width="245" colspan="2">　 
                  <%if request.QueryString("action=err") then response.write("<font color=#FF0000>对不起，你还没有登陆，请登陆！ </font>")%>
                </td>
              </tr>
              <form language="javascript"  name="regform" method="post" action="login.asp?ation=log" onSubmit="return CheckForm()">
                <tr> 
                  <td width="71" height="19"> 
                    <p align="right"><font color="#FF0000">账号:</font> 
                  </td>
                  <td width="174" height="19"> 
                    <input name="username" type="text" id="username3" size="18" maxlength="12">
                  </td>
                </tr>
                <tr> 
                  <td width="71" height="42"> 
                    <p align="right"><font color="#FF0000">密码:</font> 
                  </td>
                  <td width="174" height="42"> 
                    <input name="password" type="password" id="password" size="18" maxlength="12">
                  </td>
                </tr>
                <tr> 
                  <td width="245" colspan="2" height="39"> 
                    <p align="center"> 
                      <input type="submit" name="Submit" value=" 提 交 ">
                      &nbsp;<font color="#00ACF0"><u><a href="reg1.asp"><font color="#00ACF0">注册申请</font></a> <a href="../p/qqconnect/redirect.asp" target="_blank" ><img src="../p/qqcontect/qq_login.png"></a>
                      </u></font> 
                  </td>
                </tr>
                <tr> 
                  <td width="245" colspan="2">　</td>
                </tr>
              </form>
            </table>
                </td>
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td height="67">&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table>
          </td>
          <td width="272"> 
            <!--#include file="right.asp" -->
          </td>
        </tr>
      </table>
      <!--#include file="bottom.asp" -->
    </td>
  </tr>
  <tr> 
    <td></td>
  </tr>
</table>
</body>

</html>


