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

📄 admin.asp

📁 本程序采用花香内核
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#include file="inc/config.asp"-->
<!--#include file="mdb.asp"-->
<!--#include file="inc/md5.asp"-->
<%
dim adminname
dim adminpwd
if request.QueryString("action")="search" then
	dim word,engine
	word = request.Form("word")
	engine = request.Form("search")
	Select case engine
		case "3721"
			response.Redirect("http://cns.3721.com/cns.dll?name="&word)
			response.End()
		case "google"
			response.Redirect("http://www.google.com/search?q="&word&"&hl=zh-CN&lr=lang_zh-CN&ie=gb2312")
			response.End()
		case "baidu"
			response.Redirect("http://www.baidu.com/baidu?word="&word)
			response.End()
		case "sina"
			response.Redirect("http://search.sina.com.cn/cgi-bin/search/search.cgi?ss=sina&_searchkey="&word)
			response.End()
	end select
end if
if request("action")="adminlogin" then
       s=Trim(Request.Form("s"))
	   s2=Request.Form("s2")
	   If s2<>s Then
	   	   Response.Write("<script language=javascript>alert('请输入正确的认证码!');this.location.href='admin.asp';</script>")
		   Response.End
	   end if
thesoft=Request.ServerVariables("HTTP_USER_AGENT")
if instr(thesoft,"Windows NT 5.0") then
	vOS="Win 2000"
elseif instr(thesoft,"Windows NT 5.1") then
	vOs="Win XP"
elseif instr(thesoft,"Windows NT") then
	vOs="Win NT"
elseif instr(thesoft,"Windows 9") then
	vOs="Win 9x"
elseif instr(thesoft,"unix") or instr(thesoft,"linux") or instr(thesoft,"SunOS") or instr(thesoft,"BSD") then
	vOs="类Unix"
elseif instr(thesoft,"Mac") then
	vOs="Mac"
else
	vOs="Other"
