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

📄 admin_plus.asp

📁 功能强大的一个b/s工作站
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!--#include file="connplus.asp"-->

<head>
<title><%=Forum_info(0)%>--管理页面</title>
<link rel="stylesheet" href="forum_admin.css" type="text/css">
<meta NAME=GENERATOR Content="Microsoft FrontPage 4.0" FrontPage 3.0"" CHARSET=GB2312 Microsoft>
</head>

<BODY leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<%
	if not master or session("flag")="" then
		Errmsg=Errmsg+"<br>"+"<li>本页面为管理员专用,请<a href=admin_index.asp target=_top>登陆</a>后进入。<br><li>您没有管理本页面的权限。"
		call dvbbs_error()
	else
		dim body
		dim readme,Tlink
		call main()
		set rs=nothing
		
	end if

sub main()

	 select case request("action")
	 case "add"
	       call addlink()
	 case "edit"
	       call editlink()
     case "savenew"
	       call savenew()
	  case "savedit"
	       call savedit()
	  case "del"
	       call del()
	  case "orders"
	       call orders()
	  case "updatorders"
	       call updatorders()
	  case "addzhu"
	       call addzhu()
	  case "zhudel"
	       call zhudel()
	  case "plusinfo"
	       call plusinfo()
	  case "zhuorders"
	       call zhuorders()
	   case "zhuedit"
	       call zhuedit()
	  case else
	       call zhuinfo()
     end select

	response.write body
end sub

sub zhuedit()
if request("edit") then
if request("zhuname")="" then body=body + "<br>"+"组名字不能为空!请重新输入!":exit sub
connplus.execute "update zhu set zhuname='" & request("zhuname") &"' where id="&request("id")
response.redirect "admin_plus.asp"
exit sub
end if
	set rs= server.createobject ("adodb.recordset")
	sql = "select * from zhu where id="&request("id")
	rs.open sql,connplus,0,1
%>

  
<table width="95%" border="0" cellspacing="1" cellpadding="3"  align=center class="tableBorder">
  <form action="?action=zhuedit&edit=1" method=post>
    <input type=hidden name=id value=<%=Request("id")%>>
    <tr> 
      <th colspan="2"><a href="?action=zhuinfo"><font color="#FFFFFF">插件组管理</font></a> 
        | <a href="admin_plus.asp?action=addzhu"><font color=#FFFFFF>增加新的组 </font></a>| 
        <a href="admin_plus.asp?action=zhuorders"><font color=#FFFFFF>分类排序</font></a></th>
    </tr>
    <tr> 
      <td width="50%" class=forumrow><div align="center">组ID:</div></td>
      <td width="60%" class=forumrow><%=rs("zhuid")%> </td>
    </tr>
    <tr> 
      <td width="50%" class=forumrow><div align="center">组名称:</div></td>
      <td width="60%" class=forumrow> <input name="zhuname" type="text" id="zhuname" value=<%=rs("zhuname")%> size=40> 
      </td>
    </tr>
    <tr> 
      <td height="15" colspan="2" class=forumrow> <div align="center"> 
          <input type="submit" name="Submit" value="修 改">
        </div></td>
    </tr>
  </form>
</table>

<%
rs.close
set rs=nothing
end sub


sub zhuinfo()
dim rszhu
	set rs= server.createobject ("adodb.recordset")
	sql = "select * from zhu order by zhuid"
	rs.open sql,connplus,0,1
	if rs.eof and rs.bof then
	%>
<table width="100%" border="0" cellspacing="1" cellpadding="3"  align=center class="tableBorder">
  <tr> 
    <th width="100%" colspan=2 height=14><strong><font color="#FFFFFF">插件组管理</font></strong> 
      | <a href="admin_plus.asp?action=addzhu"><font color=#FFFFFF>增加新的组 </font></a>| 
      <a href="admin_plus.asp?action=zhuorders"><font color=#FFFFFF>分类排序</font></a></th>
  </tr>
  <tr> 
    <td height=41 colspan="2" class=forumrow> 
      <div align="center">没有组!</div></td>
  </tr>
</table>
	
<%
	else
	%>
<table width="100%" border="0" cellspacing="1" cellpadding="3"  align=center class="tableBorder">
  <tr> 
    <th colspan=4 height=14><strong><font color="#FFFFFF">插件组管理</font></strong> 
      | <a href="admin_plus.asp?action=addzhu"><font color=#FFFFFF>增加新的组 </font></a><font color="#FFFFFF">|</font> 
      <a href="admin_plus.asp?action=zhuorders"><font color=#FFFFFF>分类排序</font></a></th>
  </tr>
  <tr> 
    <td width="18%" height=20 class="forumHeaderBackgroundAlternate"> <div align="center">组ID</div></td>
    <td width="25%" class="forumHeaderBackgroundAlternate"><div align="center">组内插件数</div></td>
    <td width="28%" height=20 class="forumHeaderBackgroundAlternate"><div align="center">组名(点击查看组内插件)</div></td>
    <td width="29%" class="forumHeaderBackgroundAlternate"><div align="center">操作</div></td>
  </tr>
  <%do while not rs.eof%>
  <tr> 
    <td height=20 class=forumrow><div align="center"><%=rs("zhuid")%></div></td>
    <td class=forumrow><div align="center"> 
        <%set rszhu= server.createobject ("adodb.recordset")
	rszhu.open ("select * from plus where zhuid=" & rs("zhuid")),connplus,1,1
	response.write rszhu.recordcount
	rszhu.close%>
      </div></td>
    <td height=20 class=forumrow><div align="center"><a href="?action=plusinfo&zhuid=<%=rs("zhuid")%>&zhuname=<%=rs("zhuname")%>"><%=rs("zhuname")%></a></div></td>
    <td height=20 class=forumrow><div align="center"><a href="?action=add&zhuid=<%=rs("zhuid")%>&zhuname=<%=rs("zhuname")%>">增加插件</a> 
        <a href="admin_plus.asp?action=zhuedit&id=<%=rs("id")%>">编辑</a> <a href="admin_plus.asp?action=zhudel&zhuid=<%=rs("zhuid")%>">删除</a></div></td>
  </tr>
  <%
  rs.movenext
  loop%>
</table>
<p align="center"><font color="#FF0000">注意:删除一个组,组里的全部插件也会一起删除!</font></p>
	
<%
	set rszhu=nothing
	end if
	rs.close
	set rs=nothing
end sub

sub addzhu
if request("add") then
if request("zhuname")="" then body=body+"<br>"+"组名不能为空。":exit sub
	dim zhuid
	set rs=connplus.execute ("select * from zhu where zhuname='"&request("zhuname")&"'")
	if not (rs.bof and rs.eof) then body=body + "<br>组名不能重复!请重新输入!":exit sub
	set rs= server.createobject ("adodb.recordset")
	sql = "select * from zhu order by zhuid desc"
	rs.open sql,connplus,1,3

	if rs.bof and rs.eof then zhuid=1 else zhuid=rs("zhuid")+1
	rs.addnew
	rs("zhuid")=zhuid
	rs("zhuname")=request("zhuname")
	rs.update
	rs.close
	set rs=nothing
response.redirect "?action=zhuinfo"
end if
%>
<div align="center"></div>
<table width="100%" border="0" cellspacing="1" cellpadding="3"  align=center class="tableBorder">
  <form action="admin_plus.asp?action=addzhu&add=1" method = post>
  <tr> 
    <th height=14 colspan="2"><a href="?action=zhuinfo"><font color="#FFFFFF"> 
      <a href="?action=zhuinfo"><font color="#FFFFFF">插件组管理</font></a> | <strong><font color=#FFFFFF>增加新的组 
      </font></strong>| <a href="admin_plus.asp?action=zhuorders"><font color=#FFFFFF>分类排序</font></a> 
    </th>
  </tr>
  <tr> 
    <td width="50%" height=25 class=forumrow><div align="center">组名</div></td>
    <td width="100%" height=25 class=forumrow> <input name="zhuname" type="text" id="zhuname" size=40> 
    </td>
  </tr>
  <tr> 
    <td height="15" colspan="2" class=forumrow> <div align="center"> 
        <input type="submit" name="Submit" value="添 加">
      </div></td>
  </tr>
</table>
<%
end sub

sub zhudel()
connplus.execute "delete * from zhu where zhuid="& request("zhuid")
connplus.execute "delete * from plus where zhuid="& request("zhuid")
response.redirect "admin_plus.asp"
end sub

sub zhuorders()
if request("submit")<>"" then
set rs = server.CreateObject ("Adodb.recordset")
sql="select * from zhu order by zhuid"
rs.open sql,connplus,1,3
do while not rs("zhuid")=cint(request("zhuid"))
rs.movenext
loop

if request("orderaction")="向下" then

rs.movenext
dim temp1
temp1=rs("zhuid")
rs("zhuid")=cint(request("zhuid"))
connplus.execute ("update plus set zhuid="&rs("zhuid")&" where zhuname='"&rs("zhuname")&"'")
rs.MovePrevious
rs("zhuid")=temp1
rs.update
connplus.execute ("update plus set zhuid="&rs("zhuid")&" where zhuname='"&rs("zhuname")&"'")
else

rs.MovePrevious
dim temp2
temp2=rs("zhuid")
rs("zhuid")=cint(request("zhuid"))
connplus.execute ("update plus set zhuid="&rs("zhuid")&" where zhuname='"&rs("zhuname")&"'")
rs.movenext
rs("zhuid")=temp2
connplus.execute ("update plus set zhuid="&rs("zhuid")&" where zhuname='"&rs("zhuname")&"'")
rs.update

