<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% option explicit response.buffer=true Const PurviewLevel=2 Const CheckChannelID=3 Const PurviewLevel_Soft=2 %> <% dim SoftID,ClassID,TargetClassID,SpecialID dim Action,FoundErr,ErrMsg dim strComeUrl dim SkinID,LayoutID,SkinCount,LayoutCount,ClassMaster,BrowsePurview,AddPurview if trim(request("strComeUrl"))="" then strComeUrl=Request.ServerVariables("HTTP_REFERER") else strComeUrl=trim(request("strComeUrl")) end if SoftID=trim(request("SoftID")) TargetClassID=trim(request("TargetClassID")) SpecialID=trim(request("SpecialID")) Action=Trim(Request("Action")) if Action="MoveToClass" then call MoveToClass() elseif Action="MoveToSpecial" then call MoveToSpecial() elseif Action="Move" then call MoveSoft() else call main() end if if FoundErr=True then call WriteErrMsg() end if call CloseConn() sub main() if SoftID="" then FoundErr=True ErrMsg=ErrMsg & "
  • 请选择要移动的软件!
  • " exit sub else SoftID=CLng(SoftID) end if dim sqlSoft,rsSoft dim SoftName,SoftVersion,ClassName,ParentPath,Depth sqlSoft="select Soft.ClassID,Soft.SoftName,SoftClass.ClassName,SoftClass.ParentPath,SoftClass.Depth,Soft.SoftVersion from Soft" sqlSoft=sqlSoft & " inner join SoftClass on Soft.ClassID=SoftClass.ClassID where Soft.SoftID=" & SoftID set rsSoft=Server.CreateObject("ADODB.Recordset") rsSoft.open sqlSoft,conn,1,1 if rsSoft.bof and rsSoft.eof then FoundErr=True ErrMsg=ErrMsg & "
  • 找不到要移到的软件
  • " else ClassID=rsSoft(0) SoftName=rsSoft(1) ClassName=rsSoft(2) ParentPath=rsSoft(3) Depth=rsSoft(4) SoftVersion=rsSoft(5) %> 软件移动
    软 件 移 动
    所属栏目: <%call Admin_ShowPath2(ParentPath,ClassName,Depth)%>
    软件名称: <%=SoftName%>
    软件版本: <%=SoftVersion%>
    移动到:
    不能指定为含有子栏目的栏目
    不能指定为外部栏目
     
    <% end if rsSoft.close set rsSoft=nothing end sub sub MoveSoft() dim tClass if SoftID="" then FoundErr=True ErrMsg=ErrMsg & "
  • 请选择要移动的软件!
  • " end if if TargetClassID="" then FoundErr=True ErrMsg=ErrMsg & "
  • 请指定目标栏目!
  • " else TargetClassID=CLng(TargetClassID) set tClass=conn.execute("select Child from SoftClass where ClassID=" & TargetClassID) if tClass.bof and tClass.eof then FoundErr=True ErrMsg=ErrMsg & "
  • 找不到指定的目标栏目!
  • " else if tClass(0)>0 then FoundErr=True ErrMsg=ErrMsg & "
  • 不能将软件移到有子栏目的栏目中!
  • " end if end if end if if FoundErr=True then exit sub if SpecialID="" then SpecialID=0 else SpecialID=Clng(SpecialID) end if SoftID=replace(SoftID," ","") 'conn.execute("update Soft set ClassID=" & TargetClassID & ",SpecialID=" & SpecialID & " where SoftId in (" & SoftID & ")") conn.execute("update Soft set ClassID=" & TargetClassID & " where SoftId in (" & SoftID & ")") conn.execute("update SoftComment set ClassID=" & TargetClassID & " where SoftId in (" & SoftID & ")") call CloseConn() response.Redirect strComeUrl end sub sub MoveToClass() dim tClass if SoftID="" then FoundErr=True ErrMsg=ErrMsg & "
  • 请选择要移动的软件!
  • " end if if TargetClassID="" then FoundErr=True ErrMsg=ErrMsg & "
  • 请指定目标栏目!
  • " else TargetClassID=CLng(TargetClassID) set tClass=conn.execute("select Child from SoftClass where ClassID=" & TargetClassID) if tClass.bof and tClass.eof then FoundErr=True ErrMsg=ErrMsg & "
  • 找不到指定的目标栏目!
  • " else if tClass(0)>0 then FoundErr=True ErrMsg=ErrMsg & "
  • 不能将软件移到有子栏目的栏目中!
  • " end if end if end if if FoundErr=True then exit sub SoftID=replace(SoftID," ","") conn.execute("update Soft set ClassID=" & TargetClassID & " where SoftId in (" & SoftID & ")") conn.execute("update SoftComment set ClassID=" & TargetClassID & " where SoftId in (" & SoftID & ")") call CloseConn() response.Redirect strComeUrl end sub sub MoveToSpecial() if SpecialID="" then FoundErr=True ErrMsg=ErrMsg & "
  • 请指定目标专题!
  • " exit sub else SpecialID=CLng(SpecialID) end if SoftID=replace(SoftID," ","") conn.execute("update Soft set SpecialID=" & SpecialID & " where SoftID in (" & SoftID & ")") call CloseConn() response.Redirect strComeUrl end sub %>