<!--#include file="../conn.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 setting where adminname='"&username&"'"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.Write("<script language=JavaScript>alert('没有这个用户.')</script>")
else
if password<>rs("adminpass") then
response.Write("<script language=JavaScript>alert('密码错误.')</script>")
else
username=rs("username")
session("admin")=adminname
response.Redirect("main.asp")
end if
end if
rs.close
end if
if Trim(Request.QueryString("ation"))="tui" then
session("admin")=""
end if
%>

<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>日记人 www.rijiren.com — 日记·分享你我的心情-网络日记</title>
<meta name="keywords" content="日记,日记,日记,日记,日记,免费,免费,免费,免费,日记,心情日记,网络日记,免费日记,隐私日记,交换日记,粉可爱留言本、日记本申请">
<link href="images/style.css" rel="stylesheet" type="text/css">
<script src="../img/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 topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0">
<table border="0" width="100%" id="table2" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td valign="top" height="100">&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td valign="top" height="0">&nbsp; </td>
    <td> 
      <table border="0" width="100%" id="table6" cellspacing="0" cellpadding="0" height="100%">
        <tr> 
          <td height="40">　</td>
        </tr>
        <tr> 
          <td> 
            <div align="center"> 
              <form language="javascript"  name="regform" method="post" action="index.asp?ation=log" onSubmit="return CheckForm()">
                <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"><b><font color="#FF3300">日记本管理员登陆</font></b>
                    </td>
                  </tr>
                  <tr> 
                    <td height="19" width="245" colspan="2">　 
                      <%if request.QueryString("action=err") then response.write("<font color=#FF0000>对不起，你还没有登陆，请登陆！ </font>")%>
                    </td>
                  </tr>
                  <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="30">
                    </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="30">
                    </td>
                  </tr>
                  <tr> 
                    <td width="245" colspan="2" height="39"> 
                      <p align="center"> 
                        <input type="submit" name="Submit" value=" 登 陆 ">
                        &nbsp;&nbsp; 
                        <input type="button" name="back" onclick="location.href='/index.asp'" value=" 首 页 ">
                    </td>
                  </tr>
                  <tr> 
                    <td width="245" colspan="2">　</td>
                  </tr>
                </table>
              </form>
            </div>
          </td>
        </tr>
        <tr> 
          <td>　</td>
        </tr>
      </table>
    </td>
    <td>&nbsp; </td>
  </tr>
</table>
</body>

</html>
