home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 August / CHIP_08_2003.iso / Spesial / proxy / ProxPro / ProxyPro.exe / data1.cab / ConfigSite_Files / rules / rule.agp < prev    next >
Encoding:
Text File  |  2002-12-09  |  9.0 KB  |  342 lines

  1. <% 
  2.     path = SysInfo.SkinPath
  3.     dim szPath
  4.     szPath = "Table"
  5.     SkinTable = SysInfo.GetSkinParameter(szPath)
  6.     szPath = "Font"
  7.     SkinFont = SysInfo.GetSkinParameter(szPath)
  8.     szPath = "Link"
  9.     SkinLink = SysInfo.GetSkinParameter(szPath)
  10.     szPath = "VLink"
  11.     SkinVLink= SysInfo.GetSkinParameter(szPath)
  12. %>
  13. <script language="JavaScript">
  14. <!--
  15. function MM_preloadImages() { //v3.0
  16.   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  17.     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  18.     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  19. }
  20.  
  21. function MM_swapImgRestore() { //v3.0
  22.   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  23. }
  24.  
  25. function MM_findObj(n, d) { //v4.0
  26.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  27.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  28.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  29.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  30.   if(!x && document.getElementById) x=document.getElementById(n); return x;
  31. }
  32.  
  33. function MM_swapImage() { //v3.0
  34.   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  35.    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  36. }
  37. //-->
  38. </script>
  39.  
  40. <script language=JavaScript>
  41. <!--
  42.     function displayRuleAdvancedSettings( ruleId )
  43.     {
  44.         //alert("This is it! (" + ruleId + ") ");
  45.         document.location.href = "advancedrule.agp?rule=" + ruleId;
  46.         return true;
  47.     }
  48. //-->
  49. </script>
  50.  
  51. <html>
  52. <head>
  53. <title>Professional GateKeeper - Infopulse</title>
  54. <!--              -->
  55. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
  56. <title>MediaFamily - Welcome</title>
  57.  
  58. </head>
  59. <body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" background="../images/backgr_x.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  60.   <tr> 
  61.     <td width="344"><img src="images/1_r1_c2.jpg" width="344" height="70"></td>
  62.     <td width="135"><img src="images/1_r1_c3.jpg" width="135" height="70"></td>
  63.     <td width="100"><a href="hlpRules.agp"><img src="images/1_r1_c4.jpg" width="100" height="70"border=0></a></td>
  64.     <td width="1000"> </td>
  65.   </tr>
  66. </table>
  67. <map name="n1_r4_c3Map"> 
  68.   <area shape="rect" coords="492,45,567,76" href="#">
  69. </map>
  70.  
  71.  
  72. <%
  73.     dim ruletype
  74.  
  75.     ruleName = Request.ReqParam("rule")
  76.     if( ruleName = "" ) then
  77.         nou = True
  78.     else
  79.         nou = False
  80.         action = Request.ReqParam("action")
  81.         ruletype = Request.ReqParam("ruletype")
  82.         if( action = "" ) then
  83.             Set rule = Rules.item(ruleName)
  84.         else
  85.             if( action = "Remove" ) then
  86.                 Set rule = Rules.item(ruleName)
  87.                 rule.Remove
  88.                 Response.Redirect("/rules/managerules.agp")
  89.             end if
  90.             if( action = "Commit" ) then
  91.                 Set rule = Rules.NewRule
  92.                 rule.Name = ruleName
  93.                 rule.Commit
  94.                 Response.Redirect("/rules/rule.agp?rule=" + ruleName)
  95.             end if
  96.         end if
  97.     end if
  98. %>
  99.  
  100. <%
  101.     if nou = False then
  102.         Set Users = Accounts.Users
  103.         On Error Resume Next
  104.         Set user = Users.item( ruleName )
  105.         If Not Err.Number = 0 Then 
  106.             szType = "group"
  107.             Err.Number = 0
  108.         else
  109.             szType = "user"
  110.         End If
  111. %>
  112.     <p><big><strong><font face="Arial">
  113.         Rules for <%Response.Write(szType)%> <%Response.Write(ruleName)%>
  114.     </font></strong></big></p>
  115. <%
  116.     End if
  117. %>
  118.  
  119. <%
  120.     if Not Err.Number = 0 Then
  121.         Response.Write("<B><FONT COLOR=""#FF0000"">" & Err.Description & ": " & ruleName & "</FONT></B><br>")
  122.     end if
  123. %>
  124. <%
  125.    if nou = False then
  126. %>
  127.  
  128.     <div>
  129.     <table border="1" cellpadding="0" cellspacing="0" width="60%">
  130.    <tr>
  131.         <td width="40%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  132.             Time scheduling on protocols
  133.         </font></strong></td>
  134.    </tr>
  135.   <%
  136.     for i = 1 to rule.CountProtocols
  137.         protName = rule.GetProtocolName(i)
  138.         link = "<a href=""protocoledit.agp?rule=" & ruleName & "&protocol=" & protName & """>" & protName & "</a>"
  139.   %>
  140.    <tr>
  141.         <td width="50%"><font face="Arial">
  142.              
  143.             <%Response.Write(link)%>
  144.         <font></td>
  145.    </tr>
  146.   <%
  147.     next
  148.   %>
  149.    </table></div>
  150.    <font face="Arial">
  151.   <%
  152.     link = "<a href=""protocoledit.agp?rule=" & ruleName & """>Add new time scheduling rule</a>"
  153.     Response.Write(link)
  154.   %>
  155.   </font>
  156.    <p>
  157.    <hr width="60%" align="left">
  158.    <br>
  159.    <div>
  160.     <table border="1" cellpadding="0" cellspacing="0" width="60%">
  161.    <tr>
  162.         <%
  163.             if rule.SitesPermitted then
  164.                 msg = "All sites are DENIED, excepting these:"
  165.             else
  166.                 msg = "All sites are ALLOWED, excepting these:"
  167.             end if
  168.         %>
  169.         <td width="50%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  170.             <%Response.Write(msg)    %>
  171.         </font></strong></td>
  172.    </tr>
  173.   <%
  174.     for i = 1 to rule.CountSites
  175.         site = rule.GetSite(i)
  176.         link = "<a href=""siteedit.agp?rule=" & ruleName & "&site=" & site & " &ruletype=site"">" & site & "</a>"
  177.   %>
  178.     <tr>
  179.         <td width=50%><font face="Arial"> <%Response.Write(link)%></font></td>
  180.     </tr>
  181.   <%
  182.     next
  183.   %>
  184.    </table></div>
  185. <font face="Arial">
  186. <a href="siteedit.agp?rule=<%Response.Write(ruleName)%>&ruletype=site">Add new site</a>
  187. <form method="POST" action= "siteedit.agp?ruletype=site">
  188.     Press this button to <input type="hidden" name="rule" value="<%Response.Write(ruleName)%>">
  189.     <%
  190.         if rule.SitesPermitted then
  191.     %>
  192.             <input type="submit" name="action" value="Allow">
  193.     <%
  194.         else
  195.     %>
  196.             <input type="submit" name="action" value="Deny">
  197.     <%
  198.         end if
  199.     %>
  200.     access to all sites except those listed above.<br>
  201.     Press this button to 
  202.         <input 
  203.             type=button
  204.             id=SiteRule<%Response.Write(i)%>
  205.             name=SiteRule<%Response.Write(i)%>
  206.             value="Edit advanced options"
  207.             onclick="javascript: displayRuleAdvancedSettings( '<%Response.Write( ruleName )%>' );">
  208.     of this rule.
  209.  
  210. </form>
  211.  
  212. </font>
  213.  
  214.  
  215. <! ---------------------------------- ->
  216.  
  217.    <p>
  218.    <hr width="60%" align="left">
  219.    <br>
  220.    <div>
  221.     <table border="1" cellpadding="0" cellspacing="0" width="60%">
  222.    <tr>
  223.         <td width="50%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  224.             List of restricted words
  225.         </font></strong></td>
  226.    </tr>
  227.  
  228.   <%
  229.     for i = 1 to rule.CountWord
  230.         word = rule.GetWord(i)
  231.         link = "<a href=""siteedit.agp?rule=" & ruleName & "&site=" & word & " &ruletype=word"">" & word & "</a>"
  232.   %>
  233.    <tr>
  234.         <td width="50%"><font face="Arial">
  235.              
  236.             <%Response.Write(link)%>
  237.         </font></td>
  238.    </tr>
  239.   <%
  240.     next
  241.   %>
  242.    </table></div>
  243. <font face="Arial">
  244. <a href="siteedit.agp?rule=<%Response.Write(ruleName)%>&ruletype=word">Add new word</a>
  245.  
  246.  
  247. <! ---------------------------------- ->
  248. <p>
  249.    <hr width="60%" align="left">
  250.    <br>
  251.    <div>
  252.     <table border="1" cellpadding="0" cellspacing="0" width="60%">
  253.    <tr>
  254.         <td width="50%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  255.             Other restrictions
  256.         </font></strong></td>
  257.    </tr>
  258.    <tr>
  259.         <td width="50%"><font face="Arial">
  260.              
  261.             <a href="mimetypes.agp?rule=<%Response.Write(ruleName)%>">MIME Types</a>
  262.         </font></td>
  263.    </tr>
  264.    </table></div>
  265. </p>
  266.  
  267. <p>
  268. <hr width="60%" align="left">
  269.    <form method="POST" action= "/rules/rule.agp">
  270.     <input type="hidden" name="rule" value="<%Response.Write(ruleName)%>">
  271.     <font face="Arial">Press
  272.     <input type="submit" name="action" value="Remove">
  273.     in order to delete all of the rules for this user/group.</font>
  274. <%
  275.     else
  276.         sType = Request.ReqParam("type")
  277. %>
  278.     <p><big><strong><font face="Arial">Add rule</font></strong></big></p>
  279.  
  280.    <form method="POST" action= "/rules/rule.agp">
  281.     <div>
  282.     <table border="1" cellpadding="0" cellspacing="0" width="60%">
  283.    <tr>
  284.         <td width="50%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  285.             Option
  286.         </font></strong></td>
  287.         <td width="50%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  288.             Value
  289.         </font></strong></td>
  290.     </tr>
  291.     <tr>
  292.         <td width="50%"><strong><font face="Arial">
  293.             for <%Response.Write(sType)%>:
  294.         </font></strong></td>
  295.         <td width="50%">
  296.              
  297.             <select name="rule" size="1">
  298. <%
  299.             if sType = "group" Then
  300.                 Set tmpObj = Accounts.groups
  301.             Else
  302.                 Set tmpObj = Accounts.users
  303.             End if
  304.             for i = 1 to tmpObj.count
  305.                 Set tmpObj2 = tmpObj.item(i)
  306. %>
  307.                 <option value="<%Response.Write(tmpObj2.Name)%>"><%Response.Write(tmpObj2.Name)%></option>
  308. <%
  309.             next
  310. %>
  311.             </select>
  312.         </td>
  313.    </tr>
  314.    </table></div>
  315.    <br>
  316. <%
  317.     nr = tmpObj.count
  318.     if nr > 0 Then
  319. %>
  320.         <input type="submit" name="action" value="Commit">
  321. <%
  322.     Else
  323. %>
  324.     <font face="Arial">
  325. <%
  326.     Response.Write("There are no groups defined")
  327. %>
  328.     </font>
  329. <%
  330.     End if
  331. %>
  332.    </form>
  333. <%
  334.    end if
  335. %>
  336. <br>
  337. <br>
  338. <font size="1" face="Arial"><%Response.Write(GateKeeper.Version)%></font>
  339. <br>
  340. </body>
  341. </html>
  342.