end if
rs.close
set rs=nothing
end if

set rs = server.CreateObject ("Adodb.recordset")
sql="select * from zhu order by zhuid"
rs.open sql,connplus,1,1
%>
<table width="100%" border="0" cellspacing="1" cellpadding="3"  align=center class="tableBorder">
  <tr> 
    <th colspan=4 height=14><a href="?action=zhuinfo"><font color="#FFFFFF">插件组管理</font></a> 
      | <a href="admin_plus.asp?action=addzhu"><font color=#FFFFFF>增加新的组 </font></a>| 
      <font color=#FFFFFF><strong>分类排序</strong></font></th>
  </tr>
  <tr> 
    <td width="39%" height=20  class="forumHeaderBackgroundAlternate"> <div align="center">组名 </div><td width="26%" class="forumHeaderBackgroundAlternate"><div align="center">组ID</div><td width="15%" class="forumHeaderBackgroundAlternate"><div align="center">操作</div><td width="20%" height=20 class="forumHeaderBackgroundAlternate"><div align="center">修改</div></tr>
          <%
	  if rs.bof and rs.eof then 
	  response.write "没有组!"
	  else 
      do while not rs.eof%>
	  <form name=zhuorders action="admin_plus.asp?action=zhuorders&zhuid=<%=rs("zhuid")%>" method = post>
  <tr> 
    <td height=23 class=forumrow>
<div align="center">
	  <%=rs("zhuname")%>
      </div></td>
    <td class=forumrow><div align="center"><%=rs("zhuid")%></div></td>
    <td class=forumrow><div align="center">
          <select name="orderaction" id="orderaction">
            <%
		dim bos,big,small
		set bos=connplus.execute ("select * from zhu where zhuid>"&rs("zhuid"))
		if bos.eof then big=true else big=false
				set bos=connplus.execute ("select * from zhu where zhuid<"&rs("zhuid"))
		if bos.eof then small=true else small=false
		%>
            <%if not big then%>
            <option>向下</option><%end if%>
          <%if not small then%><option>向上</option><%end if%>
		  <%if rs.recordcount=1 then response.write "<option>无需操作</option>"%>
        </select>
      </div></td>
    <td height=23 class=forumrow>
<div align="center">
          <input name="submit" type="submit" id="submit" value="修改">
      </div></td>
  </tr></form><%if rs.recordcount=1 then%>
  	<script language="javascript">
	document.zhuorders.submit.disabled=true
	</script>
  <%end if%>	 <% rs.movenext
	  loop
	  end if
	  rs.close
	  set rs=nothing
	  %>
</table>
<%
end sub

sub addlink()
%>
<form action="admin_plus.asp?action=savenew&zhuname=<%=request("zhuname")%>" method = post>
  <table width="100%" border="0" cellspacing="1" cellpadding="3"  align=center class="tableBorder">
    <tr> 
      <th width="100%" colspan=2 height=14><font color=white><%=request("zhuname")%></font>-><a href="?action=plusinfo&zhuid=<%=request("zhuid")%>&zhuname=<%=request("zhuname")%>"><font color="#FFFFFF">插件列表</font></a> 
        | <strong><font color=#FFFFFF>增加新的插件 </font></strong>| <a href="?action=orders&zhuid=<%=request("zhuid")%>&zhuname=<%=request("zhuname")%>"><font color=#FFFFFF>分类排序</font></a></th>
  </tr>
  <tr> 
    <td width="40%" height=25 class=forumrow>插件名称 </td>
    <td width="60%" height=25 class=forumrow> 
      <input type="text" name="name" size=40>
        <input type="hidden" name="zhuid" value=<%=request("zhuid")%>> </td>
  </tr>
  <tr> 
    <td width="40%" height=25 class=forumrow>插件连接文件 </td>
    <td width="60%" class=forumrow> 
      <input type="text" name="url" size=40>
    </td>
  </tr>
  <tr> 
    <td width="40%" height=25 class=forumrow>插件简介 </td>
    <td width="60%" class=forumrow> 
      <input type="text" name="readme" size=40>
    </td>
  </tr>
  <tr> 
    <td width="40%" height=25 class=forumrow>本插件是否在新页面中打开 </td>
    <td width="60%" class=forumrow><input name=wind type=radio value=1 checked>
        本页面  <input type=radio name=wind value=2>
        新页面 (标准) 
        <input type="radio" name="wind" value="3">
        新页面 (限制)</td>
  </tr>
    <tr> 
      <td width="40%" height=25 class=forumrow>新窗口大小(只有上面选择了限制新页面才需填写)</td>
      <td width="60%" class=forumrow>宽度: 
        <input name="width" type="text" id="width" size="10">

⌨️ 快捷键说明

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