<!-- #include file="../conn.asp" -->
<!-- #include file="../cls_main.asp" -->
<!-- #include file="../cls_Mesky_showPage.asp" -->
<% MyDbPath = "../"
dim obj
set obj = New admin_cms_reslist
	obj.AspInit()
set obj = nothing

Class admin_cms_reslist
	Private BatchID, sID, sResName, sToolTip, Mesky
	Private Sub Class_Initialize()
		Set Mesky = New Cls_Main
		Founderr = False
	End Sub
	Private Sub Class_Terminate()
		Set Mesky = Nothing
	End Sub
	Public Sub AspInit()
		Response.Write "<HTML><HEAD><TITLE>文章管理</TITLE>" & vbCrLf
		Response.Write "<META http-equiv=Content-Type content=""text/html; charset=gb2312"">" & vbCrLf
		Response.Write "<LINK href=""admin.css"" type=text/css rel=stylesheet>" & vbCrLf
		Response.Write "</HEAD>" & vbCrLf
		Response.Write "<BODY leftmargin=""3"" topmargin=""0"">" & vbCrLf
		Response.Write "<script src=""../js/Mesky_Tooltip.js""></script>" & vbCrLf
		
		Dim sColumn, dTitle, sToolTip
		BatchID = Request.Form("ID")
		If Request.QueryString("ID") <> "" Then
			sID = CLng(Request.QueryString("ID"))
		Else
			sID = ""
		End If

			Call Mesky.LoadSetting
			If Mesky.adminName = "" Then
				Mesky.strMsg = "<li>非法操作：登录超时或你没有以管理员身份登录系统，<a href=""../admin_login.asp"" target=_top>点此进入管理员登录界面</a>。"
				Call Mesky.SystemMsg
			ElseIf myPermission() = False Then
				Mesky.strMsg = "<li>非法操作：你没有权限进行此项操作，请联系管理员！"
				Call Mesky.SystemMsg
			Else
				Call Main
			End If
		Response.Write "</BODY></HTML>" & vbCrLf
		
	End Sub
	Private Function myPermission()
		myPermission = False
		If Mesky.checkPermission(Mesky.adminName, "21") Then myPermission = True: Exit Function
		If Mesky.checkPermission(Mesky.adminName, "22") Then myPermission = True: Exit Function
		'If Mesky.checkPermission(Mesky.adminName,"10") Then myPermission = False
	End Function
	Private Sub Main()
		Call sMenu
		Call sForm
		Select Case Trim(Request("action"))
		Case "isBatchDel" '批量删除
			If Mesky.checkPermission(Mesky.adminName, "22") Then
				Mesky.strMsg = "<li>非法操作：你没有权限进行此项操作，请联系管理员！"
				Call Mesky.SystemMsg
			Else
				Call isBatchDel
			End If
		Case "isBatchAuditing" '批量审核
			Call isBatchAuditing
		Case "unBatchAuditing" '批量取消审核
			Call unBatchAuditing
		Case "isBatchTop" '批量置顶
			Call isBatchTop
		Case "unBatchTop" '批量取消置顶
			Call unBatchTop
		Case "isBatchHot" '批量推荐
			Call isBatchHot
		Case "unBatchHot" '批量取消推荐
			Call unBatchHot
		Case "isBatchBest" '批量精品
			Call isBatchBest
		Case "unBatchBest" '批量取消精品
			Call unBatchBest
		Case "isBatchMov" '批量移动
			Call isBatchMov
		Case "isDel" '删除
			If Mesky.checkPermission(Mesky.adminName, "22") Then
				Mesky.strMsg = "<li>非法操作：你没有权限进行此项操作，请联系管理员！"
				Call Mesky.SystemMsg
			Else
				Call isDel
			End If
		Case "isAuditing" '审核
			Call isAuditing
		Case "unAuditing" '取消审核
			Call unAuditing
		Case "isTop" '置顶
			Call isTop
		Case "unTop" '取消置顶
			Call unTop
		Case "isHot" '批量推荐
			Call isHot
		Case "unHot" '批量取消推荐
			Call unHot
		Case "isBest" '批量精品
			Call isBest
		Case "unBest" '批量取消精品
			Call unBest
		Case Else
			Call Reslist
		End Select
	End Sub
	
	
	Private Sub Reslist()
		Dim Rs, sql, Keyword, i, q, sCatalog, sKeyword, sColumn, showPageRs, currentPage
		sColumn = "ID,CatalogID,CatalogName,dTitle,Title,FontColor,FontType,RedirectUrl,Writer,nFrom,DateAndTime,Hits,isHot,isTop,isBest,isPic,isAuditing,UserName"
		If Trim(Request.QueryString("Page")) = "" Then
			currentPage = 1
		Else
			currentPage = Trim(Request.QueryString("Page"))
		End If
		Set showPageRs = New cls_Mesky_showPage '创建对象
		If IsSqlDataBase = 1 Then
			showPageRs.DbType = "MSSQL_SP"
		Else
			showPageRs.DbType = "AC"
		End If
		showPageRs.RecType = 0
		showPageRs.RecSql = 0
		showPageRs.RecTerm = 1
		showPageRs.CookieName = "mesky_cms_reslist"
		showPageRs.Order = 1
		showPageRs.PageSize = 35
		showPageRs.currentPage = currentPage
		
		If Trim(Request("action")) = "s" Then
			Keyword = Mesky.checkStr(Request("keyword"))
			Select Case Request("sType")
			Case "Title"
				sKeyword = " (" & Mesky.translate(Keyword, "Title") & ")"
				q = "&action=s&sType=Title&catalog=" & Request("catalog") & "&keyword=" & Keyword
			Case "Writer"
				sKeyword = " (" & Mesky.translate(Keyword, "Writer") & ")"
				q = "&action=s&sType=Writer&catalog=" & Request("catalog") & "&keyword=" & Keyword
			Case "Excerpt"
				sKeyword = " (" & Mesky.translate(Keyword, "Excerpt") & ")"
				q = "&action=s&sType=Excerpt&catalog=" & Request("catalog") & "&keyword=" & Keyword
			Case "Content"
				sKeyword = " (" & Mesky.translate(Keyword, "Content") & ")"
				q = "&action=s&sType=Content&catalog=" & Request("catalog") & "&keyword=" & Keyword
			Case "UserName"
				sKeyword = " UserName = '" & Keyword & "'"
				q = "&action=s&sType=UserName&catalog=" & Request("catalog") & "&keyword=" & Keyword
			End Select
			
			If Keyword <> "" Then
				If Request("catalog") <> "" Then
					If Split(Request("catalog"), ",")(2) = 0 Then
						sCatalog = sKeyword & " and RootID = " & Split(Request("catalog"), ",")(0)
					Else
						sCatalog = sKeyword & " and catalogID=" & Split(Request("catalog"), ",")(1) & " and Depth>=" & Split(Request("catalog"), ",")(2) & " and RootID = " & Split(Request("catalog"), ",")(0)
					End If
				Else
					sCatalog = sKeyword & ""
				End If
			Else
				If Request("catalog") <> "" Then
					If Split(Request("catalog"), ",")(2) = 0 Then
						sCatalog = " RootID = " & Split(Request("catalog"), ",")(0)
					Else
						sCatalog = " catalogID=" & Split(Request("catalog"), ",")(1) & " and Depth>=" & Split(Request("catalog"), ",")(2) & " and RootID = " & Split(Request("catalog"), ",")(0)
					End If
				Else
					sCatalog = ""
				End If
				sKeyword = ""
			End If
		'Response.Write (sCatalog)
			showPageRs.sql = sColumn & "$Mesky_Cms_Resource$" & sCatalog & "$isTop desc,DateAndTime Desc$ID" '字段,表,条件(不需要where),排序(不需要需要ORDER BY),主键ID
		Else
			showPageRs.sql = sColumn & "$Mesky_Cms_Resource$$isTop desc,DateAndTime Desc$ID" '字段,表,条件(不需要where),排序(不需要需要ORDER BY),主键ID
		End If
		Dim iRecCount, sqlRs
		iRecCount = showPageRs.RecCount() '记录总数
		
		Response.Write (showPageRs.showPage("admin_cms_reslist.asp?Page={$pages}" & q))
		Response.Write "<script language=""JavaScript"">" & vbCrLf
		Response.Write "function doSort() {" & vbCrLf
		Response.Write "    var oE = window.event.srcElement;" & vbCrLf
		Response.Write "    for (var i=0;i<oE.rows[oE.headindex].cells.length;i++) {" & vbCrLf
		Response.Write "        oE.rows[oE.headindex].cells[i].children[1].innerText = """";" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "    oE.rows[oE.headindex].cells[window.event.sortIndex].children[1].innerText = window.event.sortOrder ? ""↑"" : ""↓"";" & vbCrLf
		Response.Write "}" & vbCrLf
		Response.Write "function sort() {" & vbCrLf
		Response.Write "    document.getElementById(""databox"").sort(2,false,""float"");" & vbCrLf
		Response.Write "}" & vbCrLf
		Response.Write "</script>" & vbCrLf
		Response.Write " <table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""0"">" & vbCrLf
		Response.Write "<form name=""myform"" method=""post"" action="""">" & vbCrLf
		Response.Write "  <tr>" & vbCrLf
		Response.Write "    <td><table width=""100%"" border=""0"" align=""center"" cellpadding=""3"" cellspacing=""1"" headindex=""0"" begin=""1"" end=""0"" onsort=""doSort()"" id=""databox"" style=""behavior:url(../js/sortrow1.11.htc)"">" & vbCrLf
		Response.Write "        <COLGROUP>" & vbCrLf
		Response.Write "              <COL width=26>" & vbCrLf
		Response.Write "              <COL width=*>" & vbCrLf
		Response.Write "              <COL width=65>" & vbCrLf
		Response.Write "              <COL width=40>" & vbCrLf
		Response.Write "              <COL width=80>" & vbCrLf
		Response.Write "              <COL width=40>" & vbCrLf
		Response.Write "              <COL width=120>" & vbCrLf
		Response.Write "        <tr height=""25"">" & vbCrLf
		Response.Write "          <td align=""center"" background=""../images/menubg.gif""><span><a href=""javascript:SelectAll()"" data-type=""none"">选择</a></span><span></span></td>" & vbCrLf
		Response.Write "          <td background=""../images/menubg.gif"">　<span>文章分类和文章名称</span><span></span></td>" & vbCrLf
		Response.Write "          <td align=""center"" background=""../images/menubg.gif""><span>日期</span><span></span></td>" & vbCrLf
		Response.Write "          <td align=""center"" background=""../images/menubg.gif""><span>用户</span><span></span></td>" & vbCrLf
		Response.Write "          <td align=""center"" background=""../images/menubg.gif"" data-type=""none""><span>文章属性</span><span></span></td>" & vbCrLf
		Response.Write "          <td align=""center"" background=""../images/menubg.gif""><span>审核</span><span></span></td>" & vbCrLf
		Response.Write "          <td align=""center"" background=""../images/menubg.gif"" data-type=""none""><span>常规操作</span><span></span></td>" & vbCrLf
		Response.Write "         </tr>" & vbCrLf
		Response.Write "<SCRIPT language = ""JavaScript"">" & vbCrLf
		Response.Write "//parent.frame.cols=""0,*"";" & vbCrLf
		Response.Write "function SelectAll() {" & vbCrLf
		Response.Write "    for (var i=0;i<document.myform.ID.length;i++) {" & vbCrLf
		Response.Write "        var e=document.myform.ID[i];" & vbCrLf
		Response.Write "        e.checked=!e.checked;" & vbCrLf
		Response.Write "    }" & vbCrLf
		Response.Write "}" & vbCrLf
		Response.Write "<!--" & vbCrLf
		Response.Write "function CheckAll(form)  {" & vbCrLf
		Response.Write "  for (var i=0;i<form.elements.length;i++)    {" & vbCrLf
		Response.Write "    var e = form.elements[i];" & vbCrLf
		Response.Write "    if (e.name != 'chkall')       e.checked = form.chkall.checked; " & vbCrLf
		Response.Write "   }" & vbCrLf
		Response.Write "  }" & vbCrLf
		Response.Write "//-->" & vbCrLf
		Response.Write "</script>   " & vbCrLf
		
		If iRecCount < 1 Then
			Response.Write "<tr bgcolor=""#FCFCFC""> <td colspan=""7"">Sorry！没有找到任何记录。</td></tr>"
		Else
			'Set sqlRs = showPageRs.ResultSet()  '返回ResultSet
			Rs =  showPageRs.ResultSet()  '返回ResultSet
			For i = 0 To UBound(Rs, 2)
				'设置文字颜色和字型
				If Rs(5, i) = "" Or IsNull(Rs(5, i)) Then
					dTitle = Rs(4, i)
				Else
					dTitle = "<font color=""" & Rs(5, i) & """>" & Rs(4, i) & "</font>"
				End If
				If Rs(6, i) = 1 Then
					dTitle = "<strong>" & dTitle & "</strong>"
				ElseIf Rs(6, i) = 2 Then
					dTitle = "<em>" & dTitle & "</em>"
				ElseIf Rs(6, i) = 3 Then
					dTitle = "<strong><em>" & dTitle & "</em></strong>"
				End If
				
				sToolTip = "<table border=0 cellspacing=1 cellpadding=0>" & _
				"<tr><td nowrap>标题：" & Rs(4, i) & "</td></tr>" & _
				"<tr><td>作者：" & Rs(8, i) & "</td></tr>" & _
				"<tr><td>出处：" & Rs(9, i) & "</td></tr>" & _
				"<tr><td>阅读：" & Rs(11, i) & "</td></tr></table>"
	
				Response.Write "        <tr "
				If i Mod 2 Then
					Response.Write (" class=""tdbg2""")
				Else
					Response.Write (" class=""tdbg3""")
				End If
				Response.Write "onmouseover=""this.style.backgroundColor='#CEE7FF';this.style.color='red'"" onmouseout=""this.style.backgroundColor='';this.style.color=''""> " & vbCrLf
				Response.Write "          <td align=""center"">" & vbCrLf
				If checkResAdmin(Rs(17, i)) = True Then
					Response.Write "<input name=""ID"" type=""checkbox"" value=""" & Rs(0, i) & """>"
				Else
					Response.Write "--"
				End If
				Response.Write "</td>" & vbCrLf
				Response.Write "          <td>" & vbCrLf
				Response.Write "[<a href=""?catalogID=" & Rs(1, i) & """ target=""_blank"">" & Rs(2, i) & "</a>]"
				Response.Write " <a href=""" & Replace(Mesky.Setting(101), "{$id}", Rs(0, i)) & """ target=""_blank"" onmouseover=""showToolTip('" & sToolTip & "',event.srcElement)"" onmouseout=""hiddenToolTip()"">" & dTitle & "</a>"
				Response.Write "</td>" & vbCrLf
				Response.Write "          <td align=""center"">" & Mesky.FormatMyDate(Rs(10, i), "{Y}/{m}/{d}") & "</td>" & vbCrLf
				Response.Write "      <td align=""center"">" & Rs(17, i) & "</td>" & vbCrLf
				Response.Write "          <td align=""center"">"
				If Rs(13, i) = 1 Then
					Response.Write "<font color=blue>顶 </font>"
				Else
					Response.Write "&nbsp;&nbsp;&nbsp;"
				End If
				If Rs(12, i) = 1 Then
					Response.Write "<font color=green>热 </font>"
				Else
					Response.Write "&nbsp;&nbsp;&nbsp;"
				End If
				If Rs(14, i) = 1 Then
					Response.Write "<font color=red>荐 </font>"
				Else
					Response.Write "&nbsp;&nbsp;&nbsp;"
				End If
				If Rs(15, i) = 1 Then
					Response.Write "<font color=blue>图 </font>"
				Else
					Response.Write "&nbsp;&nbsp;"
				End If
				Response.Write "</td>" & vbCrLf
				Response.Write "          <td align=""center"">"
				If Rs(16, i) = 1 Then
					Response.Write ("<a href=""?action=unAuditing&ID=" & Rs(0, i) & """><font color=red>√</font></a>")
				Else
					Response.Write ("<a href=""?action=isAuditing&ID=" & Rs(0, i) & """>待审</a>")
				End If
				Response.Write "</td>" & vbCrLf
				Response.Write "          <td align=""center"">"
				If checkResAdmin(Rs(17, i)) = True Then
					Response.Write "<a href=""admin_cms_resource.asp?action=edit&ID=" & Rs(0, i) & """ title=""修改下载资源信息"">修改</a> "
					Response.Write "<a href=""?action=isDel&ID=" & Rs(0, i) & """ onclick=""{if(confirm('执行此删除操作后该资源不能恢复，确定删除吗？')){return true;}return false;}"">删除</a> "
					If Rs(13, i) = 1 Then
						Response.Write "<a href=""?action=unTop&ID=" & Rs(0, i) & """>解固</a> "
					Else
						Response.Write "<a href=""?action=isTop&ID=" & Rs(0, i) & """>固顶</a> "
					End If
					If Rs(14, i) = 1 Then
						Response.Write "<a href=""?action=unBest&ID=" & Rs(0, i) & """><font color=red>消</font>荐</a>"
					Else
						Response.Write "<a href=""?action=isBest&ID=" & Rs(0, i) & """>推荐</a>"
					End If
				Else
					Response.Write "——"
				End If
				Response.Write "</td>" & vbCrLf
				Response.Write "        </tr>" & vbCrLf
			Next
			Rs = Null
			'Set sqlRs = Nothing
		End If
		
		Response.Write "</table>" & vbCrLf
		Response.Write "    <table width=""100%"" border=""0"" align=""center"" cellpadding=""3"" cellspacing=""1"">" & vbCrLf
		Response.Write "        <tr class=""tdbg3"">" & vbCrLf
		Response.Write "            <td><input type=checkbox name=chkall value=on onclick=""CheckAll(this.form)"" id=""chkall""><label for=""chkall"">全选</label><br>管理</td>" & vbCrLf
		Response.Write "            <td colspan=""6""><input type=""radio"" name=""action"" value=""isBatchDel"">批量<font color=red>删除</font>" & vbCrLf
		Response.Write "            <input type=""radio"" name=""action"" value=""isBatchTop"">批量<font color=blue>置顶</font>" & vbCrLf
		Response.Write "            <input type=""radio"" name=""action"" value=""unBatchTop"">取消<font color=blue>置顶</font>" & vbCrLf
		Response.Write "            <input type=""radio"" name=""action"" value=""isBatchHot"">批量<font color=green>热点</font>" & vbCrLf
		Response.Write "            <input type=""radio"" name=""action"" value=""unBatchHot"">取消<font color=green>热点</font>" & vbCrLf
		Response.Write "            <input type=""radio"" name=""action"" value=""isBatchBest"">批量<font color=red>推荐</font>" & vbCrLf
		Response.Write "            <input type=""radio"" name=""action"" value=""unBatchBest"">取消<font color=red>推荐</font>" & vbCrLf
		Response.Write "            <input type=""radio"" name=""action"" value=""isBatchAuditing"">批量<font color=#aa5555>审核</font>" & vbCrLf
		Response.Write "            <input type=""radio"" name=""action"" value=""unBatchAuditing"">取消<font color=#aa5555>审核</font><br>" & vbCrLf
		Response.Write "            <input type=""radio"" name=""action"" value=""isBatchMov"">批量移动:" & vbCrLf
	
		Response.Write "<select name=""catalog"">" & vbCrLf
		If Request("catalog") <> "" Then
			Response.Write Mesky.GetCatalogSelect(Split(Request("catalog"), ",")(1), "Mesky_Cms_Catalog")
		Else
			Response.Write Mesky.GetCatalogSelect(0, "Mesky_Cms_Catalog")
		End If
		Response.Write "</select>"
		Response.Write "         <input type=""submit"" name=""Submit3"" value=""执行操作"" onclick=""{if(confirm('您确定执行的操作吗?')){this.document.myform.submit();return true;}return false;}""> </td>" & vbCrLf
		Response.Write "        </tr>" & vbCrLf
		Response.Write "        <tr class=""tdbg2"">" & vbCrLf
		Response.Write "        <td colspan=""7"">资源属性中的各项含义：<font color=blue>顶</font>——固顶文章，<font color=green>荐</font>——推荐文章，<font color=red>热</font>——热点文章，<font color=blue>图</font>——图文内容</td>" & vbCrLf
		Response.Write "        </tr>       " & vbCrLf
		Response.Write "      </table>" & vbCrLf
		Response.Write "  </td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "</form>" & vbCrLf
		Response.Write "</table> " & vbCrLf
		Response.Write (showPageRs.showPage("admin_cms_reslist.asp?Page={$pages}" & q))
		Set showPageRs = Nothing
	End Sub
	Private Sub sForm()
		Response.Write "<table width=""100%"" border=""0"" cellpadding=""3"" cellspacing=""0"">" & vbCrLf
		Response.Write "<form action=""admin_cms_reslist.asp"" method=""post"" name=""sForm"">" & vbCrLf
		Response.Write "  <tr>" & vbCrLf
		Response.Write "    <td height=""3""></td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "  <tr class=""tdbg2"">" & vbCrLf
		Response.Write "    <td>　文章搜索：<input name=""action"" type=""hidden"" id=""action"" value=""s""><select name=""sType"">" & vbCrLf
		Response.Write "      <option value=""Title"" "
		If Request("sType") = "Title" Then Response.Write ("selected")
		Response.Write ">文章标题</option>" & vbCrLf
		Response.Write "      <option value=""Writer"" "
		If Request("sType") = "Writer" Then Response.Write ("selected")
		Response.Write ">文章作者</option>" & vbCrLf
		Response.Write "      <option value=""Content"" "
		If Request("sType") = "Content" Then Response.Write ("selected")
		Response.Write ">文章内容</option>" & vbCrLf
		Response.Write "      <option value=""UserName"" "
		If Request("sType") = "UserName" Then Response.Write ("selected")
		Response.Write ">添加用户</option>" & vbCrLf
		Response.Write "    </select> 分类:<select name=""catalog"" id=""catalog"">" & vbCrLf
	
		If Request("catalog") <> "" Then
			Response.Write Mesky.GetCatalogSelect(CLng(Split(Request("catalog"), ",")(1)), "Mesky_Cms_Catalog")
		Else
			Response.Write Mesky.GetCatalogSelect(0, "Mesky_Cms_Catalog")
		End If
		Response.Write " </select> 关键字:<input name=""keyword"" type=""text"" value=""" & Mesky.checkStr(Request("keyword")) & """ size=""25"" maxlength=""100"">" & vbCrLf
		Response.Write "<input type=""submit"" name=""Submit"" value=""搜索""></td>" & vbCrLf
		Response.Write "  </tr></form>" & vbCrLf
		Response.Write "</table>" & vbCrLf
	End Sub
	
	Private Sub sMenu()
		Dim tRs
		Response.Write "<table width=""100%"" border=""0"" cellpadding=""3"" cellspacing=""0"" bordercolor=""#FFFFFF"">" & vbCrLf
		Response.Write "  <tr>" & vbCrLf
		Response.Write "    <td height=""25"" background=""../images/menubg.gif""> 分类： " & vbCrLf
	
		Set tRs = Mesky.Execute("select RootID,CatalogID,Depth,CatalogName from Mesky_Cms_Catalog where depth=0 order by rootid,orders")
		Do While Not tRs.EOF
		Response.Write ("·<a href=""?action=s&sType=ResName&catalog=" & tRs(0) & "," & tRs(1) & "," & tRs(2) & "," & tRs(3) & """>" & tRs(3) & "</a>")
		tRs.MoveNext
		Loop
		Set tRs = Nothing
	
		Response.Write "    </td>" & vbCrLf
		Response.Write "  </tr>" & vbCrLf
		Response.Write "</table>" & vbCrLf
	End Sub
	Private Sub isBatchDel()
		If BatchID <> "" Then
			Mesky.Execute ("delete from Mesky_Cms_Resource where ID in (" & BatchID & ")")
			Mesky.Execute ("delete from Mesky_Cms_Comment where ResourceID in (" & BatchID & ")")
			Mesky.strMsg = "<li>“批量删除”操作成功！</li>"
		Else
			Mesky.strMsg = "<li>没有选择任何文章，本次操作被取消！</li>"
		End If
		Call Mesky.SystemMsg
	End Sub
	Private Sub isBatchTop()
		If BatchID <> "" Then
			Mesky.Execute ("update Mesky_Cms_Resource set isTop=1 where ID in (" & BatchID & ")")
			Mesky.strMsg = "<li>“批量固顶”操作成功！"
		Else
			Mesky.strMsg = "<li>没有选择任何文章，本次操作被取消！</li>"
		End If
		Call Mesky.SystemMsg
	End Sub
	Private Sub unBatchTop()
		If BatchID <> "" Then
			Mesky.Execute ("update Mesky_Cms_Resource set isTop=0 where ID in (" & BatchID & ")")
			Mesky.strMsg = "<li>“批量取消固顶”操作成功！"
		Else
			Mesky.strMsg = "<li>没有选择任何文章，本次操作被取消！</li>"
		End If
		Call Mesky.SystemMsg
	End Sub
	Private Sub isBatchHot()
		If BatchID <> "" Then
			Mesky.Execute ("update Mesky_Cms_Resource set isHot=1 where ID in (" & BatchID & ")")
			Mesky.strMsg = "<li>“批量热点”操作成功！"
		Else
			Mesky.strMsg = "<li>没有选择任何文章，本次操作被取消！</li>"
		End If
		Call Mesky.SystemMsg
	End Sub
	Private Sub unBatchHot()
		If BatchID <> "" Then
			Mesky.Execute ("update Mesky_Cms_Resource set isHot=0 where ID in (" & BatchID & ")")
			Mesky.strMsg = "<li>“批量取消热点”操作成功！"
		Else
			Mesky.strMsg = "<li>没有选择任何文章，本次操作被取消！</li>"
		End If
		Call Mesky.SystemMsg
	End Sub
	Private Sub isBatchBest()
		If BatchID <> "" Then
			Mesky.Execute ("update Mesky_Cms_Resource set isBest=1 where ID in (" & BatchID & ")")
			Mesky.strMsg = "<li>“批量推荐”操作成功！</li>"
		Else
			Mesky.strMsg = "<li>没有选择任何文章，本次操作被取消！</li>"
		End If
		Call Mesky.SystemMsg
	End Sub
	Private Sub unBatchBest()
		If BatchID <> "" Then
			Mesky.Execute ("update Mesky_Cms_Resource set isBest=0 where ID in (" & BatchID & ")")
			Mesky.strMsg = "<li>“批量取消推荐”操作成功！</li>"
		Else
			Mesky.strMsg = "<li>没有选择任何文章，本次操作被取消！</li>"
		End If
		Call Mesky.SystemMsg
	End Sub
	Private Sub isBatchAuditing()
		If BatchID <> "" Then
			Mesky.Execute ("update Mesky_Cms_Resource set isAuditing=1 where ID in (" & BatchID & ")")
			Mesky.strMsg = "<li>“批量审核”操作成功！</li>"
		Else
			Mesky.strMsg = "<li>没有选择任何文章，本次操作被取消！</li>"
		End If
		Call Mesky.SystemMsg
	End Sub
	Private Sub unBatchAuditing()
		If BatchID <> "" Then
			Mesky.Execute ("update Mesky_Cms_Resource set isAuditing=0 where ID in (" & BatchID & ")")
			Mesky.strMsg = "<li>“批量取消审核”操作成功！</li>"
		Else
			Mesky.strMsg = "<li>没有选择任何文章，本次操作被取消！</li>"
		End If
		Call Mesky.SystemMsg
	End Sub
	Private Sub isBatchMov()
		If BatchID <> "" Then
			If Trim(Request.Form("catalog")) <> "" Then
				Dim splCatalog
				splCatalog = Split(Trim(Request.Form("catalog")), ",")
				'0=RootID;1=CatalogID;2=Depth;3=CatalogName
				If splCatalog(2) > 0 Then
					Conn.Execute ("update Mesky_Cms_Resource set RootID=" & splCatalog(0) & ",CatalogID=" & splCatalog(1) & ",Depth=" & splCatalog(2) & ",CatalogName='" & splCatalog(3) & "' where ID in (" & BatchID & ")")
					Mesky.strMsg = "<li>“批量移动”操作成功！</li>"
				Else
					Mesky.strMsg = "<li>不能转移到一级分类下，本次操作被取消！</li>"
				End If
			Else
				Mesky.strMsg = "<li>没有选择资源分类，本次操作被取消。</li>"
			End If
		Else
			Mesky.strMsg = "<li>没有选择任何文章，本次操作被取消！</li>"
		End If
		Call Mesky.SystemMsg
	End Sub
	Private Sub isDel() '单个删除
		If sID <> "" Then
			Mesky.Execute ("delete from Mesky_Cms_Resource where ID=" & sID & "")
			Mesky.Execute ("delete from Mesky_Cms_Comment where ResourceID=" & sID & "")
			'Mesky.strMsg = "<li>“批量删除”操作成功！</li>"
		End If
		Response.Redirect Mesky.RefererPage
	End Sub
	Private Sub isAuditing() '单个审核
		If sID <> "" Then Mesky.Execute ("update Mesky_Cms_Resource set isAuditing=1 where ID=" & sID & "")
		Response.Redirect Mesky.RefererPage
	End Sub
	Private Sub unAuditing() '取消审核
		If sID <> "" Then Mesky.Execute ("update Mesky_Cms_Resource set isAuditing=0 where ID=" & sID & "")
		Response.Redirect Mesky.RefererPage
	End Sub
	Private Sub isTop() '置顶
		If sID <> "" Then Mesky.Execute ("update Mesky_Cms_Resource set isTop=1 where ID=" & sID & "")
		Response.Redirect Mesky.RefererPage
	End Sub
	Private Sub unTop() '取消置顶
		If sID <> "" Then Mesky.Execute ("update Mesky_Cms_Resource set isTop=0 where ID=" & sID & "")
		Response.Redirect Mesky.RefererPage
	End Sub
	Private Sub isHot() '批量执点
		If sID <> "" Then Mesky.Execute ("update Mesky_Cms_Resource set isHot=1 where ID=" & sID & "")
		Response.Redirect Mesky.RefererPage
	End Sub
	Private Sub unHot() '批量取消执点
		If sID <> "" Then Mesky.Execute ("update Mesky_Cms_Resource set isHot=0 where ID=" & sID & "")
		Response.Redirect Mesky.RefererPage
	End Sub
	Private Sub isBest() '批量推荐
		If sID <> "" Then Mesky.Execute ("update Mesky_Cms_Resource set isBest=1 where ID=" & sID & "")
		Response.Redirect Mesky.RefererPage
	End Sub
	Private Sub unBest() '批量取消推荐
		If sID <> "" Then Mesky.Execute ("update Mesky_Cms_Resource set isBest=0 where ID=" & sID & "")
		Response.Redirect Mesky.RefererPage
	End Sub
	Private Function checkResAdmin(sName)
		checkResAdmin = True
	End Function
	Public Sub OnEndPage()
		Response.Write Mesky.CopyRight
	End Sub ' OnEndPage
End Class
 %>