?? admin_articlemanage.asp
字號:
<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true
Const PurviewLevel=2
Const CheckChannelID=2
Const PurviewLevel_Article=3
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="Admin_ChkPurview.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="inc/admin_code_article.asp"-->
<%
dim strFileName,FileName
const MaxPerPage=20
dim totalPut,CurrentPage,TotalPages
dim i,j
dim keyword,strField
dim sql,rsArticleList
dim ClassID
dim PurviewChecked
dim strAdmin,arrAdmin
dim tClass,ClassName,RootID,ParentID,Depth,ParentPath,Child,ChildID,tID,tChild,ClassMaster
dim SkinID,LayoutID,BrowsePurview,AddPurview
dim ManageType
ManageType=trim(request("ManageType"))
PurviewChecked=false
FileName="Admin_ArticleManage.asp"
ClassID=Trim(request("ClassID"))
keyword=trim(request("keyword"))
if keyword<>"" then
keyword=ReplaceBadChar(keyword)
end if
strField=trim(request("Field"))
if ClassID="" then
ClassID=0
if strField="" and AdminPurview=2 and AdminPurview_Article=3 and ManageType<>"MyArticle" then
set tClass=conn.execute("select ClassName,RootID,ParentID,Depth,ParentPath,Child,ClassMaster,ClassID From ArticleClass where ClassMaster like '%" & AdminName & "%'")
do while not tClass.eof
if CheckClassMaster(tClass(6),AdminName)=true then
ClassName=tClass(0)
RootID=tClass(1)
ParentID=tClass(2)
Depth=tClass(3)
ParentPath=tClass(4)
Child=tClass(5)
ClassMaster=tClass(6)
ClassID=tClass(7)
PurviewChecked=True
exit do
end if
tClass.movenext
loop
end if
else
ClassID=CLng(ClassID)
end if
if ClassID>0 and PurviewChecked=False then
set tClass=conn.execute("select ClassName,RootID,ParentID,Depth,ParentPath,Child,ClassMaster From ArticleClass where ClassID=" & ClassID)
if tClass.bof and tClass.eof then
founderr=True
ErrMsg=ErrMsg & "<br><li>找不到指定的欄目</li>"
Call WriteErrMsg()
response.end
else
ClassName=tClass(0)
RootID=tClass(1)
ParentID=tClass(2)
Depth=tClass(3)
ParentPath=tClass(4)
Child=tClass(5)
ClassMaster=tClass(6)
PurviewChecked=CheckClassMaster(tClass(6),AdminName)
if PurviewChecked=False and ParentID>0 then
set tClass=conn.execute("select ClassMaster from ArticleClass where ClassID in (" & ParentPath & ")")
do while not tClass.eof
PurviewChecked=CheckClassMaster(tClass(0),AdminName)
if PurviewChecked=True then exit do
tClass.movenext
loop
end if
end if
end if
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
if ManageType="MyArticle" then
FileName=FileName & "?ManageType=" & ManageType
strFileName=FileName & "&ClassID=" & ClassID & "&strField=" & strField & "&keyword=" & keyword
else
strFileName=FileName & "?ClassID=" & ClassID & "&strField=" & strField & "&keyword=" & keyword
end if
%>
<html>
<head>
<title>文章管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<link rel="stylesheet" type="text/css" href="Admin_Style.css">
<SCRIPT language=javascript>
function unselectall()
{
if(document.myform.chkAll.checked){
document.myform.chkAll.checked = document.myform.chkAll.checked&0;
}
}
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.Name != "chkAll"&&e.disabled==false)
e.checked = form.chkAll.checked;
}
}
function ConfirmDel()
{
if(document.myform.Action.value=="Del")
{
document.myform.action="Admin_ArticleDel.asp";
if(confirm("確定要刪除選中的文章嗎?本操作將把選中的文章移到回收站中。必要時您可從回收站中恢復!"))
return true;
else
return false;
}
else
{
document.myform.action="Admin_ArticleMove.asp";
if(document.myform.TargetClassID.value=="")
{
alert("不能將文章移動到含有子欄目的欄目或外部欄目中!");
return false;
}
if(confirm("確定要將選中的文章移動到指定的欄目嗎?"))
return true;
else
return false;
}
}
</SCRIPT>
</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="Admin_ArticleManage.asp">文章管理首頁</a> | <a href="Admin_ArticleAdd1.asp">添加文章(簡潔模式)</a> | <a href="Admin_ArticleAdd2.asp">添加文章(高級模式)</a> | <a href="Admin_ArticleCheck.asp">審核文章</a>
<%if AdminPurview=1 or AdminPurview_Article<=2 then %>| <a href="Admin_ArticleManageSpecial.asp">專題文章管理</a><%end if%>
<%if AdminPurview=1 or AdminPurview_Article=1 then %>| <a href="Admin_ArticleRecyclebin.asp">文章回收站管理</a>
| <a href="Admin_ArticleComment.asp">文章評論管理</a><%end if%>
</td>
</tr>
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr class="title">
<td height="22"><%call Admin_ShowRootClass()%></td>
</tr>
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="22"><%call Admin_ShowPath("文章管理")%></td>
<td width="200" height="22" align="right">
<select name='JumpClass' id="JumpClass" onchange="if(this.options[this.selectedIndex].value!=''){location='<%=FileName & "?ClassID="%>'+this.options[this.selectedIndex].value;}">
<option value='' selected>跳轉欄目至…</option>
<%call Admin_ShowClass_Option(2,0)%>
</select>
</td>
</tr>
</table>
<%
sql="select A.ArticleID,A.ClassID,C.ClassName,A.Title,A.Key,A.Author,A.CopyFrom,A.UpdateTime,A.Editor,"
sql=sql & "A.Hits,A.OnTop,A.Hot,A.Elite,A.Passed,A.IncludePic,A.Stars,A.PaginationType,A.ReadLevel,A.ReadPoint from Article A"
sql=sql & " inner join ArticleClass C on A.ClassID=C.ClassID where A.Deleted=False"
if ClassID>0 then
if Child>0 then
ChildID=""
set tClass=conn.execute("select ClassID from ArticleClass where ParentID=" & ClassID & " or ParentPath like '" & ParentPath & "," & ClassID & ",%'")
do while not tClass.eof
if ChildID="" then
ChildID=tClass(0)
else
ChildID=ChildID & "," & tClass(0)
end if
tClass.movenext
loop
sql=sql & " and A.ClassID in (" & ChildID & ")"
else
sql=sql & " and A.ClassID=" & ClassID
end if
end if
if ManageType="MyArticle" then
sql=sql & " and A.Editor='" & AdminName & "' "
else
if keyword<>"" then
select case strField
case "Title"
sql=sql & " and A.Title like '%" & keyword & "%' "
case "Content"
sql=sql & " and A.Content like '%" & keyword & "%' "
case "Author"
sql=sql & " and A.Author like '%" & keyword & "%' "
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -