newstar - 2008-3-12 12:07:00
\Admin\down\Class_Action.asp 页面 约334行
'合并目录
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
找到此函数,删除红字行 即可!
ttao - 2008-3-12 12:42:00
:default7: :default78:
cyxjq - 2008-3-13 07:06:00
支持一下!