📄 admin.asp
字号:
<%
Response.Buffer = True
if session("chatadmin")="" then
response.write "<script Language=JavaScript>{window.alert('对不起,你不是管理员!');}</script>"
response.end
end if
n=Year(date())
y=Month(date())
r=Day(date())
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(y)=1 then y="0" & y
if len(r)=1 then r="0" & r
sj=n & "-" & y & "-" & r
zj = Request.QueryString("zj")
zj = Replace(zj, ".", "")
zj = Replace(zj, "/", "")
zj = Replace(zj, "\", "")
zj = Replace(zj, "?", "")
zj = Replace(zj, ":", "")
zj = Replace(zj, "|", "")
zj = Replace(zj, Chr(34), "")
%>
<%
if request("action")="tiren" then
name=request("name")
liyou=request("liyou")
on error resume next
set conn=server.createobject("adodb.connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("dachat.asp")
conn.open connstr
set rs=conn.execute("select admin from [user] where name='"&name&"'")
if rs(0)=True or name=session("netname") then
response.write "<script Language=JavaScript>{window.alert('对不起,不能踢自己或管理员!');window.history.go(-1);}</script>"
response.end
else
Application.lock
Application("onlinelist")=replace(Application("onlinelist"),name&" ","")
Application.Unlock
saystr="parent.getmsg('"&name&"','大家','对','<font color=#ff0000>【系统提示】</font>【"&name&"】因为"&liyou&"被管理员踢出聊天室!','2','AA00CC','AA00CC','0','"&time()&"'); "
Application.Lock
sd=Application("chat_sd")
line=int(Application("chat_line"))
Application("chat_line")=line+1
Dim newsd(50)
j=1
for i=3 to 50 step 2
newsd(j)=sd(i)
newsd(j+1)=sd(i+1)
j=j+2
next
newsd(49)=line+1
newsd(50)=SayStr
Application("chat_sd")=newsd
Application.UnLock
response.write "<script Language=JavaScript>{window.alert('踢人成功!');window.location='admin.asp';}</script>"
response.end
end if
end if
if request("action")="adm" then
name=request("name")
if name="毒爱" then
response.write "<script Language=JavaScript>{window.alert('我靠,他是超级管理员啊!');window.history.go(-1);}</script>"
response.end
end if
on error resume next
set conn=server.createobject("adodb.connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("dachat.asp")
conn.open connstr
set rs=conn.execute("select admin from [user] where name='"&name&"'")
if rs.eof and rs.bof then
response.write "<script Language=JavaScript>{window.alert('对不起,没有这样的用户!');window.history.go(-1);}</script>"
response.end
elseif rs(0)=True then
conn.execute("update [user] set admin=False where name='"&name&"'")
elseif rs(0)=False then
conn.execute("update [user] set admin=True where name='"&name&"'")
end if
response.write "<script Language=JavaScript>{window.alert('设定成功!');window.location='admin.asp';}</script>"
response.end
end if
%>
<html>
<head>
<title>管理系统</title>
<meta http-equiv='content-type' content='text/html; charset=gb2312'>
<script>
function no_newwin(){
if((event.ctrlKey)&&(event.keyCode==78)){
event.keyCode=0;
event.returnValue=false;
}
}
function click()
{
return false;
}
document.oncontextmenu=click;
document.onmousemove=click;
document.ondragstart=doDragStart
function doDragStart() {event.returnValue=false}
var winbgcolor = parent.cbg();
var winbgimage = parent.cbi();
document.writeln("<body bgcolor=" + winbgcolor + " background=" + winbgimage + " bgproperties=fixed topmargin=3>");
</script>
<style type="text/css">
A:visited{TEXT-DECORATION: none;Color:#000000}
A:active{TEXT-DECORATION: none;Color:#000000}
A:hover{TEXT-DECORATION: underline;Color:#000000}
A:link{text-decoration: none;Color:#000000}
.t{LINE-HEIGHT: 1.4}
BODY{FONT-FAMILY: "宋体"; FONT-SIZE: 12px;
}
TD,p,div,br{FONT-FAMILY: "宋体"; FONT-SIZE: 12px;Color:#000000;}
FORM{FONT-FAMILY: "宋体"; FONT-SIZE: 12px}
OPTION{FONT-FAMILY: "宋体"; FONT-SIZE: 12px}
INPUT{BORDER-TOP-WIDTH: 1px; PADDING-RIGHT: 1px; PADDING-LEFT: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE: 9pt; BORDER-LEFT-COLOR: #cccccc; BORDER-BOTTOM-WIDTH: 1px; BORDER-BOTTOM-COLOR: #cccccc; PADDING-BOTTOM: 1px; BORDER-TOP-COLOR: #cccccc; PADDING-TOP: 1px; HEIGHT: 18px; BORDER-RIGHT-WIDTH: 1px; BORDER-RIGHT-COLOR: #cccccc; font-family: "宋体"; font-size: 12px}
textarea {border-width: 1; border-color: #000000; background-color: #efefef; font-family: "宋体"; font-size: 12px; font-style: bold;}
select {border-width: 1; border-color: #000000; background-color: #eeeeee; font-family: "宋体"; font-size: 12px; font-style: bold;}
</style>
</head>
<script>
var winbgcolor = parent.cbg();
var winbgimage = parent.cbi();
document.writeln("<body bgcolor=" + winbgcolor + " background=" + winbgimage + " bgproperties=fixed topmargin=3>");
</script>
<div align=center><font color="#FFFF00" style="font-size:12pt">管理系统</font></div>
<hr size=1 color=FFFF00>
<table border="0" width="100%">
<form method="post" action="admin.asp?action=tiren">
<tr>
<td>
<p><a href="javascript:history.go(0)" title="显示最新的在线列表"><font color="#FFFFFF">刷新:<%=sj%></font></a></p>
<p><font color="#FFFF00">踢人列表:</font><br>
<select name="name" size="9">
<option>------------</option>
<%
online=Application("onlinelist")
online=split(online," ")
for i=lbound(online) to ubound(online)-1
Response.Write "<option value="&online(i)&">"&online(i)&"</option>"
next
%>
</select>
</p>
<p><font color="#FFFF00">踢人理由:</font><br>
<input name="liyou" size="15" value="不守聊天室纪律">
</p>
<table border="0" cellpadding="4">
<tr>
<td>
<input type="submit" value="我踢" style="CURSOR:hand">
</td>
<td align="right">
<input type="reset" value="重写" style="CURSOR:hand">
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>
<table border="0" width="100%">
<form method="post" action="admin.asp?action=adm">
<tr>
<td>
<p><font color="#FFFF00">管理设定列表:</font><br>
<select name="name" size="9">
<option>------------</option>
<%
online=Application("onlinelist")
online=split(online," ")
for i=lbound(online) to ubound(online)-1
Response.Write "<option value="&online(i)&">"&online(i)&"</option>"
next
%>
</select>
</p>
<table border="0" cellpadding="4">
<tr>
<td><input type="submit" value="设 定" style="CURSOR:hand"></td>
</tr>
</table>
</td>
</tr>
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -