BVB Source Codes

Jie Yang v0.6.3 article system Show Admin_ItemFilters.asp Source code

Return Download Jie Yang v0.6.3 article system: download Admin_ItemFilters.asp Source code - Download Jie Yang v0.6.3 article system Source code - Type:.asp
  1. <!--#include file="inc/conn.asp"-->
  2. <!--#include file="inc/function.asp"-->
  3. <!--#include file="../admin_check.asp"-->
  4. <link rel="stylesheet" type="text/css" href="../style/Style.css">
  5. <%
  6. If Not JYAdminLevel(701) Then
  7.         Call ErrorMsg()
  8. End If
  9. Dim SqlItem,RsItem
  10. Dim Action,ErrMsg
  11. Dim FilterID,ItemID,FilterName,FilterObject,FilterType,Flag,PublicTf,FlagName
  12. Dim CurrentPage,AllPage,iItem,ItemNum
  13. Const MaxPerPage=20
  14. Action=Request("Action")
  15. If Action="SetFlag" Then
  16.    Call SetFlag()
  17. End If
  18. If FoundErr=True Then
  19.    Call WriteErrMsg(ErrMsg)
  20. Else
  21.    Call Main()
  22. End If
  23. '关闭数据库链接
  24. Call CloseConn()
  25. Call CloseConnItem()
  26. %>
  27. <%Sub Main%>
  28. <html>
  29. <head>
  30. <title>采集系统</title>
  31. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  32. <SCRIPT language=javascript>
  33. function unselectall(thisform)
  34. {
  35.         if(thisform.chkAll.checked)
  36.         {
  37.                 thisform.chkAll.checked = thisform.chkAll.checked&0;
  38.         }  
  39. }
  40. function CheckAll(thisform)
  41. {
  42.         for (var i=0;i<thisform.elements.length;i++)
  43.         {
  44.                 var e = thisform.elements[i];
  45.                 if (e.Name !="chkAll"&&e.disabled!=true)
  46.                         e.checked = thisform.chkAll.checked;
  47.         }
  48. }
  49. </script>
  50. </head>
  51. <body>
  52. <table width="98%" align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#8ED1FF" class="mtab">
  53.   <tr>
  54.     <td class="td28">采集系统过滤管理</td>
  55.   </tr>
  56.   <tr class="td26" bgcolor="#FFFFFF">
  57.     <td><b>管理导航:</b><a href=Admin_ItemStart.asp>管理首页</a> | <a href="Admin_ItemAddNew.asp">添加新项目</a> | <a href="Admin_ItemManage.asp">采集项目管理</a> | <a href="Admin_ItemFilters.asp">采集过滤设置</a> | <a href="Admin_ItemHistroly.asp">历史采集记录</a> | <a href="Admin_ItemDatabase.asp?Action=LeadOut">采集项目导出</a> <a href="Admin_ItemDatabase.asp?Action=LeadIn">导入</a></td>
  58.   </tr>
  59.   <tr>
  60.     <td bgcolor="#FFFFFF" style="padding-left:10px;"><a href="Admin_ItemFilterAdd.asp">添加新过滤</a></td>
  61.   </tr>
  62. </table>
  63. <table width="98%" align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#8ED1FF" class="mtab">
  64.     <tr>
  65.       <td class="td28" colspan="7">过滤管理</td>
  66.     </tr>
  67.         <form name="myform" method="POST" action="Admin_ItemFilters.asp">
  68.         <tr class="tdcenter" bgcolor="#ECF5FE">
  69.                 <td width="5%">选择</td>
  70.                 <td width="17%">过滤名称</td>
  71.                 <td width="15%">所属项目</td>
  72.                 <td width="12%">过滤对象</td>
  73.                 <td cwidth="12%">过滤类型</td>
  74.                 <td width="15%">状态</td>
  75.                 <td>操作</td>
  76.         </tr>
  77. <%
  78. If Request("page")<>"" then
  79.     CurrentPage=Cint(Request("Page"))
  80. Else
  81.     CurrentPage=1
  82. End if      
  83. set RsItem=server.createobject("adodb.recordset")        
  84. SqlItem="select * from Filters order by FilterID DESC"        
  85. RsItem.open SqlItem,ConnItem,1,1
  86. If (Not RsItem.Eof) and (Not RsItem.Bof) Then
  87.  RsItem.PageSize=MaxPerPage
  88.  Allpage=RsItem.PageCount
  89.  If Currentpage>Allpage Then Currentpage=1
  90.  ItemNum=RsItem.RecordCount
  91.  RsItem.MoveFirst
  92.  RsItem.AbsolutePage=CurrentPage
  93.  iItem=0
  94.    Do while Not RsItem.Eof
  95.       FilterID=RsItem("FilterID")
  96.       ItemID=RsItem("ItemID")
  97.       FilterName=RsItem("FilterName")
  98.       FilterObject=RsItem("FilterObject")
  99.       FilterType=RsItem("FilterType")
  100.       Flag=RsItem("Flag")
  101.       PublicTf=RsItem("PublicTf")
  102. %>
  103.         <tr>
  104.           <td align=center bgcolor="#FFFFFF" style=" width:6%"><input name="FilterID" type="checkbox" class="checkbox" onClick="unselectall(this.form)" value="<%=FilterID%>"></td>
  105.           <td align="center" bgcolor="#FFFFFF"><%=FilterName%></td>
  106.           <td align="center" bgcolor="#FFFFFF"><%Call Admin_ShowItem_Name(ItemID)%></td>
  107.           <td  align="center" bgcolor="#FFFFFF"><%
  108.           If FilterObject=1 Then
  109.              Response.Write "标题过滤"
  110.           ElseIf FilterObject=2 Then
  111.              Response.Write "正文过滤"
  112.           Else
  113.              Response.Write "<font color=red>没有选择!</font>"
  114.           End If
  115.           %></td>
  116.           <td align="center" bgcolor="#FFFFFF">
  117.           <%
  118.           If FilterType=1 Then
  119.              Response.Write "简单替换"
  120.           ElseIf FilterType=2 Then
  121.              Response.Write "高级过滤"
  122.           Else
  123.              Response.Write "<font color=red>没有选择!</font>"
  124.           End If
  125.           %></td>
  126.           <td align="center" bgcolor="#FFFFFF">
  127.           <%If Flag=True Then
  128.                Response.Write "启用"
  129.             Else
  130.                Response.Write "<font color=red>禁用</font>"
  131.             End If
  132.           %>&nbsp;
  133.           <%If PublicTf=False Then
  134.                Response.Write "私有"
  135.             Else
  136.                Response.Write "<font color=red>公有</font>"
  137.             End If
  138.           %>          </td>
  139.           <td align="center" bgcolor="#FFFFFF">
  140.           <%Response.Write "<a href='Admin_ItemFilters.asp?Action=SetFlag&FlagName=Passed&FilterID=" & FilterID & "'>"
  141.             If Flag=True Then
  142.                Response.Write "禁用"
  143.             Else
  144.                Response.Write "启用"
  145.             End If
  146.             Response.Write "</a>"
  147.            %>&nbsp;
  148.           <%Response.Write "<a href='Admin_ItemFilters.asp?Action=SetFlag&FlagName=Public&FilterID=" & FilterID & "'>"
  149.             If PublicTf=False Then
  150.                Response.Write "公有"
  151.             Else
  152.                Response.Write "私有"
  153.             End If
  154.             Response.Write "</a>"
  155.            %>&nbsp;
  156.              <a href="Admin_ItemFilterModify.asp?FilterID=<%=RsItem("FilterID")%>">修改</a>
  157.           &nbsp;<a href="Admin_ItemFilters.asp?Action=SetFlag&FlagName=Del&FilterID=<%=RsItem("FilterID")%>" onclick='return confirm("确定要删除此记录吗?");'>删除</a>          </td>
  158.           <td bgcolor="#FFFFFF"></td>
  159.         </TR>
  160. <%    iItem=iItem+1
  161.       If iItem>=MaxPerPage Then Exit Do
  162.       RsItem.MoveNext
  163.    Loop
  164. %>
  165.     <tr>
  166.       <td height="30" colspan=9 bgcolor="#FFFFFF">  
  167.         <input name="Action" type="hidden"  value="SetFlag">
  168.       &nbsp;<input name="chkAll" type="checkbox" class="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox" >全选      </td>
  169.     </tr>
  170.     <tr>
  171.       <td height="30" colspan=9 align="center" bgcolor="#FFFFFF">  
  172.         <input name="FlagName" type="submit" class="submit1" onclick='return confirm("确定要执行删除操作吗?该操作不可恢复!");' value="删 除">
  173.         &nbsp;&nbsp;
  174.         <input name="FlagName" type="submit" class="submit1" onclick='return confirm("确定要启用所选择的项目吗?");' value="启 用">
  175.         &nbsp;&nbsp;
  176.         <input name="FlagName" type="submit" class="submit1" onclick='return confirm("确定要禁用所选择的项目吗?");' value="禁 用">
  177.         &nbsp;&nbsp;
  178.         <input name="FlagName" type="submit" class="submit1" onclick='return confirm("确定要将所选择的项目设为公有吗?");' value="公 有">
  179.         &nbsp;&nbsp;
  180.       <input name="FlagName" type="submit" class="submit1" onclick='return confirm("确定要将所选择的项目设为私有吗?");' value="私 有">
  181.       &nbsp;&nbsp;      </td>
  182.     </tr>
  183.         <tr><td colspan='9' align="right" bgcolor="#FFFFFF"><%=ShowPage("Admin_ItemFilters.asp",ItemNum,MaxPerPage,True,True," 个记录")%></td></tr>
  184. <%Else%>
  185. <tr>
  186.   <td colspan='9' align="center" bgcolor="#FFFFFF">系统中暂无过滤记录!</td>
  187. </tr>
  188. <%End If
  189.  RsItem.Close
  190. Set RsItem=Nothing
  191. %>
  192. </form>  
  193. </table>
  194. </body>
  195. </html>
  196. <%end sub%>
  197. <%
  198. Sub  SetFlag
  199.    FilterID=Trim(Request("FilterID"))
  200.    FlagName=Trim(Request("FlagName"))
  201.    If FilterID<>"" Then
  202.       FilterID=Replace(FilterID," ","")
  203.    Else
  204.       FoundErr=True
  205.       ErrMsg=ErrMsg & "<br><li>请选择要执行操作的记录!</li>"
  206.    End if
  207.    If FoundErr<>True Then
  208.       Select Case FlagName
  209.       Case "Del","删&nbsp;&nbsp;除"
  210.          SqlItem="Delete from [Filters] Where FilterID In(" & FilterID & ")"
  211.       Case "Public"
  212.          SqlItem="Update [Filters] set PublicTf=Not PublicTf Where FilterID In(" & FilterID & ")"
  213.       Case "公&nbsp;&nbsp;有"
  214.          SqlItem="Update [Filters] set PublicTf=True Where FilterID In(" & FilterID & ")"
  215.       Case "私&nbsp;&nbsp;有"
  216.          SqlItem="Update [Filters] set PublicTf=False Where FilterID In(" & FilterID & ")"
  217.       Case "Passed"
  218.          SqlItem="Update [Filters] set Flag=Not Flag Where FilterID In(" & FilterID & ")"
  219.       Case "启&nbsp;&nbsp;用"
  220.          SqlItem="Update [Filters] set Flag=True Where FilterID In(" & FilterID & ")"
  221.       Case "禁&nbsp;&nbsp;用"
  222.          SqlItem="Update [Filters] set Flag=False Where FilterID In(" & FilterID & ")"
  223.       End Select
  224.       ConnItem.Execute(SqlItem)
  225.    End If
  226. End  Sub
  227. %>
  228.  
  229.  
  230.  
  231.  
downloadAdmin_ItemFilters.asp Source code - Download Jie Yang v0.6.3 article system Source code
Related Source Codes/Software:
Jilin classification information release system v5.0 trial version - A ready-made classifieds site publishing system, h... 2016-09-21
Linyi CMS v6.5 market classification information - A. supply and demand information function: informa... 2016-09-21
Tesco discount net SQL version - And presentations, faster. 2016-09-21
- electronic enterprise website management system In a fully functional version - Super suitable for enterprise agents build a corpo... 2016-09-21
Rio mesh network hard disk system v3.0 - System functions: 1, increase the progress of Asp... 2016-09-21
Classified information network business in suzhou - Overall module: classification of supply and deman... 2016-09-21
NPOINT virtual host v1.7.0 formal version management system - The system main function is introduced 2016-09-21
IDC sales web site - Beautiful IDC sales web site source code 2016-09-21
Oo 126 CMS movie site system - This procedure ASP + ACC/ASP + SQL, using new kern... 2016-09-21
Pcook CMS bubble guest v3.0 SDCMS version - Developed by Asp+Access, and meet the needs of sma... 2016-09-21
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top