需要改进下列代码.
Announce2.asp
Form_RootID = cCur(Rs("RootID"))
Form_Layer = Rs("Layer") + 1
Form_TopicSortID = cCur(Rs("TopicSortID"))+1
Rs.Close
If Form_Layer>2 Then
Con.ExeCute(" Update LeadBBS_Announce Set ChildNum=ChildNum+1,LastTime=" & GetTimeValue(now) & ",LastUser='" & Replace(Form_UserName,"'","''") & "' where RootID=" & Form_RootID & " and ParentID=0")
Con.ExeCute(" Update LeadBBS_Announce Set ChildNum=ChildNum+1,LastTime=" & GetTimeValue(now) & ",LastUser='" & Replace(Form_UserName,"'","''") & "' where id=" & Form_ParentID)
Else
Con.ExeCute(" Update LeadBBS_Announce Set ChildNum=ChildNum+1,LastTime=" & GetTimeValue(now) & ",LastUser='" & Replace(Form_UserName,"'","''") & "' where id=" & Form_ParentID)
End If
Con.ExeCute(" Update LeadBBS_Announce Set TopicSortID=TopicSortID+1 where RootID=" & Form_RootID & " and TopicSortID>=" & Form_TopicSortID)