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

📄 ad_special.asp

📁 该软件是帮助大学生更好的生活
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true	
Const PurviewLevel=2
Const CheckChannelID=2
Const PurviewLevel_Article=1
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="ad_ChkPurview.asp"-->
<!--#include file="inc/func.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<!--#include file="inc/ad_code_info.asp"-->
<%
dim Action,FoundErr,ErrMsg
dim rs,sql
dim SkinCount,LayoutCount
Action=trim(request("Action"))
%>
<html>
<head>
<title>专题管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="ad_Style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr class="topbg"> 
    <td height="22" colspan="2" align="center"><strong>专 题 管 理</strong></td>
  </tr>
  <tr class="tdbg"> 
    <td width="70" height="30"><strong>管理导航:</strong></td>
    <td><a href="ad_Special.asp">专题管理首页</a> | <a href="ad_Special.asp?Action=Add">添加新专题</a>&nbsp;|&nbsp;<a href="ad_Special.asp?Action=Order">专题排序</a>&nbsp;|&nbsp;<a href="ad_Special.asp?Action=Unite">合并专题</a></td>
  </tr>
</table>
<%
if Action="Add" then
	call AddSpecial()
elseif Action="SaveAdd" then
	call SaveAdd()
elseif Action="Modify" then
	call Modify()
elseif Action="SaveModify" then
	call SaveModify()
elseif Action="Del" then
	call DelSpecial()
elseif Action="Clear" then
	call ClearSpecial()
elseif Action="UpOrder" then 
	call UpOrder() 
elseif Action="DownOrder" then 
	call DownOrder() 
elseif Action="Unite" then
	call ShowUniteForm()
elseif Action="UniteSpecial" then
	call UniteSpecial()
elseif Action="Order" then
	call ShowOrder()
else
	call main()
end if
if FoundErr=True then
	call WriteErrMsg()
end if
call CloseConn()

sub main()
	Set rs=Server.CreateObject("Adodb.RecordSet")
	sql="select * from Special"
	rs.Open sql,conn,1,1
%>
<br>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr class="title"> 
    <td height="22" align="center"><strong> 专题名称</strong></td>
    <td width="200" align="center"><strong>专题说明</strong></td>
    <td width="100" align="center"><strong>专题浏览权限</strong></td>
    <td width="100" align="center"><strong>添加文章权限</strong></td>
    <td width="100" height="22" align="center"><strong> 常规操作</strong></td>
  </tr>
  <%do while not rs.EOF %>
  <tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'"> 
    <td align="center"><a href="ad_infoManageSpecial.asp?SpecialID=<%=rs("SpecialID")%>" title="点击进入管理此专题的文章"><%=rs("SpecialName")%></a></td>
    <td width="200"><%=dvhtmlencode(rs("ReadMe"))%></td>
    <td width="100" align="center">
      <%
	select case rs("BrowsePurview")
	case 9999
		response.write "游客"
	case 999
		response.write "注册用户"
	case 99
		response.write "收费用户"
	case 9
		response.write "VIP用户"
	case 5
		response.write "管理员"
	end select%>
    </td>
    <td width="100" align="center">
      <%
	select case rs("AddPurview")
	case 999
		response.write "注册用户"
	case 99
		response.write "收费用户"
	case 9
		response.write "VIP用户"
	case 5
		response.write "管理员"
	end select%>
    </td>
    <td width="100" align="center"><%
	response.write "<a href='ad_Special.asp?action=Modify&SpecialID=" & rs("SpecialID") & "'>修改</a>&nbsp;&nbsp;"
	response.write "<a href='ad_Special.asp?Action=Del&SpecialID=" & rs("SpecialID") & "' onClick=""return confirm('确定要删除此专题吗?删除此专题后原属于此专题的文章将不属于任何专题。');"">删除</a>&nbsp;&nbsp;" 
    response.write "<a href='ad_Special.asp?Action=Clear&SpecialID=" & rs("SpecialID") & "' onClick=""return confirm('确定要清空此专题中的文章吗?本操作将原属于此专题的文章改为不属于任何专题。');"">清空</a>"
	%></td>
    <form action='ad_Special.asp?Action=UpOrder' method='post'>
    </form>
    <form action='ad_Special.asp?Action=DownOrder' method='post'>
    </form>
  </tr>
  <%
		rs.MoveNext
   	loop
  %>
</table> 
<%
	rs.Close
	set rs=Nothing
end sub

sub ShowOrder()
	dim iCount,i,j
	Set rs=Server.CreateObject("Adodb.RecordSet")
	sql="select * from Special"
	rs.Open sql,conn,1,1
	iCount=rs.recordcount
	j=1
