?? admin.asp
字號:
<!--#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> <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 + -