end if
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
Response.Write("<script language=javascript>alert('你提交的路径有误,禁止从站点外部提交数据请不要乱该参数!');this.location.href='admin.asp';</script>") 
response.end
end if
Function ReplaceBadWord(g_word)
  g_word=Replace(g_word,"'","")
  g_word=Replace(g_word," ","")
  g_word=Replace(g_word,"&","")
  g_word=Replace(g_word,"(","")
  g_word=Replace(g_word,"\","")
  g_word=Replace(g_word,"/","")
  g_word=Replace(g_word,"..","")
  g_word=Replace(g_word,"^","")
  g_word=Replace(g_word,"#","")
  g_word=Replace(g_word,"%","")
  g_word=Replace(g_word,"|","")
  g_word=Replace(g_word,";","")
  g_word=Trim(Replace(g_word,")",""))  
  ReplaceBadWord=g_word
End Function
adminname=ReplaceBadWord(Request.form("adminname"))
adminpwd=Md5(ReplaceBadWord(Request.form("adminpwd")))
if adminname="" and adminpwd="" then
	   	   Response.Write("<script language=javascript>alert('请输入用户名或密码!');this.location.href='admin.asp';</script>")
		   Response.End
end if
sql="select * from admin where admin_name='"&adminname&"' and admin_password='"&adminpwd&"'"
set rs=conn.execute(sql)
if rs.eof and rs.bof then
   rs.close
   set rs=nothing
	   	   Response.Write("<script language=javascript>alert('您输入的用户名和密码不正确!!');this.location.href='admin.asp';</script>")
   set rs1=Server.Createobject("adodb.recordset")
   sql1="Select * from Log"
   rs1.open sql1,conn,3,3
   rs1.addnew
   rs1("Username")=Request.Form("adminname")
   rs1("LoginIP")=request.ServerVariables("Remote_Addr")
   rs1("OS")=vOS
   rs1("ErrorPas")=Request.Form("adminpwd")
   rs1("Result")="Error"
   rs1.update
   rs1.close
   elseif rs("lock")=1 then
		response.Write"<script language=javascript>alert(' 错误:帐号 "&rs("admin_name")&" 已被锁定,你不能登陆!请联系站长。');this.location.href='admin.asp';</script>"
else
   response.cookies("hxStudioUserName")=rs("admin_Name")
   session("adminlogin")=sessionvar
   session("issuper")=rs("admin_id")
   session.timeout=500
   Session("hxStudioAdminName")=rs("admin_Name")
   Session("hxStudioAdminDj")=rs("dj")
   Session("hxStudioAdminAdmin")=rs("admin")
   Session("hxType")=rs("type")
   set rs1=Server.Createobject("adodb.recordset")
   sql1="Select * from Log"
   rs1.open sql1,conn,3,3
   rs1.addnew
   rs1("Username")=Request.Form("adminname")
   rs1("LoginIP")=request.ServerVariables("Remote_Addr")
   rs1("OS")=vOS
   rs1.update
   rs1.close
   rs.close
   set rs=nothing
end if
elseif request("action")="logout" then
  Session("hxStudioAdminName")  =""
  Session("hxStudioAdminDj")=""
  session("adminlogin")=""
  session("issuper")=""
  Response.write "<script>window.document.location.href='./admin.asp';</script>"
end if
if session("adminlogin")=sessionvar then
frame=request("frame")
if frame="" then
%>
<html>
<head>
<title>∷ 管理中心 ∷</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<frameset rows='*' id='Frame' cols='185,*' framespacing='0' frameborder='no' border='0'><frame src='?frame=menu' scrolling='auto' id='menu' name='menu' noresize marginwidth='5' marginheight='5'><frame src='?frame=main' name='main' id='main' scrolling='auto' noresize marginwidth='0' marginheight='0'></frameset>
 <noframes>
 <body>
  <p>本页使用了框架结构,但是您的浏览器不支持它。请将您的浏览器升级为IE5.0或更高的版本!</p>
 </body>
 </noframes>
</html>
<%elseif frame="menu" then%>
<!--#include file="check.asp"-->
<html>
<head>
<title>管理菜单</title>
<style type=text/css>
body  { background:#799AE1; font:Verdana 12px; 
SCROLLBAR-FACE-COLOR: #799AE1; SCROLLBAR-HIGHLIGHT-COLOR: #799AE1; 
SCROLLBAR-SHADOW-COLOR: #799AE1; SCROLLBAR-DARKSHADOW-COLOR: #799AE1; 
SCROLLBAR-3DLIGHT-COLOR: #799AE1; SCROLLBAR-ARROW-COLOR: #FFFFFF;
SCROLLBAR-TRACK-COLOR: #AABFEC;
}
table  { border:0px; }
td  { font:normal 12px 宋体;}
img  { vertical-align:bottom; border:0px; }
a  { font:normal 12px 宋体; color:#000000; text-decoration:none; }
a:hover  { color:#428EFF;text-decoration:underline; }
.sec_menu  { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#D6DFF7; }
.menu_title  { }
.menu_title span  { position:relative; top:0px; left:8px; color:#000000; font-weight:bold; }
.menu_title2  { }
.menu_title2 span  { position:relative; top:0px; left:8px; color:#999999; font-weight:bold; }
</style>
<SCRIPT language=javascript1.2>
function showmenu_item(sid)
{
	which = eval("menu_item" + sid);
	if (which.style.display == "none")
	{
		var i = 1
		while(i<13){
			eval("menu_item"+ i +".style.display=\"none\";");
			eval("menuTitle"+ i +".background=\"img/title_bg_show.gif\";");
			i++;
		}
		eval("menu_item" + sid + ".style.display=\"\";");
		eval("menuTitle"+ sid + ".background=\"img/title_bg_hide.gif\";")
	}else{
		eval("menu_item" + sid + ".style.display=\"none\";");
		eval("menuTitle"+ sid + ".background=\"img/title_bg_show.gif\";")
	}
}
</SCRIPT>
  <table width="158" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="158" height="38" background="img/title.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="151" height="16"></td>
        </tr>
        <tr>
          <td><div align="center"><font color="#FFFFFF"><strong>控制面版</strong></font></div></td>
        </tr>
      </table></td>
    </tr>
    <tr>
      
    <td height="25" class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; background=img/title_bg_quit.gif bgcolor="#7898E0"><span>&nbsp;<a href="?frame=main" target="main"><strong>管理首页</strong></a> 
      | <a href="?action=logout" target="_top"><strong>退出</strong></a></span></td>
    </tr>
    <tr>
    <td><div class=sec_menu style="width:158"><table width="97%"  border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="10"></td>
            </tr>
            <tr>
            <td height="20"><img src="img/bullet.gif" width="15" height="20" align="absmiddle">帐号:<strong><%=hxStudioAdminName%></strong></td>
            </tr>
            <tr>
            <td height="20"><img src="img/bullet.gif" width="15" height="20" align="absmiddle">等级:<strong><font color="#FF0000"><%
    if hxStudioAdminDj=1 then response.write "栏目管理员"
    if hxStudioAdminDj=4 then response.write "超级管理员"
    %></font></strong></a></td>
            </tr>         
            <tr>
            <td height="20"><img src="img/bullet.gif" width="15" height="20" align="absmiddle"><a href="admin_main.asp" target="main"><strong>查看权限□修改密码</strong></a></td>
            </tr>
     </table></div>
     </td>
    </tr>
  </table>
  <br>
  <table cellpadding=0 cellspacing=0 width=158>
    <tr>
      
    <td height=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; background="img/title_bg_show.gif" id=menuTitle1 onclick="showmenu_item(1)"><span>基本设置</span> 
    </td>
    </tr>
    <tr>
      <td style="display:none;" id='menu_item1'><div class=sec_menu style="width:158">
          <table width="97%"  border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="4"></td>
            </tr>
            <tr>
              <td height="20"><img src="img/bullet.gif" alt width="15" height="20" border="0" align="absmiddle"><a href="admin_config.asp" target=main>网站设置</a> | <a href="admin_copyright.asp" target="main">版权信息</a></td>
            </tr>
            <tr>
              <td height="20"><img src="img/bullet.gif" width="15" height="20" align="absmiddle"><a href="book.asp" target=book>留言管理</a> | <a href="admin_admin.asp?action=recount" target=main>首页更新</a></td>
            </tr>
            <tr>
              <td height="20"><img src="img/bullet.gif" alt width="15" height="20" border="0" align="absmiddle"><a href="admin_diary.asp" target="main">公告管理</a> | <a href="admin_diary.asp?action=newdiary" target="main">新添公告</a></td>
            </tr>
            <tr>
              <td height="20"><img src="img/bullet.gif" width="15" height="20" align="absmiddle"><a href="admin_vote.asp?action=vote" target="main">投票管理</a> | <a href="admin_vote.asp?action=newvote" target="main">新添投票</a></td>
            </tr>
            <tr>
              <td height="20"><img src="img/bullet.gif" width="15" height="20" align="absmiddle"><a href="admin_count.asp" target="main">计数管理</a> | <a href="admin_ad.asp" target="main">广告管理</a></td>
            </tr>
          </table>
      </div>
          <div  style="width:158">
            <table cellpadding=0 cellspacing=0 align=center width=135>
              <tr>
                <td height=20></td>
              </tr>
            </table>
        </div></td>

⌨️ 快捷键说明

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