不知道改的是否正确,将以下代码保存为,先备份admin\Admin_ArticleUser.asp文件 ,然后将下面的代码保存为Admin_ArticleUser.asp,替换admin\Admin_ArticleUser.asp文件
[replyview]
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<!--#include file="../Conn.asp"-->
<!--#include file="../KS_Cls/KS_CommonCls.asp"-->
<!--#include file="Include/Session.asp"-->
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:在线商城免费版 V3.0 Sp1
'Copyright (C) 2006-2008 Kesion.Com All rights reserved.
'产品咨询QQ:9537636,41904294
'技术支持QQ:111394,54004407
'程序版权:科汛网络
'程序开发:科汛网络开发组(总策划:林文仲)
'E-Mail :kesioncms@hotmail.com service@kesion.com
'官方网站:http://www.kesion.com
'演示站点:http://test.kesion.com
'郑重声明:
' ①、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
' ②、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
' ③、科汛网络保留此软件的法律追究权利
'===================================================================================================================
Dim KSCls
Set KSCls = New Article_UserArticleMain
KSCls.Execute()
Set KSCls = Nothing
Class Article_UserArticleMain
Private KSCMS
Private I, totalPut, CurrentPage, SqlStr
Private RSObj, Verific
Private MaxPerPage
Private Sub Class_Initialize()
MaxPerPage = 20
Set KSCMS=New CommonCls
End Sub
Private Sub Class_Terminate()
Call KSCMS.CloseConn()
Set KSCMS=Nothing
End Sub
Public Sub Execute()
With Response
If Not KSCMS.ReturnPowerResult(1, "KMA10018") Then
.Write ("<script>")
.Write ("alert('您没有此项操作的权限!');history.back();")
.Write ("parent.frames['BottomFrame'].location.href='javascript:history.back();';</script>")
End If
Select Case KSCMS.G("Action")
Case "Verify"
Call VerificAll()
Case "Back"
Call BackAll()
Case "Del"
Call DelAll()
Case Else
Call MainList()
End Select
End With
End Sub
Sub MainList()
With Response
Verific=KSCMS.G("Verific"):IF Verific="" Then Verific=0
If Request("page") <> "" Then
CurrentPage = CInt(Request("page"))
Else
CurrentPage = 1
End If
.Write "<script>" & vbCrLf
.Write "parent.frames['LeftFrame'].LeftInfoFrame.SetEnabledStatus(true);" & vbCrLf
.Write "</script>" & vbCrLf
.Write "<html>"
.Write "<head>"
.Write "<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">"
.Write "<title>签收文章管理</title>"
.Write "<link href=""Include/Admin_Style.CSS"" rel=""stylesheet"" type=""text/css"">"
.Write "<script language=""JavaScript"">" & vbCrLf
.Write "var Page='" & CurrentPage & "';" & vbCrLf
.Write "var Verific=" & Verific & ";" &vbcrlf
.Write "</script>" & vbCrLf
.Write "<script language=""JavaScript"" src=""Include/Common.js""></script>"
.Write "<script language=""JavaScript"" src=""Include/ContextMenu1.js""></script>"
.Write "<script language=""JavaScript"" src=""Include/SelectElement.js""></script>"
%>
<script language="javascript">
var DocElementArrInitialFlag=false;
var DocElementArr = new Array();
var DocContextMenuArr=new Array();
var SelectedFile='',SelectedFolder='';
function document.onreadystatechange()
{ if (DocElementArrInitialFlag) return;
InitialDocElementArr('FolderID','ArticleID');
InitialContextMenu();
DocElementArrInitialFlag=true;
}
function InitialContextMenu()
{DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("window.parent.ViewArticle(0);",'查看文章(V)','disabled');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("window.parent.VerificAll();",'批量审核(S)','disabled');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("window.parent.Back();",'批量退稿(B)','disabled');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem('seperator','','');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("parent.SelectAllElement();",'全 选(A)','disabled');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("parent.DelArticle();",'删除文章(D)','disabled');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem('seperator','','');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("parent.location.reload();",'刷 新(Z)','disabled');
}
function DocDisabledContextMenu()
{
DisabledContextMenu('FolderID','ArticleID','批量审核(S),批量退稿(B),查看文章(V),删除文章(D)','查看文章(V)','','','','')
}
function VerificAll()
{
GetSelectStatus('FolderID','ArticleID');
if (SelectedFile!='')
{
location.href="Admin_ArticleUser.asp?Page="+Page+"&Action=Verify&ID="+SelectedFile;
}
else
alert('请选择文章!');
}
function Back()
{
GetSelectStatus('FolderID','ArticleID');
if (SelectedFile!='')
{
location.href="Admin_ArticleUser.asp?Page="+Page+"&Action=Back&ID="+SelectedFile;
}
else
alert('请选择文章!');
}
function DelArticle()
{
GetSelectStatus('FolderID','ArticleID');
if (SelectedFile!='')
{
if (confirm('真的要删除选中的文章吗?'))
location.href="Admin_ArticleUser.asp?Action=Del&Verific="+Verific+"&Page="+Page+"&ID="+SelectedFile;
}
else
{
alert('请选择要删除的文章!');
}
SelectedFile='';
}
function ViewArticle(ArticleID)
{
if (ArticleID==0)
{
GetSelectStatus('FolderID','ArticleID');
if (SelectedFile!='')
{
if (SelectedFile.indexOf(',')==-1)
{
window.open('../Article/ShowInfo.asp?id='+SelectedFile);
}
else
alert('一次仅能查看一篇文章!');
}
else
alert('请选择一篇文章!');
SelectedFile='';
}
else
window.open('../Article/ShowInfo.asp?id='+ArticleID);
}
function GetKeyDown()
{
if (event.ctrlKey)
switch (event.keyCode)
{ case 90 : location.reload(); break;
case 65 : SelectAllElement();break;
case 66 : Back();break;
case 86 : event.keyCode=0;event.returnValue=false;ViewArticle(0); break;
case 67 : event.keyCode=0;event.returnValue=false;VerificAll();break;
case 68 : DelArticle();break;
}
else
if (event.keyCode==46)DelArticle();
}
</script>
<%
.Write "</head>"
.Write "<body scroll=no topmargin=""0"" leftmargin=""0"" onclick=""SelectElement();"" onkeydown=""GetKeyDown();"" onselectstart=""return false;"">"
.Write "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" class=""sortbutton"">"
.Write " <tr>"
.Write " <td height=""23""> "
.Write "<input class=""buttonstyle"""
If Verific<>0 Then .Write " Disabled"
.Write " name=""CommentButton"" title=""批量审核"" type=""button"" value=""批量审核"" onclick=""VerificAll();"" >"
.Write "<input class=""buttonstyle"""
If Verific<>0 Then .Write " Disabled"
.Write " name=""CommentButton"" title=""批量退稿"" type=""button"" value=""批量退稿"" onclick=""Back();"" >"
.Write "<input class=""buttonstyle"" name=""CommentButton"" title=""批量删除"" type=""button"" value=""批量删除"" onclick=""DelArticle();"" >"
.Write " 查看选项:"
.Write "<input name=""Option1"" onclick=""location.href='Admin_ArticleUser.asp?Verific=0&Page=" & CurrentPage & "';"" title=""查看未审核的文章"" type=""radio"""
If Verific=0 Then .Write " Checked"
.Write "> 待审文章"
.Write "<input name=""Option1"" onclick=""location.href='Admin_ArticleUser.asp?Verific=2&Page=" & CurrentPage & "';"" title=""查看会员草稿的文章"" type=""radio"""
If Verific=2 Then .Write " Checked"
.Write "> 会员草稿的文章"
.Write "<input name=""Option1"" onclick=""location.href='Admin_ArticleUser.asp?Verific=3&Page=" & CurrentPage & "';"" title=""查看被退稿的文章"" type=""radio"""
If Verific=3 Then .Write " Checked"
.Write "> 被退稿文章"
.Write (" </td>")
.Write ("</tr>")
.Write ("</table>")
.Write "<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""1"">"
.Write " <tr>"
.Write " <td width=""14%"" height=""25"" class=""sort"">"
.Write " <div align=""center"">文章栏目</div></td>"
.Write " <td width=""30%"" height=""25"" class=""sort"">"
.Write " <div align=""center"">文章标题</div></td>"
.Write " <td width=""10%"" class=""sort""><div align=""center"">投稿者</div></td>"
.Write " <td width=""20%"" align=""center"" class=""sort"">发表时间</td>"
.Write " <td width=""10%"" class=""sort""><div align=""center"">状态</div></td>"
.Write " <td width=""29%"" class=""sort""><div align=""center"">管理操作</div></td>"
.Write " </tr>"
Set RSObj = Server.CreateObject("ADODB.RecordSet")
SqlStr = SqlStr & "Select Art.ID as ID,Art.Tid as Tid,Art.Title as Title,Art.ArticleInput as ArticleInput,Art.Verific as Verific,Art.AddDate as AddDate,"
SqlStr = SqlStr & "Cls.ID as CID,Cls.FolderName as fn "
SqlStr = SqlStr & "From KS_Article as Art,KS_Class as Cls Where Art.Verific=" & Verific
SqlStr = SqlStr & " and Art.Tid=Cls.ID "
SqlStr = SqlStr & " order by AddDate desc"
RSObj.Open SqlStr, conn, 1, 1
If RSObj.EOF And RSObj.BOF Then
Else
totalPut = Conn.Execute("Select Count(ID) From KS_Article where verific=" & Verific)(0)
If CurrentPage < 1 Then
CurrentPage = 1
End If
If (CurrentPage - 1) * MaxPerPage > totalPut Then
If (totalPut Mod MaxPerPage) = 0 Then
CurrentPage = totalPut \ MaxPerPage
Else
CurrentPage = totalPut \ MaxPerPage + 1
End If
End If
If CurrentPage = 1 Then
Call showContent
Else
If (CurrentPage - 1) * MaxPerPage < totalPut Then
RSObj.Move (CurrentPage - 1) * MaxPerPage
Call showContent
Else
CurrentPage = 1
Call showContent
End If
End If
End If
.Write " </td>"
.Write " </tr>"
.Write "</table>"
.Write "</body>"
.Write "</html>"
End With
End Sub
Sub showContent()
With Response
Do While Not RSObj.EOF
If KSCMS.ReturnPowerResult(1, Trim(RSObj("Tid"))) Then
.Write "<tr bgcolor=""#ffffff"" onMouseOver=""this.style.background='#EEF8FE'"" onMouseOut=""this.style.background='#FFFFFF'"">"
.Write "<td height='20'>" & KSCMS.GotTopic(RSObj("fn"), 12) & "</td>"
.Write " <td height='20'> <span ArticleID='" & RSObj("ID") & "' ondblclick=""ViewArticle(this.ArticleID)"" title=""" & RSObj("Title") & """><img src='Images/Folder/TheSmallWordNews1.gif' align='absmiddle'>"
.Write " <span style='cursor:default;'>" & KSCMS.GotTopic(RSObj("Title"), 45) & "</span></span> "
.Write " </td>"
.Write " <td align='center'>" & RSObj("ArticleInput") & " </td>"
.Write " <td align='center'><FONT Color=red>" & RSObj("AddDate") & "</font> </td>"
.Write " <td align='center'>"
Select Case RSObj("verific")
Case 0
.Write "<font color=red>待审</font>"
Case 1
.Write "<font color=red>已审</font>"
Case 2
.Write "<font color=#cccccc>草稿</font>"
Case 3
.Write "<font color=green>退稿</font>"
end select
.Write " </td><td width='19%' align='center'>"
IF RSObj("Verific") <>2 Then '草稿文章,不允许对其操作
If RSObj("Verific") <>3 Then '已审核或草稿文章不允许操作
.Write " <a href=""#"" onclick=""parent.frames['BottomFrame'].location.href='Split.asp?ButtonSymbol=AddArticle&OpStr=文章管理 >> <font color=red>签收会员文章</font>';location.href='Admin_Article.asp?Page=" & CurrentPage & "&Action=Verify&ID="&RSObj("ID")&"&Verific=" & Verific & "';"">审核</a>"
If RSObj("Verific")<>2 Then
.Write " <a href='Admin_ArticleUser.asp?Action=Back&Verific=" & Verific&"&Page=" & CurrentPage & "&ID=" & RSObj("ID") & "'>退稿</a>"
End IF
End If
.Write " <a onclick=""return(confirm('确定删除文章吗?'))"" href='Admin_ArticleUser.asp?Verific=" & Verific&"&Action=Del&Page=" & CurrentPage & "&ID=" & RSObj("ID") & "'>删除</a>"
Else
.Write "<font color=#cccccc>不允许操作</font>"
End IF
.Write "</td></tr>"
I = I + 1
End If
If I >= MaxPerPage Then Exit Do
RSObj.MoveNext
Loop
RSObj.Close
conn.Close
.Write "<tr><td height='26' colspan='5' align='right'>"
Call KSCMS.ShowPageParamter(totalPut, MaxPerPage, "Admin_ArticleUser.asp", True, "篇文章", CurrentPage, "Verific=" & Verific)
End With
End Sub
'批量审核
Sub VerificAll()
Conn.Execute("Update KS_Article Set Verific=1 Where Verific<>2 And ID In(" & KSCMS.G("ID") & ")")
Response.Redirect "?Page=" & KSCMS.G("Page")
End Sub
'批量退稿
Sub BackAll()
Conn.Execute("Update KS_Article Set Verific=3 Where Verific<>1 And ID In(" & KSCMS.G("ID") & ")")
Response.Redirect "?Page=" & KSCMS.G("Page")
End Sub
'批量删除
Sub DelAll()
Conn.Execute("Delete From KS_Article Where Verific<>2 And ID In (" & KSCMS.G("ID") & ")")
Response.Redirect "Admin_ArticleUser.asp?Page=" & KSCMS.G("Page") & "&Verific=" & KSCMS.G("Verific")
End Sub
End Class
%>
[/replyview]
[此贴子已经被作者于2006-11-29 16:02:56编辑过]