📄 admin_commoncode_content.asp
字号:
Response.Write " <input name='Action' type='hidden' id='Action' value='DoAddToSpecial'>"
Response.Write " <input name='add' type='submit' id='Add' value=' 执行批处理 ' style='cursor:hand;'> "
Response.Write " <input name='Cancel' type='button' id='Cancel' value=' 取 消 ' onClick=""window.location.href='Admin_" & ModuleName & ".asp?ChannelID=" & ChannelID & "&Action=Manage&ManageType=Special';"" style='cursor:hand;'>"
Response.Write " </p><br>"
Response.Write "</form>"
End Sub
Sub ShowForm_MoveToSpecial()
If AdminPurview = 2 And AdminPurview_Channel > 2 Then
FoundErr = True
ErrMsg = ErrMsg & "<li>对不起,你的权限不够!</li>"
Exit Sub
End If
Response.Write "<form method='POST' name='myform' action='Admin_" & ModuleName & ".asp' target='_self'>"
Response.Write " <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>"
Response.Write " <tr class='title'>"
Response.Write " <td height='22' colspan='4' align='center'><b>批量移动" & ChannelShortName & "</td>"
Response.Write " </tr>"
Response.Write " <tr align='left' class='tdbg'>"
Response.Write " <td valign='top' width='300'>"
Response.Write " <input type='radio' name='InfoType' value='1' checked>指定" & ChannelShortName & "ID:<input type='text' name='BatchInfoID' value='" & ReplaceBadChar(Request("InfoID")) & "' size='30'><br>"
Response.Write " <input type='radio' name='InfoType' value='2'>指定专题的" & ChannelShortName & ":<br><select name='BatchSpecialID' size='2' multiple style='height:360px;width:300px;'>" & GetSpecial_Option(0) & "</select><br>"
Response.Write " <input type='button' name='Submit' value=' 选定所有专题 ' onclick='SelectAll()'>"
Response.Write " <input type='button' name='Submit' value='取消选定所有专题' onclick='UnSelectAll()'>"
Response.Write " </td>"
Response.Write " <td align='center' >移动到>></td>"
Response.Write " <td valign='top'>目标专题:</font><br><select name='tSpecialID' size='2' style='height:360px;width:300px;'>" & GetSpecial_Option(0) & "</select></td>"
Response.Write " </tr>"
Response.Write " </table>"
Response.Write " <p align='center'>"
Response.Write " <input name='ChannelID' type='hidden' id='ChannelID' value='" & ChannelID & "'>"
Response.Write " <input name='Action' type='hidden' id='Action' value='DoMoveToSpecial'>"
Response.Write " <input name='add' type='submit' id='Add' value=' 执行批处理 ' style='cursor:hand;'> "
Response.Write " <input name='Cancel' type='button' id='Cancel' value=' 取 消 ' onClick=""window.location.href='Admin_" & ModuleName & ".asp?ChannelID=" & ChannelID & "&Action=Manage';"" style='cursor:hand;'>"
Response.Write " </p><br>"
Response.Write "</form>"
Response.Write "<script language='javascript'>" & vbCrLf
Response.Write "function SelectAll(){" & vbCrLf
Response.Write " for(var i=0;i<document.myform.BatchSpecialID.length;i++){" & vbCrLf
Response.Write " document.myform.BatchSpecialID.options[i].selected=true;}" & vbCrLf
Response.Write "}" & vbCrLf
Response.Write "function UnSelectAll(){" & vbCrLf
Response.Write " for(var i=0;i<document.myform.BatchSpecialID.length;i++){" & vbCrLf
Response.Write " document.myform.BatchSpecialID.options[i].selected=false;}" & vbCrLf
Response.Write "}" & vbCrLf
Response.Write "</script>" & vbCrLf
End Sub
Sub DoMoveToSpecial()
If AdminPurview = 2 And AdminPurview_Channel > 2 Then
FoundErr = True
ErrMsg = ErrMsg & "<li>对不起,你的权限不够!</li>"
Exit Sub
End If
Dim InfoType, BatchInfoID, BatchSpecialID
Dim tSpecialID, tChannelDir, tUploadDir
Dim rsBatchMove, sqlBatchMove
InfoType = PE_CLng(Trim(Request("InfoType")))
BatchInfoID = Trim(Request.Form("BatchInfoID"))
BatchSpecialID = Trim(Request.Form("BatchSpecialID"))
tSpecialID = PE_CLng(Trim(Request("tSpecialID")))
If InfoType = 1 Then
If IsValidID(BatchInfoID) = False Then
FoundErr = True
ErrMsg = ErrMsg & "<li>请指定要批量移动的" & ChannelShortName & "的ID</li>"
End If
Else
If IsValidID(BatchSpecialID) = False Then
FoundErr = True
ErrMsg = ErrMsg & "<li>请指定要批量移动的" & ChannelShortName & "的专题</li>"
End If
End If
If tSpecialID = 0 Then
FoundErr = True
ErrMsg = ErrMsg & "<li>请指定目标专题!</li>"
End If
If FoundErr = True Then Exit Sub
If InfoType = 1 Then
sqlBatchMove = "select * from PE_InfoS where ModuleType=" & ModuleType & " and InfoID in (" & BatchInfoID & ")"
Else
sqlBatchMove = "select * from PE_InfoS where ModuleType=" & ModuleType & " and SpecialID in (" & BatchSpecialID & ")"
End If
Set rsBatchMove = Conn.Execute(sqlBatchMove)
Do While Not rsBatchMove.EOF
If PE_CLng(Conn.Execute("select count(InfoID) from PE_InfoS where ModuleType=" & ModuleType & " and SpecialID=" & tSpecialID & " and ItemID=" & rsBatchMove("ItemID") & "")(0)) > 0 Then
Conn.Execute ("delete from PE_InfoS where InfoID=" & rsBatchMove("InfoID") & "")
Else
Conn.Execute ("update PE_InfoS set SpecialID=" & tSpecialID & " where InfoID=" & rsBatchMove("InfoID") & "")
End If
rsBatchMove.MoveNext
Loop
rsBatchMove.Close
Set rsBatchMove = Nothing
Call WriteSuccessMsg("成功将选定的" & ChannelShortName & "移动到目标专题中!", "Admin_" & ModuleName & ".asp?ChannelID=" & ChannelID & "&Action=Manage&ManageType=Special")
Call ClearSiteCache(0)
End Sub
Sub DoAddToSpecial()
If AdminPurview = 2 And AdminPurview_Channel > 2 Then
FoundErr = True
ErrMsg = ErrMsg & "<li>对不起,你的权限不够!</li>"
Exit Sub
End If
Dim BatchInfoID, tSpecialID, rsInfo
tSpecialID = Trim(Request("tSpecialID"))
BatchInfoID = Trim(Request("BatchInfoID"))
If IsValidID(BatchInfoID) = False Then
FoundErr = True
ErrMsg = ErrMsg & "<li>请指定InfoID!</li>"
End If
If IsValidID(tSpecialID) = False Then
FoundErr = True
ErrMsg = ErrMsg & "<li>请指定目标专题!</li>"
End If
If FoundErr = True Then Exit Sub
Dim arrSpecialID, i
arrSpecialID = Split(tSpecialID, ",")
Set rsInfo = Conn.Execute("select * from PE_InfoS where ModuleType=" & ModuleType & " and InfoID in (" & BatchInfoID & ") order by InfoID desc")
If Not (rsInfo.BOF And rsInfo.EOF) Then
For i = 0 To UBound(arrSpecialID)
tSpecialID = PE_CLng(arrSpecialID(i))
If tSpecialID > 0 Then
rsInfo.movefirst
Do While Not rsInfo.EOF
If rsInfo("SpecialID") = 0 Then
Conn.Execute ("update PE_InfoS set SpecialID=" & tSpecialID & " where InfoID=" & rsInfo("InfoID") & "")
Else
If PE_CLng(Conn.Execute("select count(InfoID) from PE_InfoS where ModuleType=" & ModuleType & " and SpecialID=" & tSpecialID & " and ItemID=" & rsInfo("ItemID") & "")(0)) = 0 Then
Conn.Execute ("insert into PE_InfoS (ModuleType,SpecialID,ItemID) values (" & ModuleType & "," & tSpecialID & "," & rsInfo("ItemID") & ")")
End If
End If
rsInfo.MoveNext
Loop
End If
Next
End If
rsInfo.Close
Set rsInfo = Nothing
Call WriteSuccessMsg("成功将选定的" & ChannelShortName & "移动到目标专题中!", "Admin_" & ModuleName & ".asp?ChannelID=" & ChannelID & "&Action=Manage&ManageType=Special")
Call ClearSiteCache(0)
End Sub
Sub DelFromSpecial()
If AdminPurview = 2 And AdminPurview_Channel > 2 Then
FoundErr = True
ErrMsg = ErrMsg & "<li>对不起,你的权限不够!</li>"
Exit Sub
End If
Dim InfoID, rsInfo
InfoID = Trim(Request("InfoID"))
If IsValidID(InfoID) = False Then
FoundErr = True
ErrMsg = ErrMsg & "<li>请指定InfoID!</li>"
Exit Sub
End If
Set rsInfo = Conn.Execute("select * from PE_InfoS where ModuleType=" & ModuleType & " and InfoID in (" & InfoID & ") order by InfoID desc")
Do While Not rsInfo.EOF
If PE_CLng(Conn.Execute("select count(InfoID) from PE_InfoS where ModuleType=" & ModuleType & " and ItemID=" & rsInfo("ItemID") & "")(0)) > 1 Then
Conn.Execute ("delete from PE_InfoS where InfoID=" & rsInfo("InfoID") & "")
Else
Conn.Execute ("update PE_InfoS set SpecialID=0 where InfoID=" & rsInfo("InfoID") & "")
End If
rsInfo.MoveNext
Loop
rsInfo.Close
Set rsInfo = Nothing
Call WriteSuccessMsg("成功将选定的" & ChannelShortName & "从所属专题中移除!", "Admin_" & ModuleName & ".asp?ChannelID=" & ChannelID & "&Action=Manage&ManageType=Special")
Call ClearSiteCache(0)
End Sub
'**************************************************
'函数名:GetSpecialList
'作 用:频道管理顶部专题导航
'参 数:ChannelID ---- 频道ID
' SpecialID ---- 专题ID
' FileName ---- 专题名称
'返回值:专题导航
'**************************************************
Function GetSpecialList()
Dim rsSpecial, sqlSpecial, strSpecial, i
sqlSpecial = "select * from PE_Special where ChannelID=" & ChannelID & " order by OrderID"
Set rsSpecial = Conn.Execute(sqlSpecial)
If rsSpecial.BOF And rsSpecial.EOF Then
strSpecial = strSpecial & "没有任何专题"
Else
i = 1
strSpecial = "| "
Do While Not rsSpecial.EOF
If rsSpecial("SpecialID") = SpecialID Then
strSpecial = strSpecial & "<a href='" & FileName & "&SpecialID=" & rsSpecial("SpecialID") & "'><font color=red>" & rsSpecial("Specia
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -