⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_index.asp

📁 网站 QCNEWS后台管理程序,风格流行功能强大
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<!--#include file="md5.asp"-->
<!----------------------------------------------

	Powered by QCDN_NEWS Version 1.4.3.10.6.0 (青创文章系统 - 测试版)
	个人免费版
	http://www.qcdn.net/
	此版本只能在个人网站使用并要求保留青创网络版权!

-------------------------------------------------->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="copyright" content="Copyright (C) 2001-2003 Jeff Jing" />
<title>管理首页</title>
<link href="image/style.css" rel="stylesheet" type="text/css">
</head>
<%
Dim Errmsg
Dim FoundErr
Select case Request("method")
case "login_left"
	Call login_left()
case "login_top"
	Call login_top()
case "login_right"
	Call login_right()
case "Login_in"
	Call Login_in()
case "CheckLogin"
	Call CheckLogin()
case "logout"
	Call logout()
case else
	Call login_main()
end Select

sub logout()
	session.Abandon
	response.write "<script>top.location.href='admin_index.asp'</script>"
End sub

Sub CheckLogin()

	if Trim(Request("verify"))="" or isnull(Request("verify")) then
		Errmsg = Errmsg+"<li>请输入附加码。<li><b>返回后请刷新登陆页面后重新输入正确的信息。</b>"
		FoundErr = true
	elseif session("verifycode")="" then
		Errmsg = Errmsg+"<br><li>请不要重复提交,如需重新登陆请返回登陆页面。<li><b>返回后请刷新登陆页面后重新输入正确的信息。</b>"
		FoundErr = true
	elseif Trim(Request("verify"))<>session("verifycode") then
		Errmsg = Errmsg+"<br><li>你输入的附加码和系统产生的不符。"
		FoundErr = true
	end if
	session("verifycode")=""

	if Trim(Request("username")) = "" or Trim(Request("password")) = "" then
		Errmsg = Errmsg+ "<br><li>请输入登陆用户名或密码。<li><b>返回后请刷新登陆页面后重新输入正确的信息。</b>"
		FoundErr = true
	else
		username = Qcdn.checkStr(Request("username"))
		password = Qcdn.checkStr(Request("password"))
		password = md5(password,16)
	end if

	if FoundErr then
		Call Qcdn.Err_List(Errmsg,2)
		exit sub
	end if
	
	IP = Request.ServerVariables("LOCAL_ADDR")

	Sql = "Select * from article_admin where username='"& username &"'"
	Set Rs = Conn.execute(Sql)
	if Rs.eof and Rs.bof then
		Rs.close
		Set Rs = nothing

		Errmsg = Errmsg+"<br><li>您输入的用户名和密码不正确或者您不是系统管理员。<li><b>返回后请刷新登陆页面后重新输入正确的信息。</b>"
		FoundErr = true
		Call Qcdn.Err_List(Errmsg,2)
		exit sub
	else
		if Trim(rs("password"))<>password then
			Errmsg = Errmsg+"<br><li>您输入的用户名和密码不正确或者您不是系统管理员。<li><b>返回后请刷新登陆页面后重新输入正确的信息。</b>"
			FoundErr = true
			Call Qcdn.Err_List(Errmsg,2)
			exit sub
		else
			Session("flag")=rs("flag")
			Session("Admin_Name")=username
			session.timeout=45
			sql = "update article_admin set LastLogin=Now(),LastLoginIP='"&IP&"' where username='"&username&"'"
			conn.execute(sql)
			rs.close
			set rs=nothing
			response.write "<script>top.location.href='admin_index.asp'</script>"
		end if
	end if
End Sub

Sub login_main()
if Session("flag")="" or Session("Admin_Name")="" then
	Call Login_in()
else
%>
<frameset cols="180,*" frameborder="NO" border="0" framespacing="0" rows="*"> 
  <frame name="leftFrame" scrolling="AUTO" noresize src="admin_index.asp?method=login_left" marginwidth="0" marginheight="0">

<frameset rows="64,*"  framespacing="0" border="0" frameborder="0" frameborder="no" border="0">
<frame src="admin_index.asp?method=login_top" name="head" scrolling="NO" NORESIZE frameborder="0" marginwidth="10" marginheight="0" border="no">
<%if Session("Admin_Name")="" or session("flag")="" then%>
  <frame name="main" src="admin_index.asp?method=Login_in" scrolling="AUTO" NORESIZE frameborder="0" marginwidth="10" marginheight="10" border="no">
<%else%>
  <frame name="main" src="admin_index.asp?method=login_right" scrolling="AUTO" NORESIZE frameborder="0" marginwidth="10" marginheight="10" border="no">
<%end if%>
</frameset>
</frameset>
<%
end if
End Sub

Sub Login_in()
	if Session("flag") = "" then
			dim num1
			dim rndnum
			Randomize
			Do While Len(rndnum)<4
			num1=CStr(Chr((57-48)*rnd+48))
			rndnum=rndnum&num1
			loop
			session("verifycode")=rndnum
%>
<BODY leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="#799AE1">
<br><br><br><form action="admin_index.asp" method=post> 
  <table width="413" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#EEEAD6">
    <tr>
      <td height="29" colspan="3" background="image/topbg.gif"> <table width="95%" align="right" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td align="left" valign="middle"><font color="#FFFFFF"><B>QCDN_NEWS 
              管理入口</B></font></td>
            <td width="8%" align="right"><a href="#" onclick="javascript:window.open('readme.htm','','width=640,height=300,left=100,top=10,scrollbars=yes')"><img src="image/help.gif" align="middle" border="0" alt="帮助文档"></a>&nbsp;</td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td width="3" background="image/link.GIF"></td>
      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="75" background="image/bgtop.gif" >
				      <table width="100%" height="75" border="0" cellpadding="0" cellspacing="0">
        <tr>
					
          <td width="30%" align="left" valign="bottom"> <font color="#FFFFFF"><img src="image/xpbg.gif" width="409"></td>
				</tr>
				</table>
			</td>
          </tr>
          <tr>
            <td><table width="95%" border="0" align="center">
	  
	  <tr><td>
	  <fieldset><legend accesskey="F" align="left">登陆窗口</legend> 
	          <table width="100%" border="0" cellspacing="2" cellpadding="2">
                <tr> 
				  <td width="10%">&nbsp;</td>
                  <td width="20%">用&nbsp;户&nbsp;名:</td>
                  <td><input type="text" name="username"></td>
                </tr>
                <tr> 
				<td width="10%">&nbsp;</td>
                  <td width="20%">密&nbsp;&nbsp;&nbsp;&nbsp;码:</td>
                  <td><input type="password" name="password">
                  </td>
                </tr>
			    <tr>
				  <td width="10%">&nbsp;</td>
                  <td>附&nbsp;加&nbsp;码:</td>
                  <td><input type="text" name="verify" size="10"> &nbsp;输入附加码<span style="background-color: #D0D0BF;line-height:200%"><font color=#000000><%=session("verifycode")%></font></span> 
                  </td>
                </tr>
                <tr> 
                  <td colspan="3" align="center"><input type="submit" name="submit" value=" 登 陆 " class="tbutton"></td>
                </tr>
              </table>
	  </fieldset> 
	  &nbsp;</td></tr>
	  </table></td>
          </tr>
        </table></td>
      <td width="3" background="image/link.GIF"></td>
    </tr>
	<tr><td height="3" background="image/linkbom.GIF" colspan="3"></td></tr>
  </table>  
  <input type="hidden" value="CheckLogin" name="method">
</form>
<%
	end if
End Sub

Sub login_left()
%>
<SCRIPT language=javascript1.2>
function showsubmenu(sid)
{
var obj1= "ss" + sid
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
document.all.item(obj1).src='image/hide.gif';
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
document.all.item(obj1).src='image/show.gif';
}
}

</SCRIPT>


<BODY leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="#799AE1">
<br>
<table cellpadding=0 cellspacing=0 width=158 align=center>
  <tr> 
    <td height=25 valign="middle" background="image/title.GIF" class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; ><span><font color="#FFFFFF">QCDN_NEWS 
      功能菜单</font></span> </td>
  </tr>
</table>
<table cellpadding=0 cellspacing=0 width=158 align=center>
  <tr> 
    <td width="134" height=25 valign="middle" background="image/bg.GIF" class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; > 
      <a href="admin_index.asp" target=_top><span>管理首页</span></a>&nbsp;&nbsp;<B>|</B><a href=admin_index.asp?method=logout target=_top><span>退出</span></a></td>
    <td width="25"><img src="image/quit.GIF" width="25" height="25"></td>
  </tr>
</table>
<br>
<%
if Session("flag") = 3 then
%>
<table cellpadding=0 cellspacing=0 width=158 align=center>
  <tr id=menuTitle1 onclick="showsubmenu(1)" style="cursor: hand"> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -