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

📄 adminright.asp

📁 完美政府版,正版网站解决方案
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="AdminConn.asp"--><!--#include file="../inc/fun.asp"--><!--#include file="../inc/md5.asp"--><!--#include file="function.asp"-->
<%dim bbsinfo,action,strt,i,uploadtype,badwords,badcontent,str,offbbsinfo,obbs,paper,count,sql,id,ggtitle,ggok,content,contentok,thisbbs,bad,b,content2,lgname,lgpwd,lgpwdmd5,bdlist2
dim name,url,picurl,readme
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

sub bdlist()
set bdlist2=conn.execute("select * from bdinfo where followid<>0 order by followid,orders desc,id")
response.write"<select size=1 name=bd style='font-size: 9pt'><option value=0>请选择版面</option>"
do while not bdlist2.eof
response.write"<option value="&bdlist2("id")&">"&split(bdlist2("bdinfo"),"|")(0)&"</option>"
bdlist2.movenext
Loop
response.write"</select>"
set bdlist2=nothing
end sub

function checkbad(str)
if isnull(str) then exit function 
bad=split(application(prefix&"badcontent"), "|")
for b=0 to ubound(bad)
str=Replace(str,bad(b),string(len(bad(b)),"*")) 
next
checkbad=str
end function

action=request.querystring("action")
select case action
case"bbs","editbbs" strt="论坛常规设置":application(prefix&"bbsname")=""
case"openbbsyn","editonoff" strt="论坛开关设置":application(prefix&"bbsname")=""
case"gonggaogl" strt="论坛公告管理 &nbsp; [ <a href=adminright.asp?action=addnewgg><font color=#ffffff>发布公告</font></a> ]"
case"delgg" strt="删除公告"
case"addnewgg","savegg" strt="<a href=adminright.asp?action=addnewgg><font color=#ffffff>发布公告</font></a>"
case"lm","addlinkform","addlm" strt="论坛联盟管理 &nbsp; [ <a href=adminright.asp?action=addlinkform><font color=#ffffff>添加联盟</font></a> ]":application(prefix&"thebbslink")=""
case"delbbslink" strt="删除论坛联盟":application(prefix&"thebbslink")=""
case"editbbslink","editlm" strt="编辑论坛联盟":application(prefix&"thebbslink")=""
case"ip","addiplock","delip" strt="IP封锁与解除"
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"bbs"
set rs=conn.execute("select bbsinfo,uploadtype,badwords,badcontent from config")
bbsinfo=rs("bbsinfo")
bbsinfo=split(bbsinfo,"|")
%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" bordercolor="#F4F6FC">
  <form method="POST" action="adminright.asp?action=editbbs"><tr>
    <td width="25%">
    <p style="margin: 8; ">论坛名称:</td>
    <td width="75%"> <input type="text" name="b_0" size="40" value="<%=checkform(bbsinfo(0))%>"></td>
  </tr>
<tr>
    <td>
    <p style="margin: 8; ">论坛默认显示模式</td>
    <td> <input type="radio" name="b_14" value="1" <%if checknum(bbsinfo(14))=1 then%>checked<%end if%>>框架模式 
    <input type="radio" name="b_14" value="2" <%if checknum(bbsinfo(14))=2 then%>checked<%end if%>>平板模式</td>
  </tr>  
  <tr>
    <td>
    <p style="margin: 8; ">论坛头像个数:</td>
    <td> <input type="text" name="b_1" value="<%=checkform(bbsinfo(1))%>" size="5"></td>
  </tr>
  <tr>
    <td>
    <p style="margin: 8; ">头像最大宽度×高度:</td>
    <td> <input type="text" name="b_2" value="<%=checkform(bbsinfo(2))%>" size="5"> 
    × <input type="text" name="b_3" value="<%=checkform(bbsinfo(3))%>" size="5"></td>
  </tr>
  <tr>
    <td>
    <p style="margin: 8; ">头像默认宽度×高度:</td>
    <td> <input type="text" name="b_4" value="<%=checkform(bbsinfo(4))%>" size="5"> 
    × <input type="text" name="b_5" value="<%=checkform(bbsinfo(5))%>" size="5"></td>
  </tr>
  <tr>
    <td>
    <p style="margin: 8; ">是否允许使用外部头像:</td>
    <td> <input type="radio" name="b_6" value="1" <%if checknum(bbsinfo(6))=1 then%>checked<%end if%>>是 
    <input type="radio" name="b_6" value="2" <%if checknum(bbsinfo(6))=2 then%>checked<%end if%>>否</td>
  </tr>
  <tr>
    <td>
    <p style="margin: 8; ">论坛联盟显示方式:</td>
    <td> <input type="radio" name="b_7" value="1" <%if checknum(bbsinfo(7))=1 then%>checked<%end if%>>文字 
    <input type="radio" name="b_7" value="2" <%if checknum(bbsinfo(7))=2 then%>checked<%end if%>>图片</td>
  </tr>
  <tr>
    <td>
    <p style="margin: 8; ">是否允许上传:</td>
    <td> <input type="radio" name="b_8" value="1" <%if checknum(bbsinfo(8))=1 then%>checked<%end if%>>是 
    <input type="radio" name="b_8" value="2" <%if checknum(bbsinfo(8))=2 then%>checked<%end if%>>否</td>
  </tr>
  <tr>
    <td>
    <p style="margin: 8; ">最大上传文件大小:</td>
    <td> <input type="text" name="b_9" value="<%=checkform(bbsinfo(9))%>" size="5"> KB</td>
  </tr>  <tr>
    <td>
    <p style="margin: 8; ">最多上传文件个数:</td>
    <td> <input type="text" name="b_10" value="<%=checkform(bbsinfo(10))%>" size="5"></td>
  </tr>  <tr>
    <td>
    <p style="margin: 8; ">允许上传文件类型:<br>各个类型间用 | 隔开</td>
    <td> <input type="text" name="uploadtype" value="<%=checkform(rs("uploadtype"))%>" size="40"></td>
  </tr> <tr>
    <td>
    <p style="margin: 8; ">最多投票选项个数:</td>
    <td> <input type="text" name="b_11" value="<%=checkform(bbsinfo(11))%>" size="5"></td>
  </tr>
  <tr>
    <td>
    <p style="margin: 8; ">帖子列表每页显示数:</td>
    <td> <input type="text" name="b_12" value="<%=checkform(bbsinfo(12))%>" size="5"></td>
  </tr>
  <tr>
    <td>
    <p style="margin: 8; ">话题每页回帖显示数:</td>
    <td> <input type="text" name="b_13" value="<%=checkform(bbsinfo(13))%>" size="5"></td>
  </tr>
  <tr>
    <td>
    <p style="margin: 8; ">禁止注册的用户名:<br>各个类型间用 | 隔开</td>
    <td> <input type="text" name="badwords" value="<%=checkform(rs("badwords"))%>" size="60"></td>
  </tr>
  <tr>
    <td>
    <p style="margin: 8; ">帖子过滤脏字:<br>各个类型间用 | 隔开</td>
    <td> <input type="text" name="badcontent" value="<%=checkform(rs("badcontent"))%>" size="60"></td>
  </tr>
  <tr>
    <td colspan="2" height="40" bgcolor="#F4F6FC" align="center">
    <p style="line-height: 125%; margin: 5">
    <input type="submit" value="     确  认  修  改     " name="B1"></td>
  </tr></form>
</table>
<%set rs=nothing%>
<%case"editbbs"
for i=1 to 14
bbsinfo=bbsinfo&"|"&Replace(Request.Form("b_"&i&""),"|","│")
next
bbsinfo=Replace(Request.Form("b_0"),"|","│")&bbsinfo
bbsinfo=replace(bbsinfo,"'","")
uploadtype=Replace(Request.Form("uploadtype"),"'","''")
badwords=Replace(Request.Form("badwords"),"'","''")
badcontent=Replace(Request.Form("badcontent"),"'","''")


conn.execute("update [config] set bbsinfo='"&bbsinfo&"',uploadtype='"&uploadtype&"',badwords='"&badwords&"',badcontent='"&badcontent&"'")
call send("修改成功。")
application(prefix&"bbsname")=""
%>
<%case"openbbsyn"
set rs=conn.execute("select offbbsinfo from config")
offbbsinfo=rs("offbbsinfo")%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
<form method="POST" action="adminright.asp?action=editonoff"><tr>
    <td width="25%">
    <p style="line-height: 125%; margin: 5">论坛状态:</td>
    <td width="75%"><input type="radio" name="obbs" value="1" <%if isnull(offbbsinfo) or offbbsinfo="" then%>checked<%end if%>>开 
    <input type="radio" name="obbs" value="2" <%if offbbsinfo<>"" then%>checked<%end if%>>关</td>
  </tr>
  <tr>
    <td valign="top">
    <p style="line-height: 125%; margin: 5">关闭时显示信息:<br>支持 html</td>
    <td>
    <p style="margin: 6">
    <textarea name="offinfo" cols="60" rows="7" style="font-family: 宋体; font-size: 9pt"><%=checkform(offbbsinfo)%></textarea></td>
  </tr>
  <tr>
    <td colspan="2" align="center" height="30" bgcolor="#F4F6FC">
    <p>
    <input type="submit" value="     确  认  修  改     " name="B1"></td>
  </tr></form>
