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

📄 admin.asp

📁 后台登陆admin.asp
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#include file="mdb.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/md5.asp"-->
<%
dim adminname
dim adminpwd
if former_yes="1" then
   UserName=request.Cookies("HX_USER")("User_Name")
   former_names=split(former_name,"|")
   for z=0 to ubound(former_names)
       if instr(UserName,former_names(z))>0 then
          founderr=true
          exit for
       end if
   next
   if founderr<>true then
       Response.Write("<script language=javascript>alert('你没有登陆此页面的权限或无该页面。');this.location.href='index.asp';</script>")
   end if
end if
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="" OR 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")=adminname
   rs1("LoginIP")=request.ServerVariables("Remote_Addr")
   rs1("OS")=vOS
   rs1("ErrorPas")=ReplaceBadWord(Request.form("adminpwd"))
   rs1("Result")="Error"
   rs1.update
   rs1.close
   set rs1=nothing
   elseif rs("lock")=1 then
		response.Write"<script language=javascript>alert(' 错误:帐号 "&rs("admin_name")&" 已被锁定,你不能登陆!请联系站长。');this.location.href='admin.asp';</script>"
		   Response.End
else
   response.cookies("hxStudioUserName")=rs("admin_Name")
   session("adminlogin")=sessionvar
   session("issuper")=rs("admin_id")
   session.timeout=500
   Session("CheckCode")=""
   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")=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">
<STYLE>.navPoint {
	COLOR: white; CURSOR: hand; FONT-FAMILY: Webdings; FONT-SIZE: 9pt
}
P {
	FONT-SIZE: 9pt
}
</STYLE>
<SCRIPT>
function switchSysBar(){
	if (switchPoint.innerText==3){
		switchPoint.innerText=4
		document.all("frmTitle").style.display="none"
	}
	else{
		switchPoint.innerText=3
		document.all("frmTitle").style.display=""
	}
}
</SCRIPT>
</HEAD>
<BODY scroll=no style="MARGIN: 0px">
<frameset rows='*' id='Frame' cols='165,*' framespacing='0' frameborder='no' border='0'>
<TABLE border=0 cellPadding=0 cellSpacing=0 height="100%" width="100%">
  <TBODY>
  <TR>
    <TD align=middle id=frmTitle noWrap vAlign=center name="frmTitle">
       <IFRAME scrolling=auto frameBorder=0 id='menu' name='menu' src='?frame=menu' style="HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 175; Z-INDEX: 2"></IFRAME>
    </TD>
    <TD bgColor=#1B70C4 onclick=switchSysBar() style="WIDTH: 10pt">
       <SPAN class=navPoint id=switchPoint title=关闭/打开左栏>3</SPAN>
    </TD>
    <TD style="WIDTH: 100%">
       <IFRAME frameBorder=0 id='main' name='main' scrolling=yes src='?frame=main' style="HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 100%; Z-INDEX: 1"></IFRAME>
    </TD>
  </TR>
  </TBODY>
</TABLE>
</frameset>
<noframes>
 <body>
  <p>本页使用了框架结构,但是您的浏览器不支持它。请将您的浏览器升级为IE5.0或更高的版本!</p>
 </body>
