123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549 |
- <%
- Action = Trim(Request("Action"))
- MaxPerPage = 20
- ChannelID = Request("ChannelID")
- if channelid = "" then channelid = 1
- '检查管理员是否登录
- Dim AdminID, AdminName, AdminPassword, AdminLoginCode, AdminPurview, PurviewPassed
- Dim rsGetAdmin, sqlGetAdmin
- AdminName = ReplaceBadChar(Trim(Request.Cookies("AdminName")))
- AdminPassword = ReplaceBadChar(Trim(Request.Cookies("AdminPassword")))
- if useSiteManageCode = true then
- AdminLoginCode = ReplaceBadChar(Trim(Request.Cookies("AdminLoginCode")))
- else
- AdminLoginCode = SiteManageCode
- end if
- If AdminName = "" Or AdminPassword = "" Or AdminLoginCode <> SiteManageCode Then
- Call CloseConn
- Response.redirect "login.asp"
- End If
- sqlGetAdmin = "select * from t_user_info where uid='" & AdminName & "' and pwd='" & AdminPassword & "'"
- Set rsGetAdmin = Server.CreateObject("adodb.recordset")
- rsGetAdmin.Open sqlGetAdmin, Conn, 1, 1
- If rsGetAdmin.BOF And rsGetAdmin.EOF Then
- rsGetAdmin.Close
- Set rsGetAdmin = Nothing
- Call CloseConn
- Response.redirect "login.asp"
- End If
- AdminID = rsGetAdmin("ID")
- AdminName = rsGetAdmin("uid")
- '**************************************************
- '函数名:IsObjInstalled
- '作 用:检查组件是否已经安装
- '参 数:strClassString ----组件名
- '返回值:True ----已经安装
- ' False ----没有安装
- '**************************************************
- Function IsObjInstalled(strClassString)
- On Error Resume Next
- IsObjInstalled = False
- Err = 0
- Dim xTestObj
- Set xTestObj = CreateObject(strClassString)
- If Err.Number = 0 Then IsObjInstalled = True
- Set xTestObj = Nothing
- Err = 0
- End Function
- dim ObjInstalled_FSO, fso
- ObjInstalled_FSO = IsObjInstalled("Scripting.FileSystemObject")
- If ObjInstalled_FSO = True Then
- Set fso = Server.CreateObject("Scripting.FileSystemObject")
- Else
- Response.Write "<li>FSO组件不可用,各种与FSO相关的功能都将出错!请运行Install.asp或者到后台网站配置处设置好FSO组件名称。</li>"
- End If
- Sub ShowPageTitle(strTitle)
- Response.Write " <tr class='topbg'> " & vbCrLf
- Response.Write " <td height='22' colspan='10'><table width='100%'><tr class='topbg'><td align='center'><b>" & strTitle & "</b></td></tr></table></td>" & vbCrLf
- Response.Write " </tr>" & vbCrLf
- End Sub
- '**************************************************
- '函数名:ShowJS_Manage
- '作 用:通用频道管理js验证(多项诓全选,删除提示,移动)
- '参 数:ItemName ---- 项目名称
- '返回值:javascript 验证
- '**************************************************
- Public Sub ShowJS_Manage(ItemName)
- Dim strJS
- Response.Write "<SCRIPT language=javascript>" & vbCrLf
- Response.Write "function CheckItem(CB){" & vbCrLf
- Response.Write " var tagname=(arguments.length>1)?arguments[1]:'TR';" & vbCrLf
- Response.Write " if(document.myform.chkAll.checked){" & vbCrLf
- Response.Write " document.myform.chkAll.checked = document.myform.chkAll.checked&0;" & vbCrLf
- Response.Write " }" & vbCrLf
- Response.Write " if (CB.checked){hL(CB,tagname)};else{dL(CB,tagname)};" & vbCrLf
- Response.Write " var TB=TO=0;" & vbCrLf
- Response.Write " for (var i=0;i<myform.elements.length;i++) {" & vbCrLf
- Response.Write " var e=myform.elements[i];" & vbCrLf
- Response.Write " if ((e.name != 'chkAll') && (e.type=='checkbox')) {" & vbCrLf
- Response.Write " TB++;" & vbCrLf
- Response.Write " if (e.checked) TO++;" & vbCrLf
- Response.Write " }" & vbCrLf
- Response.Write " }" & vbCrLf
- Response.Write " myform.chkAll.checked=(TO==TB)?true:false;" & vbCrLf
- Response.Write "}" & vbCrLf
- Response.Write "function CheckAll(form){" & vbCrLf
- Response.Write " var tagname=(arguments.length>1)?arguments[1]:'TR';" & vbCrLf
- Response.Write " for (var i=0;i<form.elements.length;i++){" & vbCrLf
- Response.Write " var e = form.elements[i];" & vbCrLf
- Response.Write " if (e.name != 'chkAll' && e.disabled == false && e.type == 'checkbox') {" & vbCrLf
- Response.Write " e.checked = form.chkAll.checked;" & vbCrLf
- Response.Write " if (e.checked){hL(e,tagname)};else{dL(e,tagname)};" & vbCrLf
- Response.Write " }" & vbCrLf
- Response.Write " }" & vbCrLf
- Response.Write "}" & vbCrLf
- Response.Write "function hL(E,tagname){" & vbCrLf
- Response.Write " while (E.tagName!=tagname) {E=E.parentElement;}" & vbCrLf
- Response.Write " E.className='tdbg2';" & vbCrLf
- Response.Write "}" & vbCrLf
- Response.Write "function dL(E,tagname){" & vbCrLf
- Response.Write " while (E.tagName!=tagname) {E=E.parentElement;}" & vbCrLf
- Response.Write " E.className='tdbg';" & vbCrLf
- Response.Write "}" & vbCrLf
- Response.Write "function ConfirmDel(){" & vbCrLf
- Response.Write " if(document.myform.Action.value=='Del'){" & vbCrLf
- Response.Write " if(confirm('确定要删除选中的" & ItemName & "吗?本操作将把选中的" & ItemName & "移到回收站中。必要时您可从回收站中恢复!'))" & vbCrLf
- Response.Write " return true;" & vbCrLf
- Response.Write " else" & vbCrLf
- Response.Write " return false;" & vbCrLf
- Response.Write " }" & vbCrLf
- Response.Write " else if(document.myform.Action.value=='ConfirmDel'){" & vbCrLf
- Response.Write " if(confirm('确定要彻底删除选中的" & ItemName & "吗?彻底删除后将不能恢复!'))" & vbCrLf
- Response.Write " return true;" & vbCrLf
- Response.Write " else" & vbCrLf
- Response.Write " return false;" & vbCrLf
- Response.Write " }" & vbCrLf
- Response.Write " else if(document.myform.Action.value=='ClearRecyclebin'){" & vbCrLf
- Response.Write " if(confirm('确定要清空回收站?一旦清空将不能恢复!'))" & vbCrLf
- Response.Write " return true;" & vbCrLf
- Response.Write " else" & vbCrLf
- Response.Write " return false;" & vbCrLf
- Response.Write " }" & vbCrLf
- Response.Write " else if(document.myform.Action.value=='DelFromSpecial'){" & vbCrLf
- Response.Write " if(confirm('确定要将选中的" & ItemName & "从其所属专题中删除吗?操作成功后" & ItemName & "将不属于任何专题。'))" & vbCrLf
- Response.Write " return true;" & vbCrLf
- Response.Write " else" & vbCrLf
- Response.Write " return false;" & vbCrLf
- Response.Write " }" & vbCrLf
- Response.Write "}" & vbCrLf
- Response.Write "</SCRIPT>" & vbCrLf
- End Sub
- Sub ShowContentManagePath(RootName)
- Response.Write "您现在的位置: " & ChannelName & "管理 >> <a href='" & FileName & "'>" & RootName & "</a> >> "
- If ClassID > 0 Then
- If ParentID > 0 Then
- Dim sqlPath, rsPath
- sqlPath = "select ClassID,ClassName from Class where ClassID in (" & ParentPath & ") order by Depth"
- Set rsPath = Conn.Execute(sqlPath)
- Do While Not rsPath.EOF
- Response.Write "<a href='" & FileName & "&ClassID=" & rsPath(0) & "'>" & rsPath(1) & "</a> >> "
- rsPath.MoveNext
- Loop
- rsPath.Close
- Set rsPath = Nothing
- End If
- Response.Write "<a href='" & FileName & "&ClassID=" & ClassID & "'>" & ClassName & "</a> >> "
- End If
- If ManageType = "My" Then
- Response.Write "<font color=red>" & AdminName & "</font> 添加的" & ChannelShortName & ""
- Else
- If Keyword = "" Then
- Select Case Status
- Case -2
- Response.Write "退稿"
- Case -1
- Response.Write "草稿"
- Case 0
- Response.Write "待审核的" & ChannelShortName & "!"
- Case 1
- Response.Write "已审核的" & ChannelShortName & "!"
- Case Else
- Response.Write "所有" & ChannelShortName & "!"
- End Select
- Else
- Select Case strField
- Case "Title"
- Response.Write "标题中含有 <font color=red>" & Keyword & "</font> "
- Case "Content"
- Response.Write "内容中含有 <font color=red>" & Keyword & "</font> "
- Case "Author"
- Response.Write "作者姓名中含有 <font color=red>" & Keyword & "</font> "
- Case "Inputer"
- Response.Write "<font color=red>" & Keyword & "</font> 添加"
- Case "Editor"
- Response.Write "<font color=red>" & Keyword & "</font> 审核"
- Case "Keyword"
- Response.Write "关键字为 <font color=red>" & Keyword & "</font> "
- Case "UpdateTime"
- Response.Write "更新时间为 <font color=red>" & Keyword & "</font> "
- Case "SoftName", "PhotoName"
- Response.Write "名称中含有 <font color=red>" & Keyword & "</font> "
- Case "SoftIntro", "PhotoIntro"
- Response.Write "内容中含有 <font color=red>" & Keyword & "</font> "
- Case Else
- Response.Write "名称中含有 <font color=red>" & Keyword & "</font> "
- End Select
- Select Case Status
- Case -2
- Response.Write "的退稿"
- Case -1
- Response.Write "的草稿"
- Case 0
- Response.Write "并且未审核的" & ChannelShortName & "!"
- Case 1
- Response.Write "并且已审核的" & ChannelShortName & "!"
- Case Else
- Response.Write "的" & ChannelShortName & "!"
- End Select
- End If
- End If
- End Sub
- '**************************************************
- '函数名:ShowPage
- '作 用:显示“上一页 下一页”等信息
- '参 数:sFileName ----链接地址
- ' TotalNumber ----总数量
- ' MaxPerPage ----每页数量
- ' CurrentPage ----当前页
- ' ShowTotal ----是否显示总数量
- ' ShowAllPages ---是否用下拉列表显示所有页面以供跳转。
- ' strUnit ----计数单位
- ' ShowMaxPerPage ----是否显示每页信息量选项框
- '返回值:“上一页 下一页”等信息的HTML代码
- '**************************************************
- Function ShowPage(sfilename, totalnumber, MaxPerPage, CurrentPage, ShowTotal, ShowAllPages, strUnit, ShowMaxPerPage)
- Dim TotalPage, strTemp, strUrl, i
- If totalnumber = 0 Or MaxPerPage = 0 Or IsNull(MaxPerPage) Then
- ShowPage = ""
- Exit Function
- End If
- If totalnumber Mod MaxPerPage = 0 Then
- TotalPage = totalnumber \ MaxPerPage
- Else
- TotalPage = totalnumber \ MaxPerPage + 1
- End If
- If CurrentPage > TotalPage Then CurrentPage = TotalPage
-
- strTemp = "<div class=""show_page"">"
- If ShowTotal = True Then
- strTemp = strTemp & "共 <b>" & totalnumber & "</b> " & strUnit & " "
- End If
- If ShowMaxPerPage = True Then
- strUrl = JoinChar(sfilename) & "MaxPerPage=" & MaxPerPage & "&"
- Else
- strUrl = JoinChar(sfilename)
- End If
- If CurrentPage = 1 Then
- strTemp = strTemp & "首页 上一页 "
- Else
- strTemp = strTemp & "<a href='" & strUrl & "page=1'>首页</a> "
- strTemp = strTemp & "<a href='" & strUrl & "page=" & (CurrentPage - 1) & "'>上一页</a> "
- End If
- If CurrentPage >= TotalPage Then
- strTemp = strTemp & "下一页 尾页"
- Else
- strTemp = strTemp & "<a href='" & strUrl & "page=" & (CurrentPage + 1) & "'>下一页</a> "
- strTemp = strTemp & "<a href='" & strUrl & "page=" & TotalPage & "'>尾页</a>"
- End If
- strTemp = strTemp & " 页次:<strong><font color=red>" & CurrentPage & "</font>/" & TotalPage & "</strong>页 "
- If ShowMaxPerPage = True Then
- strTemp = strTemp & " <Input type='text' name='MaxPerPage' size='3' maxlength='4' value='" & MaxPerPage & "' onKeyPress=""if (event.keyCode==13) window.location='" & JoinChar(sfilename) & "page=" & CurrentPage & "&MaxPerPage=" & "'+this.value;"">" & strUnit & "/页"
- Else
- strTemp = strTemp & " <b>" & MaxPerPage & "</b>" & strUnit & "/页"
- End If
- If ShowAllPages = True Then
- If TotalPage > 20 Then
- strTemp = strTemp & " 转到第<Input type='text' name='page' size='3' maxlength='5' value='" & CurrentPage & "' onKeyPress=""if (event.keyCode==13) window.location='" & strUrl & "page=" & "'+this.value;"">页"
- Else
- strTemp = strTemp & " 转到:<select name='page' size='1' onchange=""javascript:window.location='" & strUrl & "page=" & "'+this.options[this.selectedIndex].value;"">"
- For i = 1 To TotalPage
- strTemp = strTemp & "<option value='" & i & "'"
- If CLng(CurrentPage) = CLng(i) Then strTemp = strTemp & " selected "
- strTemp = strTemp & ">第" & i & "页</option>"
- Next
- strTemp = strTemp & "</select>"
- End If
- End If
- strTemp = strTemp & "</div>"
- ShowPage = strTemp
- End Function
- Function JoinChar(ByVal strUrl)
- If strUrl = "" Then
- JoinChar = ""
- Exit Function
- End If
- If InStr(strUrl, "?") < Len(strUrl) Then
- If InStr(strUrl, "?") > 1 Then
- If InStr(strUrl, "&") < Len(strUrl) Then
- JoinChar = strUrl & "&"
- Else
- JoinChar = strUrl
- End If
- Else
- JoinChar = strUrl & "?"
- End If
- Else
- JoinChar = strUrl
- End If
- End Function
- Function FilterArrNull(ByVal ArrString, ByVal CompartString)
- Dim arrContent, arrTemp, i
- If CompartString = "" Or ArrString = "" Then
- FilterArrNull = ArrString
- Exit Function
- End If
- If InStr(ArrString, CompartString) = 0 Then
- FilterArrNull = ArrString
- Exit Function
- Else
- arrContent = Split(ArrString, CompartString)
- For i = 0 To UBound(arrContent)
- If Trim(arrContent(i)) <> "" Then
- If arrTemp = "" Then
- arrTemp = Trim(arrContent(i))
- Else
- arrTemp = arrTemp & CompartString & Trim(arrContent(i))
- End If
- End If
- Next
- End If
- FilterArrNull = arrTemp
- End Function
- Sub ShowForm_MoveToClass()
-
- Dim tChannelID, BatchInfoID
- tChannelID = Trim(Request("tChannelID"))
- If tChannelID = "" Then
- tChannelID = ChannelID
- Else
- tChannelID = CLng(tChannelID)
- End If
- BatchInfoID = ReplaceBadChar(Request("Batch" & ModuleName & "ID"))
- If BatchInfoID = "" Then
- BatchInfoID = ReplaceBadChar(Request(ModuleName & "ID"))
- 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='" & ModuleName & "Type' value='1' checked>指定" & ChannelShortName & "ID:<input type='text' name='Batch" & ModuleName & "ID' value='" & BatchInfoID & "' size='30'><br>"
- Response.Write " <input type='radio' name='" & ModuleName & "Type' value='2'>指定区域的" & ChannelShortName & ":<br><select name='BatchClassID' size='2' multiple style='height:360px;width:300px;'>" & GetClass_Option(channelid, 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'>"
- Response.Write " 目标频道:<select name='tChannelID' onChange='document.myform.submit();'>" & GetChannel_Option(ModuleType, tChannelID) & "</select><br>"
- Response.Write " 目标区域:<font color=red>(不能指定为外部区域)</font><br><select name='tClassID' size='2' style='height:360px;width:300px;'>" & GetClass_Channel(tChannelID) & "</select>"
- Response.Write " </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='MoveToClass'>"
- Response.Write " <input name='add' type='submit' id='Add' value=' 执行批处理 ' style='cursor:hand;' onClick=""document.myform.Action.value='DoMoveToClass';""> "
- 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>"
- Response.Write "</form>"
- Response.Write "<script language='javascript'>" & vbCrLf
- Response.Write "function SelectAll(){" & vbCrLf
- Response.Write " for(var i=0;i<document.myform.BatchClassID.length;i++){" & vbCrLf
- Response.Write " document.myform.BatchClassID.options[i].selected=true;}" & vbCrLf
- Response.Write "}" & vbCrLf
- Response.Write "function UnSelectAll(){" & vbCrLf
- Response.Write " for(var i=0;i<document.myform.BatchClassID.length;i++){" & vbCrLf
- Response.Write " document.myform.BatchClassID.options[i].selected=false;}" & vbCrLf
- Response.Write "}" & vbCrLf
- Response.Write "</script>" & vbCrLf
- End Sub
- '**************************************************
- '函数名:GetClass_Channel
- '作 用:区域下拉菜单(不检查权限)
- '参 数:iChannelID ---- 频道ID
- '返回值:区域下拉菜单
- '**************************************************
- Function GetClass_Channel(iChannelID)
- Dim rsClass, sqlClass, strClass_Option, tmpDepth, i
- Dim arrShowLine(20)
- For i = 0 To UBound(arrShowLine)
- arrShowLine(i) = False
- Next
- sqlClass = "Select * from Class where ChannelID=" & iChannelID & " order by RootID,OrderID"
- Set rsClass = Conn.Execute(sqlClass)
- If rsClass.BOF And rsClass.EOF Then
- strClass_Option = strClass_Option & "<option value=''>请先添加区域</option>"
- Else
- Do While Not rsClass.EOF
- tmpDepth = rsClass("Depth")
- If rsClass("NextID") > 0 Then
- arrShowLine(tmpDepth) = True
- Else
- arrShowLine(tmpDepth) = False
- End If
- If rsClass("ClassType") = 2 Then
- strClass_Option = strClass_Option & "<option value=''"
- Else
- If rsClass("Child") > 0 And rsClass("EnableAdd") = False Then
- strClass_Option = strClass_Option & "<option value='0'"
- Else
- strClass_Option = strClass_Option & "<option value='" & rsClass("ClassID") & "'"
- End If
- End If
- strClass_Option = strClass_Option & ">"
-
- If tmpDepth > 0 Then
- For i = 1 To tmpDepth
- strClass_Option = strClass_Option & " "
- If i = tmpDepth Then
- If rsClass("NextID") > 0 Then
- strClass_Option = strClass_Option & "├ "
- Else
- strClass_Option = strClass_Option & "└ "
- End If
- Else
- If arrShowLine(i) = True Then
- strClass_Option = strClass_Option & "│"
- Else
- strClass_Option = strClass_Option & " "
- End If
- End If
- Next
- End If
- strClass_Option = strClass_Option & rsClass("ClassName")
- If rsClass("ClassType") = 2 Then
- strClass_Option = strClass_Option & "(外)"
- End If
- strClass_Option = strClass_Option & "</option>"
- rsClass.MoveNext
- Loop
- End If
- rsClass.Close
- Set rsClass = Nothing
- strClass_Option = strClass_Option & "<option value='-1'>未指定任何区域</option>"
- GetClass_Channel = strClass_Option
- End Function
- '**************************************************
- '函数名:GetChannel_Option
- '作 用:频道下拉菜单
- '参 数:iModuleType ---- 频道类型
- ' iChannelID ---- 频道ID
- '返回值:频道下拉菜单目
- '**************************************************
- Function GetChannel_Option(iModuleType, iChannelID)
- Dim rsGetAdmin, rsChannel
- Dim strChannel
- Set rsChannel = Conn.Execute("select * from Channel where ChannelID=" & iChannelID & " order by OrderID")
- Do While Not rsChannel.EOF
- If rsChannel(0) = iChannelID Then
- strChannel = strChannel & "<option value='" & rsChannel(0) & "' selected>" & rsChannel(1) & "</option>"
- Else
- strChannel = strChannel & "<option value='" & rsChannel(0) & "'>" & rsChannel(1) & "</option>"
- End If
- rsChannel.MoveNext
- Loop
- rsChannel.Close
- Set rsChannel = Nothing
- GetChannel_Option = strChannel
- End Function
- '**************************************************
- '函数名:ShowJS_Main
- '作 用:页面管理js(多项诓全选,删除提示)
- '参 数:ItemName ---- 项目名称
- '返回值:javascript 验证
- '**************************************************
- Public Sub ShowJS_Main(ItemName)
- Response.Write "<SCRIPT language=javascript>" & vbCrLf
- Response.Write "function unselectall(){" & vbCrLf
- Response.Write " if(document.myform.chkAll.checked){" & vbCrLf
- Response.Write " document.myform.chkAll.checked = document.myform.chkAll.checked&0;" & vbCrLf
- Response.Write " }" & vbCrLf
- Response.Write "}" & vbCrLf
- Response.Write "function CheckAll(form){" & vbCrLf
- Response.Write " for (var i=0;i<form.elements.length;i++){" & vbCrLf
- Response.Write " var e = form.elements[i];" & vbCrLf
- Response.Write " if (e.Name != 'chkAll'&&e.disabled==false)" & vbCrLf
- Response.Write " e.checked = form.chkAll.checked;" & vbCrLf
- Response.Write " }" & vbCrLf
- Response.Write " }" & vbCrLf
- Response.Write "function ConfirmDel(){" & vbCrLf
- Response.Write " if(document.myform.Action.value=='Del'){" & vbCrLf
- Response.Write " if(confirm('确定要删除选中的" & ItemName & "吗?'))" & vbCrLf
- Response.Write " return true;" & vbCrLf
- Response.Write " else" & vbCrLf
- Response.Write " return false;" & vbCrLf
- Response.Write " }" & vbCrLf
- Response.Write "}" & vbCrLf
- Response.Write "</SCRIPT>" & vbCrLf
- End Sub
- '**************************************************
- '函数名:FoundInArr
- '作 用:检测数组中是否有指定的数值
- '参 数:strArr ----- 调入的数组
- ' strItem ----- 检测的字符
- ' strSplit ----- 分割字符
- '返回值:True ----有
- ' False ----没有
- '**************************************************
- Function FoundInArr(strArr, strItem, strSplit)
- Dim arrTemp, arrTemp2, i, j
- FoundInArr = False
- If IsNull(strArr) Or IsNull(strItem) Or Trim(strArr) = "" Or Trim(strItem) = "" Then
- Exit Function
- End If
- If IsNull(strSplit) Or strSplit = "" Then
- strSplit = ","
- End If
- If InStr(Trim(strArr), strSplit) > 0 Then
- If InStr(Trim(strItem), strSplit) > 0 Then
- arrTemp = Split(strArr, strSplit)
- arrTemp2 = Split(strItem, strSplit)
- For i = 0 To UBound(arrTemp)
- For j = 0 To UBound(arrTemp2)
- If LCase(Trim(arrTemp2(j))) <> "" And LCase(Trim(arrTemp(i))) <> "" And LCase(Trim(arrTemp2(j))) = LCase(Trim(arrTemp(i))) Then
- FoundInArr = True
- Exit Function
- End If
- Next
- Next
- Else
- arrTemp = Split(strArr, strSplit)
- For i = 0 To UBound(arrTemp)
- If LCase(Trim(arrTemp(i))) = LCase(Trim(strItem)) Then
- FoundInArr = True
- Exit Function
- End If
- Next
- End If
- Else
- If LCase(Trim(strArr)) = LCase(Trim(strItem)) Then
- FoundInArr = True
- End If
- End If
- End Function
- %>
|