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

📄 class_action.asp

📁 后台目录:qwbAdmin/Login.asp 登陆用户名:admin 登陆密码:admin
💻 ASP
📖 第 1 页 / 共 2 页
字号:
            <%
		  tmp_str_list  = ""
		  do while Not obj_unite_rs.eof 
            tmp_str_list = tmp_str_list &"<option value="""& obj_unite_rs("ClassID") &","&  obj_unite_rs("ParentID") &""">+"& obj_unite_rs("ClassName") &"</option>"& Chr(13) & Chr(10)
			tmp_str_list = tmp_str_list &Fs_news.UniteChildNewsList(obj_unite_rs("ClassID"),"")
			 obj_unite_rs.movenext
		 Loop
		 obj_unite_rs.close
		 set obj_unite_rs = nothing
		 Response.Write tmp_str_list
		 %>
          </select>
        </div></td>
      <td colspan="2" class="hback"> <div align="center">转移到&gt;&gt;&gt;</div></td>
      <td width="46%" class="hback"><select name="TargetClassID" id="SourceClassID" style="width:80%">
          <option value="0000000000">转移到根目录</option>
          <%= tmp_str_list%> </select></td>
    </tr>
    <tr class="hback"> 
      <td height="28" colspan="4" class="hback"><div align="center"> 
          <input type="button" name="Submit2" value="确定转移栏目" onClick="{if(confirm('确定转移栏目吗?')){this.document.form1.submit();return true;}return false;}">
          <input name="Action" type="hidden" id="Action" value="SaveAllmove">
        </div></td>
    </tr>
  </table>
</form>
<%End Sub%>
</body>
</html>
<%
sub UpdateOrderID()
		if not MF_Check_Pop_TF("DS013") then Err_Show
		Dim ClassID,OrderID
		ClassID = Request.Form("ClassID")
		OrderID = Request.Form("OrderID")
		if ClassID="" then
			strShowErr = "<li>错误参数:ClassID</li>"
			Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
			Response.end
		else
			ClassID=ClassID
		end if
		if isnumeric(OrderID)= false then
			strShowErr = "<li>错误参数:排列序号请填写正确的数字</li>"
			Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
			Response.end
		End if
		if OrderID="" then
			strShowErr = "<li>错误参数:OrderID</li>"
			Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
			Response.end
		end if
		Conn.execute "update FS_DS_Class set OrderID=" & OrderID & " where ClassID='" & ClassID &"'"
		Response.Redirect "Class_Action.asp?Action=one"
end sub
sub UpdateOrderIDN()
		if not MF_Check_Pop_TF("DS013") then Err_Show
		Dim N_ClassID,N_OrderID
		N_ClassID = Request.Form("ClassID")
		N_OrderID = Request.Form("OrderID")
		if N_ClassID="" then
			strShowErr = "<li>错误参数:ClassID</li>"
			Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
			Response.end
		else
			N_ClassID=N_ClassID
		end if
		if isnumeric(N_OrderID)= false then
			strShowErr = "<li>错误参数:排列序号请填写正确的数字</li>"
			Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
			Response.end
		End if
		if N_OrderID="" then
			strShowErr = "<li>错误参数:OrderID</li>"
			Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
			Response.end
		end if
		Conn.execute "update FS_DS_Class set OrderID=" & N_OrderID & " where ClassID='" & N_ClassID &"'"
		Response.Redirect "Class_Action.asp?Action=n"
end sub
Sub delclass()
		if not MF_Check_Pop_TF("DS012") then Err_Show
		Dim str_delClassID,str_tmp_DelclassTF,rs_tmp
		str_delClassID = Request.QueryString("ClassID")
		if str_delClassID="" then
			strShowErr = "<li>错误参数:没有栏目ClassID</li>"
			Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
			Response.end
		end if
		Conn.execute("Delete From FS_DS_Class Where ClassID='"& str_delClassID &"'")
		'删除下载
		set rs_tmp = Conn.execute("select DownLoadID from FS_DS_List where ClassID='"& str_delClassID &"'")
		do while not rs_tmp.eof 
			Conn.execute("Delete From FS_DS_Address Where DownLoadID='"& rs_tmp(0) &"'")
			rs_tmp.movenext
		loop
		rs_tmp.close
		Conn.execute("Delete From FS_DS_List Where ClassID='"& str_delClassID &"'")
		str_tmp_DelclassTF=0
		Response.write Fs_news.DelChildNewsList(str_delClassID,str_tmp_DelclassTF)
		'插入删除记录日志
		'**************待补 
		strShowErr = "<li>栏目已经彻底删除成功</li>"
		Call MF_Insert_oper_Log("删除栏目","删除栏目ClassID:"& str_delClassID &"及子类栏目,同时删除了此栏目下的所有信息,彻底删除",now,session("admin_name"),"DS")
		Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Class_Manage.asp")
		Response.end
End Sub
Sub resetClass()
	if not MF_Check_Pop_TF("DS014") then Err_Show
	Conn.Execute("Update FS_DS_Class Set ParentID ='0'")
	'插入操作日志
		Call MF_Insert_oper_Log("复位栏目","把所有栏目复位为一级栏目",now,session("admin_name"),"DS")
		strShowErr = "<li>复位所有栏目成功</li><li>所有的栏目已经设置为一级分类</li>"
		Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Class_Manage.asp")
		Response.end
End Sub
'合并目录
Sub Saveunite()
		if not MF_Check_Pop_TF("DS015") then Err_Show
		Dim str_SourceClassID,str_TargetClassID
		str_SourceClassID = Trim(Request.Form("SourceClassID"))
		str_TargetClassID = Trim(Request.Form("TargetClassID"))
		if split(str_SourceClassID,",")(0) = split(str_TargetClassID,",")(0) then
			strShowErr = "<li>源目录和目标目录不能一样</li>"
			Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
			Response.end
		End if
		Dim obj_Url_rs
		set obj_Url_rs = Conn.execute("select isUrl from FS_DS_Class where ClassID='"& split(str_TargetClassID,",")(0) &"'")
		if obj_Url_rs("isUrl") = 1 then
			strShowErr = "<li>不能把栏目合并到外部栏目!</li>"
			Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
			Response.end
		End if
		Conn.execute("Update FS_DS_List set DownLoadID='"& split(str_TargetClassID,",")(0)&"'  where ClassID ='"& split(str_SourceClassID,",")(0)&"'")
		Conn.execute("Update FS_DS_List set ClassID='"& split(str_TargetClassID,",")(0)&"'  where ClassID ='"& split(str_SourceClassID,",")(0)&"'")
		'更新其他相关数据库
		'Conn.execute("Delete From  FS_DS_Address  where ClassID ='"& split(str_SourceClassID,",")(0)&"'")
		'删除源栏目表
		Conn.execute("Delete From FS_DS_Class  where ClassID ='"& split(str_SourceClassID,",")(0)&"'")
		Dim ob_Tmp_rs
		set ob_Tmp_rs = Conn.execute("select ClassID,ParentID From FS_DS_Class Where ParentID='"& split(str_SourceClassID,",")(0) &"' order by id desc")
		if Not ob_Tmp_rs.eof then
			do while Not ob_Tmp_rs.eof 
				Conn.execute("Update FS_DS_Class Set ParentID ='"&  split(str_SourceClassID,",")(1) &"' where ClassID ='"& ob_Tmp_rs("ClassID")&"'")
				ob_Tmp_rs.movenext
			Loop
		End if
		ob_Tmp_rs.close:set ob_Tmp_rs = nothing
		'更新所有数据
		'******************保留
		Call MF_Insert_oper_Log("合并栏目","把栏目ClassID:"&  split(str_SourceClassID)(0)&"合并到ClassID:"&  split(str_TargetClassID)(0) &"中",now,session("admin_name"),"DS")
		strShowErr = "<li>合并栏目成功</li>"
		Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Class_Manage.asp")
		Response.end
End Sub
'移动栏目
Sub allmove_save()
		if not MF_Check_Pop_TF("DS_Class") then Err_Show
		Dim str_SourceClassID_move,str_TargetClassID_move
		str_SourceClassID_move = Trim(Request.Form("SourceClassID"))
		str_TargetClassID_move = Trim(Request.Form("TargetClassID"))
		if split(str_SourceClassID_move,",")(0) = split(str_TargetClassID_move,",")(0) then
			strShowErr = "<li>源目录和目标目录不能一样</li>"
			Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
			Response.end
		End if
		if str_TargetClassID_move ="0000000000" then
			Conn.execute("Update FS_DS_Class Set ParentID ='0' where ClassID ='"&  split(str_SourceClassID_move,",")(0)&"'")
		Else
			Dim obj_Url_rs_1
			set obj_Url_rs_1 = Conn.execute("select isUrl from FS_DS_Class where ClassID='"& split(str_TargetClassID_move,",")(0) &"'")
			if obj_Url_rs_1("isUrl") = 1 then
				strShowErr = "<li>不能把栏目转到外部栏目!</li>"
				Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
				Response.end
			End if
			Conn.execute("Update FS_DS_Class Set ParentID ='"&  split(str_TargetClassID_move,",")(0) &"' where ClassID ='"&  split(str_SourceClassID_move,",")(0)&"'")
			Dim ob_Tmp_rs_1
			set ob_Tmp_rs_1 = Conn.execute("select ClassID,ParentID From FS_DS_Class Where ParentID='"& split(str_SourceClassID_move,",")(0) &"' order by id desc")
			if Not ob_Tmp_rs_1.eof then
				do while Not ob_Tmp_rs_1.eof 
					Conn.execute("Update FS_DS_Class Set ParentID ='"&  split(str_SourceClassID_move,",")(1) &"' where ClassID ='"& ob_Tmp_rs_1("ClassID")&"'")
					ob_Tmp_rs_1.movenext
				Loop
			End if
			ob_Tmp_rs_1.close:set ob_Tmp_rs_1 = nothing
		End if
		'更新所有数据
		'******************保留
		Call MF_Insert_oper_Log("转移栏目","把栏目ClassID:"& split(str_SourceClassID_move)(0) &"转移到ClassID:"& split(str_TargetClassID_move)(0)&"中",now,session("admin_name"),"DS")
		strShowErr = "<li>栏目转移成功!</li>"
		Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Class_Manage.asp")
		Response.end
End Sub
Sub clearClass()
		if not MF_Check_Pop_TF("DS016") then Err_Show
		Conn.execute("delete from FS_DS_Address")
		Conn.execute("delete from FS_DS_List")
		Conn.execute("Delete From FS_DS_Class")
		Call MF_Insert_oper_Log("删除所有栏目","删除整个站点栏目",now,session("admin_name"),"DS")
		strShowErr = "<li>所有删除栏目成功</li><li>删除所有栏目下的下载成功</li>"
		Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Class_Manage.asp")
		Response.end
End Sub
Sub one_clear()
		if not MF_Check_Pop_TF("DS016") then Err_Show
		Conn.execute("Delete From FS_DS_Address where DownLoadID = '"& NoSqlHack(Request.QueryString("DownLoadID"))&"'")
		Conn.execute("Delete From FS_DS_List where ClassID = '"& NoSqlHack(Request.QueryString("ClassID"))&"'")
		Call MF_Insert_oper_Log("清除下载","清除了Classid:"& Request.QueryString("ClassID") &"下的所有下载",now,session("admin_name"),"DS")
		strShowErr = "<li>栏目下的下载清除成功</li>"
		Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
		Response.end
End Sub
set Fs_news = nothing
%>

⌨️ 快捷键说明

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