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

📄 cls_info.asp

📁 asp源码 图片ASP整站
💻 ASP
📖 第 1 页 / 共 2 页
字号:
			RsClassObj("DoMain") = ""
		end if
		if Orders <> "" then
			if IsNumeric(Orders) then RsClassObj("Orders") = Orders
		end if
		RsClassObj("FileTime") = FileTime
		RsClassObj.UpDate
		RsClassObj.Close
		set RsClassObj=Nothing
		Conn.Execute("Update FS_NewsClass Set ChildNum = ChildNum + 1 where ClassID = '" & ParentID & "'")
		If ClassID <> "" then
			Dim MyFile
			Set MyFile=Server.CreateObject(G_FS_FSO)
			If Cstr(TTempSaveFilePath) <> Cstr(SaveFilePath) And IsAdd=0 then
				If TTempSaveFilePath <> "/" THen
					If MyFile.FolderExists(Server.Mappath(TempSysRootDir&TTempSaveFilePath&"/"&ClassEName)) then
						MyFile.DeleteFolder(Server.Mappath(TempSysRootDir&TTempSaveFilePath&"/"&ClassEName))
					End if
				Else
					If MyFile.FolderExists(Server.Mappath(TempSysRootDir&"/"&ClassEName)) then
						MyFile.DeleteFolder(Server.Mappath(TempSysRootDir&"/"&ClassEName))
					End if
				End If
				
			End If
			If Cstr(TeempFileExtName) <> Cstr(FileExtName) then
				If TTempSaveFilePath <> "/" THen
					If MyFile.FileExists(Server.Mappath(TempSysRootDir&TTempSaveFilePath&"/"&ClassEName)&"/index."&TeempFileExtName) then
						MyFile.DeleteFile(Server.Mappath(TempSysRootDir&TTempSaveFilePath&"/"&ClassEName)&"/index."&TeempFileExtName)
					End If
				Else
					If MyFile.FileExists(Server.Mappath(TempSysRootDir&"/"&ClassEName)&"/index."&TeempFileExtName) then
						MyFile.DeleteFile(Server.Mappath(TempSysRootDir&"/"&ClassEName)&"/index."&TeempFileExtName)
					End If
				End If
			End If
			Set MyFile = Nothing
		End If

		if IsAdd=1 then 
			dim TemplRs,Lsql
			set templRs= Server.CreateObject(G_FS_RS)
			Lsql="select PopList from FS_admingroup where id=(select groupid from FS_admin where name='" & session("Name") & "')"
			TemplRs.Open Lsql,Conn,3,3
			if Not TemplRs.Eof then 
				TemplRs("Poplist") =TemplRs("Poplist") & "," & ClassID
				TemplRs.UpDate
				Session("PopedomList")=Session("PopedomList")& "," & ClassID
			end if	
			Set TemplRs = Nothing
		end if 
		if err.Number = 0 then
			AddAndModifyClass = "Success||" & ParentClassIDList(ClassID) & ClassID
			Exit Function
		else
			AddAndModifyClass = "失败"  
			Exit Function
		end if
	End Function
	
	Function GetRootClassSaveFilePath(IDArrays)
		Dim RsCheckObj,DoMain
		Set RsCheckObj = Conn.Execute("Select ParentID,DoMain,SaveFilePath from FS_NewsClass where ClassID in ('" & Replace(IDArrays,",","','") & "')")
		do while Not RsCheckObj.Eof
			if RsCheckObj("ParentID") = "0" then
				if (Not IsNull(RsCheckObj("DoMain"))) And (RsCheckObj("DoMain") <> "") then
					GetRootClassSaveFilePath = RsCheckObj("SaveFilePath")
				else
					GetRootClassSaveFilePath = ""
				end if
				Set RsCheckObj = Nothing
				Exit Function
			end if
			RsCheckObj.MoveNext
		Loop
		Set RsCheckObj = Nothing
		GetRootClassSaveFilePath = ""
	End Function
	
	Public Function MoveClass(SourceClassID,ObjectClassID)
		Dim RsClassObj,SqlClass,SourceClassParentID,TempArray,LoopVar
		TempArray = Split(SourceClassID,"***")
		for LoopVar = LBound(TempArray) to UBound(TempArray)
			SqlClass = "Select ParentID,DoMain from FS_NewsClass where ClassID='" & TempArray(LoopVar) & "'"
			Set RsClassObj = Conn.Execute(SqlClass)
			if Not RsClassObj.Eof then
				SourceClassParentID = RsClassObj("ParentID")
				MoveClass = "Update FS_NewsClass Set ParentID = '" & ObjectClassID & "' where ClassID = '" & TempArray(LoopVar) & "'"
				Conn.Execute(MoveClass)
				MoveClass = "Update FS_NewsClass Set DoMain='' where ClassID = '" & TempArray(LoopVar) & "'"
				Conn.Execute(MoveClass)
			else
				SourceClassParentID = ""
			end if
			if SourceClassParentID <> "" then
				MoveClass = "Update FS_NewsClass Set ChildNum=ChildNum-1 where ClassID = '" & SourceClassParentID & "';"
				Conn.Execute(MoveClass)
			end if
			MoveClass = "Update FS_NewsClass Set ChildNum=ChildNum+1 where ClassID = '" & ObjectClassID & "';"
			Conn.Execute(MoveClass)
		Next
	End Function
	'Class Function End
	'News Function End
	Public Function MoveNews(SourceNewsArray,ObjectClassID)
		Dim i 
		for i=LBound(SourceNewsArray) to UBound(SourceNewsArray)
			if SourceNewsArray(i) <> "" then
				Conn.Execute("Update FS_News set ClassID='" & ObjectClassID & "' Where NewsID='" & SourceNewsArray(i) & "'")
			end if
		next
	End Function

	Public Function CopyNews(SourceNewsArray,ObjectClassID)
		Dim i,j,RsNewsObj,CopyNewsObj,SqlNews,FiledObj
		Dim NewsFileNames,TempNewsID,ConfigInfo
		ConfigInfo = GetConfig(16)
		for i = UBound(SourceNewsArray) to LBound(SourceNewsArray) Step -1
			Set RsNewsObj = Conn.Execute("Select * from FS_News where NewsID='" & SourceNewsArray(i) & "'")
			SqlNews = "Select * from FS_News where 1=0"
			Set CopyNewsObj = Server.CreateObject(G_FS_RS)
			CopyNewsObj.Open SqlNews,Conn,3,3
			CopyNewsObj.AddNew
			For Each FiledObj In CopyNewsObj.Fields
				if LCase(FiledObj.name) <> "id" then
					if LCase(FiledObj.name) = "newsid" then
						TempNewsID = GetRandomID18()
						CopyNewsObj("newsid") = TempNewsID
					elseif LCase(FiledObj.name) = "classid" then
						CopyNewsObj("classid") = ObjectClassID
					elseif LCase(FiledObj.name) = "filename" then
						NewsFileNames = NewsFileName(ConfigInfo,ObjectClassID,TempNewsID)
						CopyNewsObj("FileName") = NewsFileNames
					else
						CopyNewsObj(FiledObj.name) = RsNewsObj(FiledObj.name)
					end if
				end if
			Next
			CopyNewsObj.UpDate
			CopyNewsObj.Close
		next
		Set RsNewsObj = Nothing
		Set CopyNewsObj = Nothing
	End Function
	'DownLoad Function End
	Public Function MoveDownLoad(SourceNewsArray,ObjectClassID)
		Dim i 
		for i=LBound(SourceNewsArray) to UBound(SourceNewsArray)
			if SourceNewsArray(i) <> "" then
				Conn.Execute("Update FS_DownLoad set ClassID='" & ObjectClassID & "' Where DownLoadID='" & SourceNewsArray(i) & "'")
			end if
		next
	End Function

	Public Function CopyDownLoad(SourceNewsArray,ObjectClassID)
		Dim i,j,RsNewsObj,CopyNewsObj,SqlNews,FiledObj
		Dim NewsFileNames,TempNewsID,ConfigInfo
		Dim RsDownloadAddressS,RsDownloadAddressT,DownloadAddNum,DownName(50),DownUrl(50),DownNumber(50),Tempi
		ConfigInfo = GetConfig(16)
		for i = LBound(SourceNewsArray) to UBound(SourceNewsArray)
			Set RsNewsObj = Conn.Execute("Select * from FS_DownLoad where DownLoadID='" & SourceNewsArray(i) & "'")
			SqlNews = "Select * from FS_DownLoad where 1=0"
			Set CopyNewsObj = Server.CreateObject(G_FS_RS)
			CopyNewsObj.Open SqlNews,Conn,3,3
			CopyNewsObj.AddNew
			For Each FiledObj In CopyNewsObj.Fields
				if LCase(FiledObj.name) <> "id" then
					if LCase(FiledObj.name) = "downloadid" then
						TempNewsID = GetRandomID18()
						CopyNewsObj("downloadid") = TempNewsID
						
					elseif LCase(FiledObj.name) = "classid" then
						CopyNewsObj("classid") = ObjectClassID
					elseif LCase(FiledObj.name) = "filename" then
						NewsFileNames = NewsFileName(ConfigInfo,ObjectClassID,TempNewsID)
						CopyNewsObj("FileName") = NewsFileNames
					else
						CopyNewsObj(FiledObj.name) = RsNewsObj(FiledObj.name)
					end if
				end if
			Next
			CopyNewsObj.UpDate
			CopyNewsObj.Close
			'===============================
			'Conn.Execute("insert into FS_DownloadAddress(DownloadID,AddressName,Url,Number) Select '" & TempNewsID &"',AddressName,Url,Number from FS_DownloadAddress where DownloadID='" &SourceNewsArray(i) &"'")
			'复制下载的时候,同时复制下载地址
			Set RsDownloadAddressS = Server.CreateObject(G_FS_RS)'
			RsDownloadAddressS.Open "Select * from FS_DownloadAddress where DownloadID='"&SourceNewsArray(i)&"'",Conn,1,1
			DownloadAddNum=RsDownloadAddressS.recordcount
			For Tempi=1 to DownloadAddNum
				DownName(Tempi)=RsDownloadAddressS("AddressName")
				DownUrl(Tempi)=RsDownloadAddressS("Url")
				DownNumber(Tempi)=RsDownloadAddressS("Number")
				RsDownloadAddressS.MoveNext
			Next
			RsDownloadAddressS.Close
			Set RsDownloadAddressS=Nothing
			
			Set RsDownloadAddressT = Server.CreateObject(G_FS_RS)'
			RsDownloadAddressT.Open "Select * from FS_DownloadAddress where 1=2",Conn,3,3
			For Tempi = 1 to DownloadAddNum
				RsDownloadAddressT.AddNew
				RsDownloadAddressT("ID")=GetRandomID18()
				RsDownloadAddressT("DownloadID")=TempNewsID
				RsDownloadAddressT("AddressName")=DownName(Tempi)
				RsDownloadAddressT("Url")=DownUrl(Tempi)
				RsDownloadAddressT("Number")=CLng(DownNumber(Tempi))
				RsDownloadAddressT.Update
			Next
			RsDownloadAddressT.Close
			Set RsDownloadAddressT=Nothing
			'==================================
		next
		Set RsNewsObj = Nothing
		Set CopyNewsObj = Nothing
	End Function
	'DownLoad Function End
End Class
%>

⌨️ 快捷键说明

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