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

📄 article_userarticlemain.asp

📁 SK信息采集2.0功能介绍: 1.可针对任何静态网页,动态网页进行采集。包括htm,html,shtml,ASP,ASPX,JSP,PHP等。 2.增加自定文件采集.用户可采集网页中的所有文件.
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<!--#include file="../../Conn.asp"-->
<!--#include file="../../SysCls/KS_CommonCls.asp"-->
<!--#include file="../Inc/Session.asp"-->
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:科汛网站管理系统 V2.2 SP2 Free
'Copyright (C) 2006-2008 Kesion.Com  All rights reserved.
'产品咨询QQ:9537636,41904294
'技术支持QQ:111394,54004407 
'程序版权:科汛网络
'程序开发:科汛网络开发组(总策划:林文仲)
'E-Mail  :kesioncms@hotmail.com webmaster@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, ArticleStatus:
        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, "KMA10019") Then
		  .Write ("<script>")
		  .Write ("alert('您没有此项操作的权限!');history.back();")
		  .Write ("parent.frames['BottomFrame'].location.href='javascript:history.back();';</script>")
		End If

		 ArticleStatus=KSCMS.G("ArticleStatus")
		 IF ArticleStatus="" Then ArticleStatus=1


		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=""../Inc/Admin_Style.CSS"" rel=""stylesheet"" type=""text/css"">"
		.Write "<script language=""JavaScript"">" & vbCrLf
		.Write "var Page='" & CurrentPage & "';" & vbCrLf
		.Write "var ArticleStatus=" & ArticleStatus & ";" &vbcrlf
		.Write "</script>" & vbCrLf
		.Write "<script language=""JavaScript"" src=""../JS/Common.js""></script>"
		.Write "<script language=""JavaScript"" src=""../JS/ContextMenu.js""></script>"
		.Write "<script language=""JavaScript"" src=""../JS/SelectElement.js""></script>"
		.Write "<script language=""JavaScript"" src=""../Common/ArticleUserFunction.JS""></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  name=""Option1"" onclick=""location.href='Article_UserArticleMain.asp?ArticleStatus=4&Page=" & CurrentPage & "';"" title=""查看会员投稿的所有文章"" type=""radio"""
			   If ArticleStatus=4 Then .Write " Checked"
			   .Write "> 会员投稿的所有文章"

			   .Write "<input  name=""Option1"" onclick=""location.href='Article_UserArticleMain.asp?ArticleStatus=1&Page=" & CurrentPage & "';"" title=""查看未审核的文章"" type=""radio"""
			   If ArticleStatus=1 Then .Write " Checked"
			   .Write "> 待审文章"
			   .Write "<input  name=""Option1"" onclick=""location.href='Article_UserArticleMain.asp?ArticleStatus=3&Page=" & CurrentPage & "';"" title=""查看已审核的文章"" type=""radio"""
			   If ArticleStatus=3 Then .Write " Checked"
			   .Write "> 已审文章"
		   
			   .Write "<input  name=""Option1"" onclick=""location.href='Article_UserArticleMain.asp?ArticleStatus=0&Page=" & CurrentPage & "';"" title=""查看会员草稿的文章"" type=""radio"""
			   If ArticleStatus=0 Then .Write " Checked"
			   .Write "> 会员草稿的文章"
		
			   .Write "<input  name=""Option1"" onclick=""location.href='Article_UserArticleMain.asp?ArticleStatus=2&Page=" & CurrentPage & "';"" title=""查看被退稿的文章"" type=""radio"""
			   If ArticleStatus=2 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=""44%"" 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>"

           Select Case KSCMS.G("Action")
		     Case "Del"
		       Conn.Execute("Delete From KS_UserArticle Where Status<>0 And ID In (" & KSCMS.G("ID") & ")")
			 Case "Back"
			   Conn.Execute("Update KS_UserArticle Set Status=2 Where ID In(" &KSCMS.G("ID")& ")")
		   End Select

           Set RSObj = Server.CreateObject("ADODB.RecordSet")
     
		   		   
		   IF ArticleStatus<>4 Then
           SqlStr = "SELECT * FROM KS_UserArticle Where Status=" & ArticleStatus
		   Else
           SqlStr = "SELECT * FROM KS_UserArticle"
		   End IF
            
		  
           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_UserArticle")(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
          .Write "<tr bgcolor=""#ffffff"" onMouseOver=""this.style.background='#EEF8FE'"" onMouseOut=""this.style.background='#FFFFFF'"">"
          .Write "  <td height='20'> &nbsp;&nbsp; <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("UserName") & " </td>"
          .Write "  <td align='center'><FONT Color=red>" & RSObj("AddDate") & "</font> </td>"
		  .Write "  <td align='center'>"
		                                    
											Select Case RSObj("Status")
											   Case 0
											     .Write "<font color=#cccccc>草稿</font>"
											   Case 1
											     .Write "<font color=red>待审</font>"
                                               Case 2
											     .Write "<font color=blue>退稿</font>"
                                               Case 3
											     .Write "<font color=green>已审</font>"
                                              end select
		  
		  .Write " </td><td width='19%' align='center'>"
		  
		  IF RSObj("status") <>0 Then         '草稿文章,不允许对其操作
			  If RSObj("status") <>3  Then   '已审核或草稿文章不允许操作
			   .Write "  <a href=""#""  onclick=""parent.frames['BottomFrame'].location.href='../Split.asp?ButtonSymbol=AddArticle&OpStr=文章管理 >> <font color=red>签收会员文章</font>';location.href='Article_Add.asp?Page=" & CurrentPage & "&Action=Verify&ID="&RSObj("ID")&"&ArticleStatus=" & ArticleStatus & "';"">审核</a>"
			  If RSObj("Status")<>2 Then
			 .Write "&nbsp;<a href='Article_UserArticleMain.asp?Action=Back&ArticleStatus=" & ArticleStatus&"&Page=" & CurrentPage & "&ID=" & RSObj("ID") & "'>退稿</a>"
			 End IF
	         End If
			 IF RSObj("Status")<>3 Then
			  .Write "&nbsp;<a href='Article_EditUserArticle.asp?ArticleStatus=" & ArticleStatus&"&Page=" & CurrentPage & "&ID=" & RSObj("ID") & "'>编辑</a>"
			 End IF
			 
			 .Write " &nbsp;<a onclick=""return(confirm('确定删除文章吗?'))"" href='Article_UserArticleMain.asp?ArticleStatus=" & ArticleStatus&"&Action=Del&Page=" & CurrentPage & "&ID=" & RSObj("ID") & "'>删除</a>"
		Else
		  .Write "<font color=#cccccc>不允许操作</font>"	  
		End IF
		 
          .Write "</td></tr>"
        I = I + 1
          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, "Article_UserArticleMain.asp", True, "篇文章", CurrentPage, "ArticleStatus=" & ArticleStatus)
	   End With
     End Sub

End Class
%>

⌨️ 快捷键说明

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