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

📄 user_myarticle.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_UserCommonCls.asp"-->
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:科汛网站管理系统 V2.2 SP2 Free
'Copyright (C) 2005-2006 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 User_MyArticle
KSCls.Execute()
Set KSCls = Nothing

Class User_MyArticle
        Private KSCMS,KSUser
		Private CurrentPage,totalPut
		Private RS,MaxPerPage
		Private ArticleStatus,ComeUrl
		Private Sub Class_Initialize()
			MaxPerPage =20
		  Set KSCMS=New CommonCls
		  Set KSUser = New UserCls
		End Sub
        Private Sub Class_Terminate()
		 Set KSCMS=Nothing
		 Set KSUser=Nothing
		End Sub
		Public Sub Execute()
		ComeUrl=Request.ServerVariables("HTTP_REFERER")
		IF Cbool(KSUser.UserLoginChecked)=false Then
		  Response.Write "<script>location.href='Login.asp';</script>"
		  Exit Sub
		End If
		KSUser.LoadHead()
		%>

		<TABLE height="540" cellSpacing=0 width=772 align=center border=0>
		<TR>
		<TD vAlign=top bgColor=#FFFFFF>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<td height="32">&nbsp;当前位置 >> <a href="<%=KSCMS.GetConfig("WebUrl")%>"><%=KSCMS.GetConfig("WebName")%></a> >> <a href="index.asp">会员中心</a> &gt;&gt; 文章管理 &gt;&gt; 我发布的文章 </td>
			  </tr>
			  <tr>
				<td>
				<%
				KSUser.LoadMenu()
				%>
				</td>
			  </tr>
			</table>
				<%Call KSUser.ArticleMenu
				
				
				IF KSCMS.G("Action")="Del" Then
				  Dim ID:ID=KSCMS.G("ID")
				  If ID="" Then Call KSCMS.Alert("你没有选中要删除的文章!",ComeUrl):Response.End
				  Conn.Execute("Delete From KS_UserArticle Where ID In(" & ID & ")")
				  Response.Redirect ComeUrl
				End IF
			  %>
			   <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;
					}
				  }
               </SCRIPT>
			   <%
			   		       If KSCMS.G("page") <> "" Then
						          CurrentPage = KSCMS.ChkClng(KSCMS.G("page"))
							Else
								  CurrentPage = 1
							End If
                                    
									Dim Param:Param=" Where UserName='"& KSUser.Get_UserName &"'"
                                    ArticleStatus=KSCMS.G("Status")
									If ArticleStatus="" or not isnumeric(ArticleStatus) Then ArticleStatus=4
                                    IF ArticleStatus<>4 Then 
									   Param= Param & " and Status=" & ArticleStatus
									End If
									IF KSCMS.G("Flag")<>"" Then
									  IF KSCMS.G("Flag")=0 Then Param=Param & " And Title like '%" & KSCMS.G("KeyWord") & "%'"
									  IF KSCMS.G("Flag")=1 Then Param=Param & " And KeyWords like '%" & KSCMS.G("KeyWord") & "%'"
									End if
									If KSCMS.G("ClassID")<>"" And KSCMS.G("ClassID")<>"0" Then Param=Param & " And ClassID='" & KSCMS.G("ClassID") & "'"
									Dim Sql:sql = "select * from KS_UserArticle "& Param &" order by AddDate DESC"

			   %>

					     <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td width="50"><img src="Images/ADD.gif" width="36" height="27" /></td>
                                <td height="50"><span class="font3">
								<%
								  Select Case ArticleStatus
								   Case 0 
								    Response.Write("草稿")
								   Case 1
								    Response.Write("待审")
								   Case 2
								    Response.Write("被退稿")
								   Case 3
                                     Response.Write("已审")
                                   Case Else
								     Response.Write ("所有")
								   End Select
								  %>文章列表</span>
							    </td>
                              </tr>
                      </table>
					
				     <table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
                                      <tr>
                                        <td height="3" bgcolor="98984B"></td>
                                      </tr>
                                      <tr>
                                        <td height="22">
										  <table width="100%" height="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="dfdfdf" bgcolor="F6F6F6">
                                          <tr>
                                            <td>
											 <table width="100%" height="22"  border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                  <td width="5%" height="22" align="center" class="font6">选中</td>
                                                  <td width="12%" align="center" class="font6">所属栏目</td>
                                                  <td width="35%" height="22" align="center" class="font6">文章标题</td>
												  <td width="10%" height="22" align="center" class="font6">文章录入</td>
                                                  <td width="18%" height="22" align="center" class="font6">添加时间</td>
                                                  <td width="10%" height="22" align="center" class="font6">状态</td>
                                                  <td height="22" align="center" class="font6">管理操作</td>
                                                </tr>
                                            </table></td>
                                          </tr>
                                        </table>
										</td>
                                      </tr>
          </table>

								  <table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">
                                      <%
									Set RS=Server.CreateObject("AdodB.Recordset")
									RS.open sql,conn,1,1
								 If RS.EOF And RS.BOF Then
								  Response.Write "<tr><td height=180 valign=top>没有你要的文章!</td></tr>"
								 Else
									totalPut = RS.RecordCount
						
											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
										RS.Move (CurrentPage - 1) * MaxPerPage
										Call showContent
									Else
										CurrentPage = 1
										Call showContent
									End If
								End If
				End If
     %>                      <tr>
                                  <td height="45" align="center">
								   <table  border="0" cellpadding="0" cellspacing="0">
                                     <form action="User_MyArticle.asp" method="post" name="searchform">
									  <tr>
                                        <td>
										文章搜索:
										  <select name="Flag">
										   <option value="0">标题</option>
										   <option value="1">关键字</option>
									      </select>
										  <select size='1' name='ClassID'>
										 <option value="0">-请选择文章栏目-</option>
                                          <%=KSCMS.ReturnAllowTree(0, 1)%>
                                        </select>
										  关键字
										  <input type="text" name="KeyWord" class="textbox" value="关键字" size=20>&nbsp;<input class="inputbutton" type="submit" name="submit1" value="搜索">
                                        </td>
                                      </tr>
								    </form>
                                  </table>
							      </td>
                                </tr>
                           
                        </table>
			 
		  </TD>
		  </TR>
</TABLE>
		  
		  <%
       KSUser.LoadFoot()
  End Sub
  
  Sub ShowContent()
     Dim I
    Response.Write "<FORM Action=""User_MyArticle.asp?Action=Del"" name=""myform"" method=""post"">"
   Do While Not RS.Eof
         %>
            <tr>
                   <td>
					 <table width="100%" height="25"  border="0" cellpadding="0" cellspacing="0" align="center">
                                          <tr bgcolor=#ffffff  onmouseover="this.style.background='#F5f5f5'" onmouseout="this.style.background='#FFFFFF'">
                                            <td width="5%" height="22" align="center" class="font6">
											<INPUT id="ID" onclick="unselectall()" type="checkbox" value="<%=RS("ID")%>"  name="ID">
											</td>
                                            <td width="12%" align="center" class="font6"><%=KSCMS.ReturnClassName(RS("ClassID"))%></td>
                                            <td width="35%" height="22" align="left"><a href="User_ShowArticle.asp?id=<%=rs("id")%>" target="_blank" class="link3"><%=KSCMS.GotTopic(trim(RS("title")),35)%></a></td>
											<td width="10%" height="22" align="center" class="font6"><%=rs("UserName")%></td>
                                            <td width="18%" height="22" align="center" class="font6"><%=rs("AddDate")%></td>
                                            <td width="10%" height="22" align="center" class="font6">
											  <%Select Case rs("Status")
											   Case 0
											     Response.Write "<span class=""font10"">草稿</span>"
											   Case 1
											     Response.Write "<span class=""font11"">待审</span>"
                                               Case 2
											     Response.Write "<span class=""font12"">退稿</span>"
                                               Case 3
											     Response.Write "<span class=""font13"" title=""审核日期:" & rs("VerifyDate") &""">已审</span>"
                                              end select
											  %></td>
                                            <td height="22" align="center">
											<%if rs("status")<>3 then%>
											<a href="User_EditArticle.asp?id=<%=rs("id")%>&page=<%=CurrentPage%>" class="link3">修改</a> <a href="User_MyArticle.asp?action=Del&ID=<%=rs("id")%>" onclick = "return (confirm('确定删除文章吗?'))" class="link3">删除</a>
											<%else%>
											 <a href="User_MyArticle.asp?action=Del&ID=<%=rs("id")%>" onclick = "return (confirm('确定删除文章吗?'))" class="link3">删除</a>
											<%end if%>
											</td>
                                          </tr>
                     </table></td>
            </tr>
                                      <tr>
                                        <td background="images/bg.gif"></td>
                                      </tr>
                                      <%
							RS.MoveNext
							I = I + 1
					  If I >= MaxPerPage Then Exit Do
				    Loop
%>
								<tr>
								  <td valign=top>
								<TABLE width="765" border=0 align="center" cellPadding=0 cellSpacing=0>
								<TBODY>
								<TR>
								  <TD width=200 height=30>&nbsp;<INPUT id="chkAll" onclick="CheckAll(this.form)" type="checkbox" value="checkbox"  name="chkAll">&nbsp;选中本页显示的所有文章</TD>
								  <TD><INPUT onClick="return(confirm('确定删除选中的文章吗?'));" type=submit value=删除选定的文章 name=submit1>
								
							</TD></TR></TBODY></TABLE>
				
								  </td>
								  </FORM>
								</tr>
								<% IF totalPut>MaxPerPage Then%>
                                <tr>
                                  <td height="30" background="images/MenuBottomBg.gif">
								  <table width="765" border="0" align="center" cellpadding="0" cellspacing="0">
                                      <tr>
                                        <td align="right">
										<%
							Call  KSCMS.ShowPageParamter(totalPut, MaxPerPage, "User_MyArticle.asp", True, "篇文章", CurrentPage, "Status=" & ArticleStatus)
							  
										%>
                                        </td>
                                      </tr>
                                  </table>
							      </td>
                                </tr>
					<%End IF
  End Sub
End Class
%>

⌨️ 快捷键说明

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