%>
<br>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr class="title"> 
    <td height="22" colspan="4" align="center"><strong> 专 题 </strong><strong>排 
      序</strong></td>
  </tr>
  <%do while not rs.EOF %>
  <tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'"> 
    <td align="center"><a href="ad_ArticleManageSpecial.asp?SpecialID=<%=rs("SpecialID")%>" title="点击进入管理此专题的文章"><%=rs("SpecialName")%></a></td>
    <form action='ad_Special.asp?Action=UpOrder' method='post'>
      <td width='120' align="center"> <% 
	if j>1 then 
		response.write "<select name=MoveNum size=1><option value=0>向上移动</option>" 
		for i=1 to j-1 
			response.write "<option value="&i&">"&i&"</option>" 
		next 
		response.write "</select>" 
		response.write "<input type=hidden name=SpecialID value="&rs("SpecialID")&">"
		response.write "<input type=hidden name=cOrderID value="&rs("OrderID")&">&nbsp;<input type=submit name=Submit value=修改>" 
	else 
		response.write "&nbsp;" 
	end if 
%> </td>
    </form>
    <form action='ad_Special.asp?Action=DownOrder' method='post'>
      <td width='120' align="center"> <%
	if iCount>j then 
		response.write "<select name=MoveNum size=1><option value=0>向下移动</option>" 
		for i=1 to iCount-j 
			response.write "<option value="&i&">"&i&"</option>" 
		next 
		response.write "</select>" 
		response.write "<input type=hidden name=SpecialID value="&rs("SpecialID")&">"
		response.write "<input type=hidden name=cOrderID value="&rs("OrderID")&">&nbsp;<input type=submit name=Submit value=修改>" 
	else 
		response.write "&nbsp;" 
	end if 
%> </td>
      <td width='200' align="center">&nbsp;</td>
    </form>
  </tr>
  <%
     	j=j+1	
		rs.MoveNext
   	loop
  %>
</table> 
<%
	rs.Close
	set rs=Nothing
end sub

sub AddSpecial()
%>
<form method="post" action="ad_Special.asp" name="form1">
  <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" >
    <tr class="title"> 
      <td height="22" colspan="2"> <div align="center"><strong>添 加 新 专 题</strong></div></td>
    </tr>
    <tr class="tdbg"> 
      <td width="350" class="tdbg"><strong> 专题名称:</strong></td>
      <td class="tdbg"><input name="SpecialName" type="text" id="SpecialName" size="49" maxlength="30"> 
        &nbsp;</td>
    </tr>
    <tr class="tdbg"> 
      <td width="350" class="tdbg"><strong>专题说明</strong><br>
        鼠标移至专题名称上时将显示设定的说明文字(不支持HTML)</td>
      <td class="tdbg"><textarea name="ReadMe" cols="40" rows="5" id="ReadMe"></textarea></td>
    </tr>
    <tr class="tdbg"> 
      <td width="350" class="tdbg"><strong>默认配色模板:</strong><br>
        相关模板中包含CSS、颜色、图片等信息</td>
      <td class="tdbg">
        <%call Admin_ShowSkin_Option(0)%>
      </td>
    </tr>
    <tr class="tdbg"> 
      <td width="350" class="tdbg"><strong>版面设计模板:</strong><br>相关模板中包含了版面设计的版式等信息,如果是自行添加的设计模板,可能会导致“栏目配色模板”失效。
        </td>
      <td class="tdbg">
        <%call Admin_ShowLayout_Option(4,0)%>
      </td>
    </tr>
    <tr class="tdbg"> 
      <td width="350"><strong>专题浏览权限:</strong><br>
        只有具有相应权限的人才能浏览此专题中的文章。</td>
      <td><select name="BrowsePurview" id="BrowsePurview">
          <option value="9999">游客</option>
          <option value="999">注册用户</option>
          <option value="99">收费用户</option>
          <option value="9">VIP用户</option>
          <option value="5">管理员</option>
        </select></td>
    </tr>
    <tr class="tdbg"> 
      <td width="350"><strong>专题发表文章权限:</strong><br>
        只有具有相应权限的人才能在此专题中发表文章。</td>
      <td><select name="AddPurview" id="AddPurview">
          <option value="999">注册用户</option>
          <option value="99">收费用户</option>
          <option value="9">VIP用户</option>
          <option value="5">管理员</option>
        </select></td>
    </tr>
    <tr class="tdbg"> 
      <td colspan="2" align="center" class="tdbg"><input name="Action" type="hidden" id="Action" value="SaveAdd">
        <input  type="submit" name="Submit" value=" 添 加 ">
        &nbsp; 
        <input name="Cancel" type="button" id="Cancel" value=" 取 消 " onClick="window.location.href='ad_Special.asp'" style="cursor:hand;"></td>
    </tr>
  </table>
  </form>
<%
end sub

sub Modify()
	dim SpecialID
	SpecialID=trim(request("SpecialID"))
	if SpecialID="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>请指定要修改的专题ID!</li>"
		exit sub
	else
		SpecialID=Clng(SpecialID)
	end if
	sql="Select * From Special Where SpecialID=" & SpecialID
	Set rs=Server.CreateObject("Adodb.RecordSet")
	rs.open sql,conn,1,3
	if rs.bof and rs.EOF then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>找不到指定的专题,可能已经被删除!</li>"
	else

%>
<form method="post" action="ad_Special.asp" name="form1">
  <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" >
    <tr class="title"> 
      <td height="22" colspan="2"> <div align="center"><strong>修 改 专 题</strong></div></td>
    </tr>
    <tr class="tdbg"> 
      <td width="350" class="tdbg"><strong> 专题名称:</strong></td>
      <td class="tdbg"><input name="SpecialName" type="text" id="SpecialName" value="<%=rs("SpecialName")%>" size="49" maxlength="30">
        <input name="SpecialID" type="hidden" id="SpecialID" value="<%=rs("SpecialID")%>"> </td>
    </tr>
    <tr class="tdbg"> 
      <td width="350" class="tdbg"><strong>专题说明</strong><br>
        鼠标移至专题名称上时将显示设定的说明文字(不支持HTML)</td>
      <td class="tdbg"><textarea name="ReadMe" cols="40" rows="5" id="ReadMe"><%=rs("ReadMe")%>
</textarea></td>
    </tr>
    <tr class="tdbg"> 
      <td width="350" class="tdbg"><strong>默认配色模板:</strong><br>
        相关模板中包含CSS、颜色、图片等信息</td>
      <td class="tdbg">
        <%call Admin_ShowSkin_Option(rs("SkinID"))%>
      </td>
    </tr>
    <tr class="tdbg"> 
      <td width="350" class="tdbg"><strong>版面设计模板:</strong><br>相关模板中包含了版面设计的版式等信息,如果是自行添加的设计模板,可能会导致“栏目配色模板”失效。
        </td>
      <td class="tdbg">
        <%call Admin_ShowLayout_Option(4,rs("SkinID"))%>
      </td>
    </tr>
    <tr class="tdbg"> 
      <td width="350"><strong>专题浏览权限:</strong><br>
        只有具有相应权限的人才能浏览此专题中的文章。</td>
      <td><select name="BrowsePurview" id="select">
          <option value="9999" <%if rs("BrowsePurview")=9999 then response.write " selected"%>>游客</option>
          <option value="999" <%if rs("BrowsePurview")=999 then response.write " selected"%>>注册用户</option>
          <option value="99" <%if rs("BrowsePurview")=99 then response.write " selected"%>>收费用户</option>
          <option value="9" <%if rs("BrowsePurview")=9 then response.write " selected"%>>VIP用户</option>
          <option value="5" <%if rs("BrowsePurview")=5 then response.write " selected"%>>管理员</option>
        </select></td>
    </tr>
    <tr class="tdbg"> 
      <td width="350"><strong>专题发表文章权限:</strong><br>
        只有具有相应权限的人才能在此专题中发表文章。</td>
      <td><select name="AddPurview" id="select2">
          <option value="999" <%if rs("AddPurview")=999 then response.write " selected"%>>注册用户</option>
          <option value="99" <%if rs("AddPurview")=99 then response.write " selected"%>>收费用户</option>
          <option value="9" <%if rs("AddPurview")=9 then response.write " selected"%>>VIP用户</option>
          <option value="5" <%if rs("AddPurview")=5 then response.write " selected"%>>管理员</option>
        </select></td>
    </tr>
    <tr class="tdbg"> 
      <td colspan="2" align="center" class="tdbg"><input name="Action" type="hidden" id="Action" value="SaveModify">
        <input  type="submit" name="Submit" value="保存修改结果">
        &nbsp; 
        <input name="Cancel" type="button" id="Cancel" value=" 取 消 " onClick="window.location.href='ad_Special.asp'" style="cursor:hand;"></td>
    </tr>
  </table>
</form>
<%
	end if
	rs.close
	set rs=nothing
end sub

sub ShowUniteForm()
%>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
  <tr class="title"> 
    <td height="22" colspan="3" align="center"><strong>合 并 专 题</strong></td>
  </tr>
  <tr class="tdbg"> 
    <td height="100"><form name="myform" method="post" action="ad_Special.asp" onSubmit="return ConfirmUnite();">
        &nbsp;&nbsp;将专题 
        <select name="SpecialID" id="SpecialID">
        <%call ShowSpecial()%>
        </select>
        合并到
        <select name="TargetSpecialID" id="TargetSpecialID">
        <%call ShowSpecial()%>

⌨️ 快捷键说明

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