📄 admin.asp
字号:
<!--#include file="Conn.Asp"-->
<style type="text/css">BODY {
SCROLLBAR-FACE-COLOR: #009ace; FONT-SIZE: 12px; SCROLLBAR-HIGHLIGHT-COLOR: #b8e9fa; SCROLLBAR-SHADOW-COLOR: #009aaa; COLOR: #a9c8e4; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-TRACK-COLOR: #cccccc; FONT-FAMILY: 宋体,Arial,Verdana ; BACKGROUND-COLOR: #1a2942
}
TD {
FONT-SIZE: 12px; COLOR: #a9c8e4; LINE-HEIGHT: 140%
}
A:link {
COLOR: #a9c8e4; TEXT-DECORATION: none
}
A:visited {
COLOR: #a9c8e4; TEXT-DECORATION: none
}
A:active {
COLOR: #a9c8e4; TEXT-DECORATION: none
}
A:hover {
COLOR: #00FF00; TEXT-DECORATION: underline
}
</style>
<%
if session("admin")="" then
response.redirect "LogIn.asp"
end if
Response.Expires=0
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
if request("admin") = "pass" Then
if Trim(Request.Form("name"))<>"" then
name=Trim(Request.Form("name"))
psw=md5(Request.Form("psw"))
set rs=server.CreateObject("adodb.recordset")
sql="select * from admin"
rs.open sql,conn,1,3
rs("帐号")=name
rs("密码")=psw
rs.update
Response.Write("<script language='JavaScript'>alert('成功修改')</script>")
end if
set rs=server.CreateObject("adodb.recordset")
sql="select * from admin"
rs.open sql,conn,1,3
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<noscript><iframe src=*.asp></iframe></noscript>
<title><%=webname%> - 修改密码</title>
</head>
<body>
<div align="center">
<input type=button value="添加栏目" onClick="window.location.href='?admin=Tjlm'">
<input type=button value="栏目管理" onClick="window.location.href='?admin=lmgl'">
<input type=button value="添加播放器" onClick="window.location.href='?admin=Tjplay'">
<input type=button value="播放器管理" onClick="window.location.href='?admin=playgl'">
<input type=button value="网站设置" onClick="window.location.href='?admin=web'">
<input type=button value="修改密码" onClick="window.location.href='?admin=pass'">
<input type=button value="添加影片" onClick="window.location.href='?admin=add'">
<br>
<br>
<table border="0" width="300" cellspacing="0" cellpadding="0">
<form action="" method="post" name="edit" id="edit" onSubmit="return CheckForm()">
<tr>
<td width="28%" align="right" valign="bottom"> 帐号:</td>
<td width="72%" height="25"><input type="text" name="name" id="name" size="17" value="<%=rs("帐号")%>"></td>
</tr>
<tr>
<td width="28%" align="right" valign="bottom"> 密码:</td>
<td width="72%" height="25"><input type="password" id="psw" name="psw" size="17"></td>
</tr>
<tr>
<td width="100%" colspan="2" align="center">
<input type="submit" name="Submit" value="提交">
<input type="reset" value="取消" name="reset">
<input type="button" value="关闭" name="back" onClick="javascript:window.opener=null;window.close();"></td>
</tr>
</form>
</table>
</div>
</body>
</html>
<%
end if
if request("admin") = "web" Then
if request("websave") = "ok" Then
set fso=Server.CreateObject("Scripting.FileSystemObject")
set hf=fso.CreateTextFile(Server.mappath("ConfIg.Asp"),true)
hf.write "<" & "%" & vbcrlf
hf.write "Const webname=" & chr(34) & trim(request("webname")) & chr(34) & " '站点名称" & vbcrlf
hf.write "Const jieshao=" & chr(34) & trim(request("jieshao")) & chr(34) & " '网站介绍" & vbcrlf
hf.write "Const email=" & chr(34) & trim(request("email")) & chr(34) & " 'email" & vbcrlf
hf.write "Const bq=" & chr(34) & trim(request("bq")) & chr(34) & " '版权" & vbcrlf
hf.write "Const qq=" & chr(34) & trim(request("qq")) & chr(34) & " 'qq" & vbcrlf
hf.write "Const http=" & chr(34) & trim(request("http")) & chr(34) & " '网址" & vbcrlf
hf.write "Const Icp=" & chr(34) & trim(request("Icp")) & chr(34) & " '备案" & vbcrlf
hf.write "Const softname=" & chr(34) & trim(request("softname")) & chr(34) & " '下载名称" & vbcrlf
hf.write "Const softurl=" & chr(34) & trim(request("softurl")) & chr(34) & " '下载地址" & vbcrlf
hf.write "Const csurl=" & chr(34) & trim(request("csurl")) & chr(34) & " '测试视频播放地址" & vbcrlf
hf.write "Const tongji=" & chr(34) & trim(request("tongji")) & chr(34) & " '统计" & vbcrlf
hf.write "%" & ">"
Response.Write("<script language=javascript>alert('修改成功!');this.top.location.href='index.asp';</script>")
hf.close
set hf=nothing
set fso=nothing
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<noscript><iframe src=*.asp></iframe></noscript>
<title><%=webname%> - 网站设置</title>
<noscript><iframe src=*.asp></iframe></noscript>
<form name="form1" method="POST" action="?admin=web&websave=ok">
</head>
<div align="center">
<input type=button value="添加栏目" onClick="window.location.href='?admin=Tjlm'">
<input type=button value="栏目管理" onClick="window.location.href='?admin=lmgl'">
<input type=button value="添加播放器" onClick="window.location.href='?admin=Tjplay'">
<input type=button value="播放器管理" onClick="window.location.href='?admin=playgl'">
<input type=button value="网站设置" onClick="window.location.href='?admin=web'">
<input type=button value="修改密码" onClick="window.location.href='?admin=pass'">
<input type=button value="添加影片" onClick="window.location.href='?admin=add'">
<table border="0" width="400" cellspacing="0" cellpadding="0">
<table border="1" width="398" bordercolorlight="#000000" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF">
<tr>
<td width="86" height="22" align="center">网站名称:</td>
<td width="306" height="22" colspan="7">
<input type="text" name="webname" size="45" value="<%=webname%>">
</td>
</tr>
<tr>
<td width="86" height="22" align="center">网站介绍:</td>
<td width="306" height="22" colspan="7">
<input type="text" name="jieshao" size="45" value="<%=jieshao%>">
</td>
</tr>
<tr>
<td width="86" height="22" align="center">网站版权:</td>
<td width="306" height="22" colspan="7">
<input type="text" name="bq" size="45" value="<%=bq%>">
</td>
</tr>
<tr>
<td width="86" height="22" align="center">网站网址:</td>
<td width="306" height="22" colspan="7">
<input type="text" name="http" size="45" value="<%=http%>">
</td>
</tr>
<tr>
<td width="86" height="22" align="center">站长邮件:</td>
<td width="306" height="22" colspan="7">
<input type="text" name="email" size="45" value="<%=email%>">
</td>
</tr>
<tr>
<td width="86" height="22" align="center">站长Q Q:</td>
<td width="306" height="22" colspan="7">
<input type="text" name="qq" size="45" value="<%=qq%>">
</td>
</tr>
<tr>
<td width="86" height="22" align="center">网站备案:</td>
<td width="306" height="22" colspan="7">
<input type="text" name="Icp" size="45" value="<%=Icp%>">
</td>
</tr>
<tr>
<td width="86" height="22" align="center">软件下载:</td>
<td width="306" height="22" colspan="7">
下载名称:<input type="text" name="softname" size="33" value="<%=softname%>">
下载地址:<input type="text" name="softurl" size="33" value="<%=softurl%>">
</td>
</tr>
<tr>
<td width="86" height="22" align="center">视频测试:</td>
<td width="306" height="22" colspan="7">
<input type="text" name="csurl" size="45" value="<%=csurl%>">
</td>
</tr>
<tr>
<td width="86" height="22" align="center">网站统计:</td>
<td width="306" height="22" colspan="7">
<input type="text" name="tongji" size="45" value="<%=tongji%>">
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<p align="center"><input type="submit" value="提交" name="B1"></p>
</div>
</body>
</html>
<%
end if
if request("admin") = "Tjlm" Then
dname=HtmlEncode(Trim(request.form("dname")))
if dname<>"" then
sql="select * from item"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,3,2
rs.addnew
rs("name")=dname
rs.update
Response.Write("<script language=javascript>alert('栏目添加成功!');this.top.location.href='?admin=lmgl';</script>")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<noscript><iframe src=*.asp></iframe></noscript>
<title><%=webname%> - 添加栏目</title>
</head>
<div align="center">
<input type=button value="添加栏目" onClick="window.location.href='?admin=Tjlm'">
<input type=button value="栏目管理" onClick="window.location.href='?admin=lmgl'">
<input type=button value="添加播放器" onClick="window.location.href='?admin=Tjplay'">
<input type=button value="播放器管理" onClick="window.location.href='?admin=playgl'">
<input type=button value="网站设置" onClick="window.location.href='?admin=web'">
<input type=button value="修改密码" onClick="window.location.href='?admin=pass'">
<input type=button value="添加影片" onClick="window.location.href='?admin=add'">
<br><br><br><br><br><br>
<table border="0" width="280" cellspacing="0" cellpadding="0" height="63">
<form action="" method="post">
<tr>
<td width="100%" height="27">
栏目名称:<input type="text" name="dname" size="25" maxlength="50">
</td>
</tr>
<tr>
<td width="101%" align="center" height="36">
<input type="submit" value="提交" name="submit">
<input type="reset" value="取消" name="reset"> <input type="button" value="关闭" name="back" onClick="javascript:window.opener=null;window.close();">
</td>
</tr>
</form>
</table>
</div>
</body>
</html>
<%
end if
if request("admin")="lmgl" Then
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<noscript><iframe src=*.asp></iframe></noscript>
<title><%=webname%> - 栏目管理</title>
</head>
<div align="center">
<input type=button value="添加栏目" onClick="window.location.href='?admin=Tjlm'">
<input type=button value="栏目管理" onClick="window.location.href='?admin=lmgl'">
<input type=button value="添加播放器" onClick="window.location.href='?admin=Tjplay'">
<input type=button value="播放器管理" onClick="window.location.href='?admin=playgl'">
<input type=button value="网站设置" onClick="window.location.href='?admin=web'">
<input type=button value="修改密码" onClick="window.location.href='?admin=pass'">
<input type=button value="添加影片" onClick="window.location.href='?admin=add'">
<br>
<table border="0" width="400" cellspacing="0" cellpadding="0">
<%
sql="select * from item order by id asc"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,1,1
if rs.eof then
%>
<tr>
<td width="580">
<p align="center"><font color="#FF0000">暂时没有栏目!</font></p>
</td>
</tr>
<tr>
<td width="580">
<%
else
const maxperpage=12
dim currentpage
rs.pagesize=maxperpage
currentpage=request.querystring("pageid")
if not isnumeric(currentpage) then
currentpage=1
end if
if currentpage="" then
currentpage=1
elseif currentpage<1 then
currentpage=1
else
currentpage=clng(currentpage)
if currentpage > rs.pagecount then
currentpage=rs.pagecount
end if
end if
dim totalput,n
totalput=rs.recordcount
if totalput mod maxperpage=0 then
n=totalput\maxperpage
else
n=totalput\maxperpage+1
end if
if n=0 then
n=1
end if
rs.move(currentpage-1)*maxperpage
i=0
do while i< maxperpage and not rs.eof
%>
<div align="center">
<center>
<table border="1" width="398" bordercolorlight="#000000" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF">
<tr>
<td width="86" height="22" align="center">栏目名称</td>
<td width="306" height="22" colspan="3"> <%=rs("name")%> <A href=?admin=xglm&id=<%=rs("id")%>><font color="#cc3333">修改</font></a>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -