📄 adminright4.asp
字号:
<!--#include file="AdminConn.asp"--><!--#include file="../inc/fun.asp"--><!--#include file="../inc/md5.asp"--><!--#include file="function.asp"-->
<%dim action,strt,i,lgname,lgpwd,lgpwdmd5,lguserid,sql,pass,name,userinfo,userinfo1,uinfo,styleid,pluginid,pluginlink,pluginname
lgname=replace(session(prefix&"lgname"),"'","''")
lgpwd=replace(session(prefix&"lgpwd"),"'","''")
if isnull(lgname) or lgname="" or isnull(lgpwd) or lgpwd="" then
response.redirect"admincheck.asp"
else
lgpwdmd5=md5(lgpwd)
if conn.execute("select top 1 bd from admin where name='"&lgname&"' and password='"&lgpwdmd5&"' and bd=0").eof then
response.redirect"admincheck.asp"
end if
end if
action=request.querystring("action")
select case action
case"sql","execute" strt="执行 SQL 语句"
case"style","addstyle","delstyle","editstyle","editstyleok" strt="论坛皮肤设置":application(prefix&"style")=""
case"plugin","addplugin","delplugin","editplugin","editpluginok" strt="论坛插件设置":application(prefix&"plugin")=""
case"delanyuser","deluser" strt="批量删除用户"
case"zl" strt="论坛整理"
case"changeinfo","userinfo","editinfo" strt="修改用户资料"
end select
sub send(str)
response.write"<table border=1 cellpadding=0 cellspacing=0 style='border-collapse: collapse' bordercolor=#F4F6FC width=100% bgcolor=#ffffff height=50><tr><td width=100% ><p style='margin:5px;line-height:150%'>"&str&"</p></td></tr></table>"
end sub
%>
<link rel=stylesheet type=text/css href=pic/css.css>
<STYLE type=text/css>
body { background:#555555; margin:0px; font-family: Verdana, Arial, sans-serif, 宋体; font-size: 9pt; text-decoration: none; color:#555555;
SCROLLBAR-FACE-COLOR: #55919A;
SCROLLBAR-HIGHLIGHT-COLOR: #cccccc;
SCROLLBAR-SHADOW-COLOR: #cccccc;
SCROLLBAR-3DLIGHT-COLOR: #cccccc;
SCROLLBAR-ARROW-COLOR: #555555;
SCROLLBAR-TRACK-COLOR: #555555;
SCROLLBAR-DARKSHADOW-COLOR: #cccccc;}
</style>
<body bgcolor="#D6DFF7" leftmargin="15" rightmargin="15">
<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%" id="table7" height="18" >
<tr>
<td align="right" height="40" background="../../images/admin_top_bg.gif"><div align="center"><font color="#ffffff">完美政府CMS系统.论坛后台管理</font></div></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" >
<tr>
<td class=td1 height="30" align="center" background="../../images/topBar_bg.gif"><font color="#000000">完美设计·政府网站管理系统{宽屏新城第二版}--<%=strt%></font></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#1C58C9" width="100%" bgcolor=#ffffff>
<tr>
<td width="100%" valign="top">
<%
select case action
case"sql"
%><form method="POST" action="adminright4.asp?action=execute">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
<tr>
<td class=td2 width="30%" height="32">
<p style="margin: 5">SQL语句:</td>
<td width="70%"><input type="text" name="sql" size="64"></td>
</tr>
<tr>
<td class=td2 height="32">
<p style="margin: 5">执行密码:</td>
<td><input type="password" name="pass" size="20"></td>
</tr>
<tr>
<td class=td2 colspan="2" bgcolor="#F4F6FC" height="32" align="center">
<input type="submit" value=" 确 定 执 行 " name="B1"></td>
</tr>
</table></form>
<%case"execute"
sql=request.form("sql")
pass=replace(request.form("pass"),"'","''")
if sql="" or pass<>"6kadmin" then
call send("·请填写完整SQL语句和正确填写密码<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>")
else
On Error Resume Next
conn.execute(sql)
if err.number<>0 then
call send("·SQL语句有错误,具体错误如下:<br>·"&Err.Description&"<br>·<a href=adminright4.asp?action=sql><span class=errfont>返回重新填写</span></a>")
else
call send("操作成功。")
end if
end if
%>
<%case"style"
dim allstyle
%><form method="POST" action="adminright4.asp?action=autouse">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
<tr>
<td class=td3 width="100%" colspan="5" bgcolor="#F4F6FC" height="30"> 论坛已安装皮肤:</td>
</tr>
<%set rs=conn.execute("select * from style")
do while not rs.eof
allstyle=allstyle&"*"&rs("styleid")&"*"
response.write"<tr><td width=25% height=30> 皮肤文件夹: "&rs("styleid")&"</td><td width=25% > 名称:"&rs("stylename")&"</td><td width=25% > </td><td width=15% > <input type=radio name=autouse value="&rs("id")&" ":if rs("autouse")=true then:response.write"checked":end if:response.write"> 默认使用 </td><td width=10% align=right>[<a href=adminright4.asp?action=editstyle&id="&rs("id")&">编辑</a>, <a href=adminright4.asp?action=delstyle&id="&rs("id")&">卸载</a>] </td></tr>"
rs.movenext
loop
set rs=nothing
allstyle=Lcase(allstyle)
'response.write allstyle
%> <tr>
<td class=td2 width="100%" colspan="5" bgcolor="#F4F6FC" height="30" align="center">
<input type="submit" value=" 确 定 修 改 " name="B1"></td>
</tr>
</table>
</form>
<%'未安装--------------------------------------------------------------------
if CheckObject(getXMLDOM) and CheckObject("Scripting.FileSystemObject") then
dim pathlist
pathlist=getPathList("../skin/")(0)
pathlist=split(pathlist,"*")
%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
<tr>
<td class=td3 width="100%" colspan="4" bgcolor="#F4F6FC" height="30"> 论坛未安装皮肤:</td>
</tr>
<%
dim pathi,SkinXML
set SkinXML=new XmlClass
for i=0 to ubound(pathlist)
pathi=pathlist(i)
if instr(allstyle,Lcase("*"&pathi&"*"))=0 then
SkinXML.XmlPath="../skin/"&pathi&"/config.xml"
SkinXML.open
'response.write SkinXML.getError()
response.write"<form name=style"&i&" action='adminright4.asp?action=addstyle' method='POST'><tr ><td width=25% height=30><input type=hidden name=stylename value='"&checkform(SkinXML.SelectXmlNodeText("skinname"))&"'><input type=hidden name=styleid value='"&pathi&"'> 皮肤文件夹: "&pathi&"</td><td width=25% > 名称:"&SkinXML.SelectXmlNodeText("skinname")&"</td><td width=25% > 作者:"&SkinXML.SelectXmlNodeText("designer")&" [<a href="&SkinXML.SelectXmlNodeText("link")&" target=_blank>主页</a>, <a href='mailto:"&SkinXML.SelectXmlNodeText("mail")&"'>邮箱</a>]</td><td width=25% align=right><a href='#' onclick='javascript:document.style"&i&".submit();'>[自动安装]</a> </td></tr></form>"
end if
next
SkinXML.CloseXml
set SkinXML=nothing
%>
</table>
<%'未安装--------------------------------------------------------------------
End if
%>
<form method="POST" action="adminright4.asp?action=addstyle">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
<tr>
<td class=td3 colspan=2>手动安装论坛皮肤:</td>
</tr>
<tr class=td2>
<td width="30%" height="30">
<p style="line-height: 120%; margin: 5">皮肤名称:</td>
<td width="70%"> <input type="text" name="stylename" size="30"> *</td>
</tr>
<tr class=td2>
<td height="30">
<p style="line-height: 120%; margin: 5">皮肤所在文件夹:</td>
<td> <input type="text" name="styleid" size="30"> *</td>
</tr>
<tr>
<td class=td2 colspan="2" align="center" height="35" bordercolor="#F4F6FC">
<input type="submit" value=" 确 定 安 装 " name="B1"></td>
</tr>
</table></form>
<%case"addstyle"
dim stylename
stylename=replace(request.form("stylename"),"'","''")
styleid=replace(request.form("styleid"),"'","''")
if stylename="" or styleid="" then
call send("·请填写完整必填资料<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>")
else
conn.execute("insert into style(stylename,styleid) values('"&stylename&"','"&styleid&"')")
call send("添加论坛皮肤 "&stylename&" 成功。")
end if
%>
<%case"delstyle"
dim id,used
id=checknum(request.querystring("id"))
used=conn.execute("select top 1 autouse from style where id="&id&"")(0)
if used=true then
call send("该皮肤被默认使用,不能被卸载。")
else
conn.execute("delete*from style where id="&id&"")
call send("卸载论坛皮肤成功。")
end if
%>
<%case"editstyle"
id=checknum(request.querystring("id"))
set rs=conn.execute("select*from style where id="&id&"")
%>
<form method="POST" action="adminright4.asp?action=editstyleok&id=<%=id%>">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
<tr>
<td class=td3 colspan=2>编辑论坛皮肤:</td>
</tr>
<tr class=td2>
<td width="30%" height="30">
<p style="line-height: 120%; margin: 5">皮肤名称:</td>
<td width="70%"> <input type="text" name="stylename" size="30" value="<%=checkform(rs("stylename"))%>"> *</td>
</tr>
<tr class=td2>
<td height="30">
<p style="line-height: 120%; margin: 5">皮肤所在文件夹:</td>
<td> <input type="text" name="styleid" size="30" value="<%=checkform(rs("styleid"))%>"> *</td>
</tr>
<tr>
<td class=td2 colspan="2" align="center" height="35" bordercolor="#F4F6FC">
<input type="submit" value=" 确 定 修 改 " name="B1"></td>
</tr>
</table></form>
<%case"editstyleok"
id=checknum(request.querystring("id"))
stylename=replace(request.form("stylename"),"'","''")
styleid=replace(request.form("styleid"),"'","''")
if stylename="" or styleid="" then
call send("·请填写完整必填资料<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>")
else
conn.execute("update style set stylename='"&stylename&"',styleid='"&styleid&"' where id="&id&"")
call send("修改论坛皮肤成功。")
end if
case"autouse"
dim autouse
autouse=checknum(request.form("autouse"))
conn.execute("update style set autouse=false")
conn.execute("update style set autouse=true where id="&autouse&"")
call send("已经成功设定论坛默认皮肤。")
'_____________________________________论坛插件 BEGIN_____________________________________
case"plugin"
dim allplugin
%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
<tr>
<td class=td3 width="100%" colspan="4" bgcolor="#F4F6FC" height="30"> 论坛已安装插件:</td>
</tr>
<%set rs=conn.execute("select * from plugin")
do while not rs.eof
allplugin=allplugin&"*"&rs("pluginid")&"*"
response.write"<tr><td width=20% height=30> 插件文件夹: "&rs("pluginid")&"</td><td width=20% > 名称:"&rs("pluginname")&"</td><td width=35% > 链接:"&rs("pluginlink")&"</td><td width=25% align=right>[<a href=adminright4.asp?action=editplugin&id="&rs("id")&">编辑</a>, <a href=adminright4.asp?action=delplugin&id="&rs("id")&">卸载</a>] </td></tr>"
rs.movenext
loop
set rs=nothing
allplugin=Lcase(allplugin)
'response.write allplugin
%>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -