<%
'=========================================================
'　　　　　　　　　　　飞　扬　网　络
' Copyright (C) 2003-2005 feiyang.Com. All Rights Reserved.
' Web: http://www.feiyang.com
' QQ: 99686532        E-mail: bgh_edu@126.com
'=========================================================
%>
<!--#include file="qqcf_conn.asp"-->
<!--#include file="qqcf_chkstr.asp"-->
<!--#include file="qqcf_myfunction.asp"-->
<!--#include file="qqcf_md5.asp"-->
<!--#include file="qqcf_getcookie.asp"-->
<%IF Request("Action")="login" Then%>
<!--#include file="QQCF_ChkSite.Asp"-->
<%

Admin=Request("Admin")
Password=Request("Password")
Cookies_Time=int(Request("Cookies_Time"))

IF Admin="" Then Call AlertBack("请输入管理员名称",1)
IF Password="" Then Call AlertBack("请输入管理员密码",1)

Set Rs = Server.CreateObject("ADODB.RecordSet")
Sql="Select * From WWW_QQCF_COM_Admin where Admin='"&Admin&"'"
rs.open sql,conn,1,1

IF Rs.eof and Rs.bof Then Call AlertBack("没有此管理员名称!",1)
IF Rs("Password")<>Password Then Call AlertBack("密码错误!",1)

Session("CfWZ_Admin")="ok"

 If Cookies_Time>0 Then
    Randomize
    Rannum=Int(90000000*rnd)+10000000
    CfWZ_Admin_Cookie=Rannum&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)
	CfWZ_Admin_Cookie=Md5(CfWZ_Admin_Cookie)
	
    Response.Cookies("CfWZ_Admin_Cookie")=CfWZ_Admin_Cookie
    Cookies_Time=dateadd("n",Cookies_Time,Now())
    Response.Cookies("CfWZ_Admin_Cookie").expires=Cookies_Time
	
   Sql="Update WWW_QQCF_COM_Admin Set Cookie='"&CfWZ_Admin_Cookie&"'"
   Conn.Execute Sql
 End If
Response.Redirect "QQCF_Admin_Manage.Asp"
End If%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><%=webtitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="qqcf_css/style.css" rel="stylesheet" type="text/css">
</head>

<body>
<%If Session("CfWZ_Admin")="ok" Then Response.Redirect "QQCF_Admin_Manage.Asp"%>
<!--#include file="QQCF_Top.Asp"-->
        <br>
        <table width="300" border="0" align="center" cellpadding="3" cellspacing="1" bordercolor="#00CCFF" bgcolor="#00CCFF">
          <tr bgcolor="#00CCFF"> 
            <td colspan="2"><div align="center">超级管理员入口：</div></td>
          </tr>
           <form name="form1" method="post" action="?action=login">
		   <tr bgcolor="#FFFFFF"> 
            <td width="291"><div align="right">用户：</div></td>
            <td width="715"><input name="admin" type="text" id="admin3" size="15"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td><div align="right">密码：</div></td>
            <td><input name="password" type="password" id="password4" size="15"></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">Cookies:</div></td>
            <td><select name="Cookies_time" id="Cookies_Time">
            <option value="0" selected>不保留</option>
            <option value="1440">保留一天</option>
            <option value="43200">保留一个月</option>
            <option value="15768000">保留一年</option>
          </select>
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td colspan="2"> <div align="center"></div>
              <div align="left"> 　　　　　　　 
                <input type="submit" name="Submit" value="确定">
                　
<input type="reset" name="Submit523" value="取消" onClick="javascript:history.go(-1)">
              </div></td>
          </tr></form>
</table>

<br>
<!--#include file="QQCF_Bottom.Asp"-->    
</body>
</html>
