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

  1. <%
  2.    dim szPath
  3.    szPath = "Table"
  4.    SkinTable = SysInfo.GetSkinParameter(szPath)
  5.    szPath = "Font"
  6.    SkinFont = SysInfo.GetSkinParameter(szPath)
  7.     
  8.  
  9.    ruleName = Request.ReqParam("rule")
  10.    Set rule = Rules.item(ruleName)
  11.    
  12.    if Request.ReqParam("action") = "Cancel" Then
  13.         Response.Redirect( "/rules/rule.agp?rule="+ ruleName)
  14.    end if
  15.  
  16.     action = Request.ReqParam("action")
  17.     if action = "Commit" then
  18.         chkBoxes = Request.ReqParam("cb")
  19.         for i = 1 to 7
  20.             for j = 0 to 23
  21.                 rule.SetRuleTimeRestriction i, j, True
  22.             next
  23.         next
  24.         if( chkBoxes <> ""  ) then
  25.             while ( chkBoxes <> "" )
  26.                 aBox = Mid(chkBoxes,1,3)
  27.                 chkBoxes = Mid(chkBoxes,5)
  28.                 sI = Mid(aBox,1,1)
  29.                 sJ = Mid(aBox,2,2)
  30.                 rule.SetRuleTimeRestriction sI, sJ, False
  31.             wend
  32.             rule.Commit
  33.             Response.Redirect( "/rules/rule.agp?rule=" & ruleName )
  34.         end if
  35.     end if
  36.  
  37. %>
  38. <script language="JavaScript">
  39. <!--
  40. function MM_preloadImages() { //v3.0
  41.   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  42.     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  43.     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  44. }
  45.  
  46. function MM_swapImgRestore() { //v3.0
  47.   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  48. }
  49.  
  50. function MM_findObj(n, d) { //v4.0
  51.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  52.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  53.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  54.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  55.   if(!x && document.getElementById) x=document.getElementById(n); return x;
  56. }
  57.  
  58. function MM_swapImage() { //v3.0
  59.   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  60.    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  61. }
  62. //-->
  63. </script>
  64. <html>
  65. <head>
  66. <title>Professional GateKeeper - Infopulse</title>
  67.  
  68. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
  69.  
  70.  
  71. </head>
  72. <body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" background="../images/backgr_x.gif">
  73.     <table width="100%" border="0" cellspacing="0" cellpadding="0">
  74.         <tr> 
  75.             <td width="344"><img src="images/1_r1_c2.jpg" width="344" height="70"></td>
  76.             <td width="135"><img src="images/1_r1_c3.jpg" width="135" height="70"></td>
  77.             <td width="100"><a href="hlpRules.agp"><img src="images/1_r1_c4.jpg" width="100" height="70"border=0></a></td>
  78.             <td width="1000"> </td>
  79.         </tr>
  80.     </table>
  81.     <map name="n1_r4_c3Map"> 
  82.       <area shape="rect" coords="492,45,567,76" href="#">
  83.     </map>
  84.  
  85.     <p><big><strong><font face="Arial">Edit time schedule for when the site rules for <%Response.Write(ruleName)%> should be applied</font></strong></big></p>
  86.     <font face="Arial">
  87.         <strong>Note:</strong>0 means hour 0.00.00 - 0.59.59, checked means that the rule will NOT APPLY
  88.     </font>
  89. <%
  90.    if Not Err.Number = 0 Then
  91.     Response.Write("<B><FONT COLOR=""#FF0000"">" & Err.Description & ": " & ruleName & "</FONT></B><br>")
  92.    end if
  93. %>
  94.  
  95. <form name="RuleHours" id="RuleHours" method="POST" action= "/rules/advancedrule.agp?rule=<%Response.Write(ruleName)%>">
  96.  
  97. <%
  98. ' procedure for checking rights
  99. Sub IsChecked( zi, ora )
  100.     if(rule.GetRuleTimeRestriction( zi, ora )=1) then
  101.         Response.Write(" checked")
  102.     end if
  103. end sub
  104. %>
  105.     <div align="center"><center>
  106.     <table border="1" cellpadding="0" cellspacing="0" width="100%">
  107.         <tr>
  108.             <td bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  109.                  
  110.             </font></strong></td>
  111.             <%
  112.                 for i = 0 to 23
  113.             %>
  114.             <td bgcolor="<%Response.Write(SkinTable)%>" align="center"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  115.                 <%Response.Write(i)%>
  116.             </font></strong></td>
  117.             <%
  118.                 next
  119.             %>
  120.            </tr>
  121. <%
  122.     Sub WriteDay( nr )
  123.         Select case nr
  124.             Case 1
  125.                 Response.Write("Sunday")
  126.             Case 2
  127.                 Response.Write("Monday")
  128.             Case 3
  129.                 Response.Write("Tuesday")
  130.             Case 4
  131.                 Response.Write("Wednesday")
  132.             Case 5
  133.                 Response.Write("Thursday")
  134.             Case 6
  135.                 Response.Write("Friday")
  136.             Case 7
  137.                 Response.Write("Saturday")
  138.         End Select
  139.     End Sub
  140. %>
  141.         <%
  142.             for i = 1 to 7
  143.         %> 
  144.             <tr>
  145.                 <td><strong><font face="Arial">
  146.                     <%WriteDay(i)%>
  147.                 </font></strong></td>
  148.                 <%
  149.                     for j = 0 to 23
  150.                 %>
  151.                 <td width="50">
  152.                     <input type="checkbox" name="cb" value="<%Response.Write(i*100+j)%>" <% IsChecked i,j %>>
  153.                 </td>
  154.                 <%
  155.                     next
  156.                 %>
  157.                </tr>
  158.         <%
  159.            next
  160.         %>
  161.     </table></center></div>
  162. <br>
  163.     <input type="submit" name="action" value="Commit">
  164.     <input type="submit" name="action" value="Cancel">
  165.  
  166. </form>
  167. <font size="1" face="Arial"><%Response.Write(GateKeeper.Version)%></font>
  168. </body>
  169. </html>
  170.