</table><%set rs=nothing%>
<%case"editonoff"
obbs=checknum(Request.Form("obbs"))
if obbs=1 then offbbsinfo=""
if obbs=2 then offbbsinfo=Replace(Request.Form("offinfo"),"'","")
conn.execute("update [config] set offbbsinfo='"&offbbsinfo&"'")
call send("修改成功。")
%>
<%case"gonggaogl"
sql="select * from paper order by id desc"
set rs = server.createobject("adodb.recordset")
rs.Open sql,conn,1
count=rs.recordcount
%><SCRIPT src=inc/menu.js></script>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" bordercolor="#F4F6FC">
    <tr class=td3><td width="35%" height=28 bgcolor="#F4F6FC">&nbsp;公告标题:</td>
      <td width="10%" bgcolor="#F4F6FC">&nbsp;发表者:</td>
      <td width="25%" bgcolor="#F4F6FC">&nbsp;发表时间:</td>
      <td width="20%" bgcolor="#F4F6FC">&nbsp;所在版面:</td>
      <td width="10%" bgcolor="#F4F6FC">&nbsp;公告操作:</td></tr>
<%
for i=1 to count
paper=rs("paper")
paper=split(paper,"|")
%><tr><td width="35%">
  <p style="margin: 4">&nbsp;<a href=# onclick=openscript('paper.asp?id=<%=rs("id")%>')><%=lefttrue(checktitle(paper(0)),20)%></a></td>
  <td width="10%">&nbsp;<%=checktitle(paper(1))%></td><td width="25%">&nbsp;<%=paper(2)%></td>
  <td width="20%">&nbsp;<%
  if rs("bd")=0 then
  response.write"论坛首页"
  else
  response.write split(conn.execute("select top 1 bdinfo from bdinfo where id="&rs("bd")&" and followid<>0")(0),"|")(0)
  end if%></td>
  <td width="10%">&nbsp;<a title='删除' href="adminright.asp?action=delgg&id=<%=rs("id")%>"><img border="0" src="pic/del.gif"></a> &nbsp;
  <a title='编辑' href="adminright2.asp?action=editgg&id=<%=rs("id")%>"> <img border="0" src="pic/edit.gif"></a></td></tr><%
  rs.movenext
  next%>
        <tr><td class=td3 colspan="5">&nbsp;
          <b><a href=adminright.asp?action=addnewgg> <u>&gt;&gt;发布公告</u></a></b></td>
      </tr></table>

<%
rs.close
set rs=nothing%>
<%
case"delgg"
id=checknum(request.querystring("id"))
conn.execute("delete*from paper where id="&id&"")
call send("删除成功。")
%>

<%case"addnewgg"%>
<SCRIPT>
function checkeditor(editor)
{
if(editor=="html")
	{
				document.getElementById("ubbeditordiv").style.display = 'none';
				document.getElementById("htmltoolbar").style.display = 'block';
				EDITFORM_DOCUMENT.body.innerHTML = document.getElementById("CodeForm").value;
				document.getElementById("editTextarea").style.display = 'none';
				document.getElementById("editIframe").style.display = 'block';
				HtmlDisableToolbar(false);
	}
else if(editor=="ubb")
	{
				document.getElementById("ubbeditordiv").style.display = 'block';
				document.getElementById("htmltoolbar").style.display = 'none';
				document.getElementById("CodeForm").value = HtmlHtmlToXhtml(EDITFORM_DOCUMENT.body.innerHTML);
				document.getElementById("editIframe").style.display = 'none';
				document.getElementById("editTextarea").style.display = 'block';
				HtmlDisableToolbar(true);
	}
}

function preview()
{
if(htmlsubmit()){
document.form1.topic.value=document.topicform.ggtitle.value;
document.form1.content.value=document.topicform.content.value;
var popupWin = window.open('../paper.asp?action=preview', 'showgg', 'width=500,height=400,resizable=1,scrollbars=yes,menubar=no,status=yes');
document.form1.submit()
}
}

⌨️ 快捷键说明

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