</noframes>
</BODY></HTML>
<%elseif frame="menu" then%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理菜单</title>
<style type="text/css"> 
body{FONT-SIZE: 12px;COLOR: #000000; FONT-FAMILY: "宋体";background-color: #799AE1;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;}
.menutitle{ cursor:pointer; margin-bottom: 0px; background-image=url(img/menu_1.gif);color:#FFFFFF; width:158px; padding:0px; text-align:center; font-weight:bold; border:0px ; }}
.submenu{ margin-bottom: 0em; }
.cn { FONT-SIZE: 9pt; COLOR: #006599; FONT-FAMILY: 宋体 }
TD{ font-family:宋体; font-size: 12px; line-height: 15px;}
a  { font:normal 12px 宋体; color:#000000; text-decoration:none; }
a:hover  { color:#428EFF;text-decoration:underline; }
</style>
<script language="javascript" type="text/javascript">
if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function killErrors() {
return true;
}
window.onerror = killErrors;
</script>
</head>
<BODY leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<div id="masterdiv">
<TABLE width="158" cellSpacing="0" cellPadding="0" border="0" background="img/menu_1.gif" height=60>
<tr>
  <td><a href="?frame=main" target="main"><img src="img/left_fold1.gif" alt="" border="0"> 管理首页</a></td>
  <td><a href="?action=logout" target="_top"><img src="img/left_fold1.gif" alt="" border="0"> 安全退出</a></td>
</tr>
</table>
<TABLE width="158" cellSpacing="0" cellPadding="0" border="0">
<TR>
   <TD bgColor="#ffffff" height="1"></TD>
</TR>
<TR>
   <TD height="5" background="img/menu_1.gif"></TD>
</TR>
</TABLE>
    <div class="menutitle" onClick="SwitchMenu('sub0')"><img src="img/left_fold1.gif" alt="" border="0"> 个人信息
	<TABLE width="158" cellSpacing="0" cellPadding="0" border="0">
	  <TR>
	    <TD height="5"></TD>
	  </TR>
	  <TR>
	     <TD bgColor="#ffffff" height="1"></TD>
	  </TR>
	 </TABLE>
     </div>
     <span class="submenu" id="sub0">
	<TABLE cellSpacing="0" cellPadding="0" width="158" background="img/menu_2.gif" border="0">
	  <TR>
	     <td width="15%"></td><TD height=25 width="85%"><img src="img/left_fold2.gif" alt="" border="0"> 帐号:<strong><%=Session("hxStudioAdminName")%></strong></TD>
	  </TR>
	  <TR>
	     <td width="15%"></td><TD height=25 width="85%"><img src="img/left_fold2.gif" alt="" border="0"> 等级:<strong><font color="#FF0000"><%
    if Session("hxStudioAdminDj")=1 then response.write "栏目管理员"
    if Session("hxStudioAdminDj")=4 then response.write "超级管理员"
    %></font></strong></TD>
	  </TR>
	  <TR>
	     <td width="15%"></td><TD height=25 width="85%"><a target="main" href=admin_main.asp><img src="img/left_fold2.gif" alt="" border="0"> 查看权限\修改密码</a></TD>
	  </TR>
         </table>
     </span>
        <TABLE width="158" cellSpacing="0" cellPadding="0" border="0">
	  <TR>
	     <TD height="5" background="img/menu_1.gif"></TD>
	 </TR>
       </TABLE>

    <div class="menutitle" onClick="SwitchMenu('sub1')"><img src="img/left_fold1.gif" alt="" border="0"> 基本设置
       <TABLE width="158" cellSpacing="0" cellPadding="0" border="0">
         <TR>
           <TD height="5"></TD>
         </TR>
         <TR>
           <TD bgColor="#ffffff" height="1"></TD>
         </TR>
       </TABLE>
    </div>
    <span class="submenu" id="sub1">
	<TABLE cellSpacing="0" cellPadding="0" width="158" background="img/menu_2.gif" border="0">
	  <TR>
	     <td width="25%"></td><TD height=25 width="75%"><a target="main" href=admin_config.asp><img src="img/left_fold2.gif" alt="" border="0"> 基本设置</a></TD>
	  </TR>
	  <TR>
	     <td width="25%"></td><TD height=25 width="75%"><a target="main" href=admin_admin.asp?action=recount><img src="img/left_fold2.gif" alt="" border="0"> 首页更新</a></TD>
	  </TR>
	  <TR>
	     <td width="25%"></td><TD height=25 width="75%"><a href="admin_count.asp" target="main"><img src="img/left_fold2.gif" alt="" border="0"> 计数管理</a></TD>
	  </TR>
	  <TR>
	     <td width="25%"></td><TD height=25 width="75%"><a target="main" href="admin_email.asp"><img src="img/left_fold2.gif" alt="" border="0"> 发送邮件</a></TD>
	  </TR>
	  <TR>
	     <td width="25%"></td><TD height=25 width="75%"><a href="admin_book.asp" target="main"><img src="img/left_fold2.gif" alt="" border="0"> 留言管理</a></TD>
	  </TR>
	  <TR>
	     <td width="25%"></td><td height="2" bgcolor="#4685CA"></TD>
	  </TR>
	  <TR>
	     <td width="25%"></td><TD height=25 width="75%"><a target="main" href="admin_diary.asp"><img src="img/left_fold2.gif" alt="" border="0"> 公告管理</a></TD>
	  </TR>
	  <TR>
	     <td width="25%"></td><TD height=25 width="75%"><a target="main" href="admin_diary.asp?action=newdiary"><img src="img/left_fold2.gif" alt="" border="0"> 新添公告</a></TD>
	  </TR>
	  <TR>
	     <td width="25%"></td><td height="2" bgcolor="#4685CA"></TD>
	  </TR>
	  <TR>
	     <td width="25%"></td><TD height=25 width="75%"><a target="main" href="admin_vote.asp?action=vote"><img src="img/left_fold2.gif" alt="" border="0"> 投票管理</a></TD>
	  </TR>
	  <TR>
	     <td width="25%"></td><TD height=25 width="75%"><a target="main" href="admin_vote.asp?action=newvote"><img src="img/left_fold2.gif" alt="" border="0"> 新添投票</a></TD>
	  </TR>
	  <TR>

⌨️ 快捷键说明

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