home *** CD-ROM | disk | FTP | other *** search
- <%
- dim szPath
- szPath = "Table"
- SkinTable = SysInfo.GetSkinParameter(szPath)
- szPath = "Font"
- SkinFont = SysInfo.GetSkinParameter(szPath)
-
- On Error Resume Next
- nou = False
- ruleName = Request.ReqParam("rule")
- Set rule = Rules.item(ruleName)
- protName = Request.ReqParam("protocol")
-
- if Request.ReqParam("action") = "Cancel" Then
- Response.Redirect( "/rules/rule.agp?rule="+ ruleName)
- end if
-
- if protName = "" then
- nou = True
- else
- action = Request.ReqParam("action")
- if action = "Commit" then
- nou = Request.ReqParam("nou")
- if nou then
- rule.AddProtocol(protName)
- rule.Commit
- Response.Redirect( "/rules/protocoledit.agp?rule=" & ruleName & "&protocol=" & protName )
- end if
- chkBoxes = Request.ReqParam("cb")
- for i = 1 to 7
- for j = 0 to 23
- rule.SetPermission protName, i, j, True
- next
- next
- if( chkBoxes <> "" ) then
- while ( chkBoxes <> "" )
- aBox = Mid(chkBoxes,1,3)
- chkBoxes = Mid(chkBoxes,5)
- sI = Mid(aBox,1,1)
- sJ = Mid(aBox,2,2)
- rule.SetPermission protName, sI, sJ, False
- wend
- rule.Commit
- Response.Redirect( "/rules/rule.agp?rule=" & ruleName )
- else
- if Not nou then
- action = "Remove"
- end if
- end if
- end if
- if action = "Remove" then
- rule.DelProtocol(protName)
- rule.Commit
- Response.Redirect( "/rules/rule.agp?rule=" & ruleName )
- end if
- end if
- %>
- <script language="JavaScript">
- <!--
- function MM_preloadImages() { //v3.0
- var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
- var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
- if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
- }
-
- function MM_swapImgRestore() { //v3.0
- var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
- }
-
- function MM_findObj(n, d) { //v4.0
- var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
- d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
- if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
- for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
- if(!x && document.getElementById) x=document.getElementById(n); return x;
- }
-
- function MM_swapImage() { //v3.0
- var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
- if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
- }
- //-->
- </script>
- <html>
- <head>
- <title>Professional GateKeeper - Infopulse</title>
- <!-- -->
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
- <title>MediaFamily - Welcome</title>
-
- </head>
- <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">
- <tr>
- <td width="344"><img src="images/1_r1_c2.jpg" width="344" height="70"></td>
- <td width="135"><img src="images/1_r1_c3.jpg" width="135" height="70"></td>
- <td width="100"><a href="hlpRules.agp"><img src="images/1_r1_c4.jpg" width="100" height="70"border=0></a></td>
- <td width="1000"> </td>
- </tr>
- </table>
- <map name="n1_r4_c3Map">
- <area shape="rect" coords="492,45,567,76" href="#">
- </map>
- <%
- if nou then
- %>
- <p><big><strong><font face="Arial">Select the protocol you want to add the rule for</font></strong></big></p>
- <%
- else
- %>
- <p><big><strong><font face="Arial">Edit <%Response.Write(protName)%> protocol time schedule for <%Response.Write(ruleName)%></font></strong></big></p>
- <font face="Arial">
- <strong>Note:</strong>0 means hour 0.00.00 - 0.59.59, checked means DENIED
- </font>
- <%
- end if
- if Not Err.Number = 0 Then
- Response.Write("<B><FONT COLOR=""#FF0000"">" & Err.Description & ": " & ruleName & "</FONT></B><br>")
- end if
- %>
-
- <form method="POST" action= "/rules/protocoledit.agp?rule=<%Response.Write(ruleName)%>">
-
- <%
- if nou then
- %>
-
- <div>
- <table border="1" cellpadding="0" cellspacing="0" width="60%">
- <tr>
- <td width="20%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
- Option
- </font></strong></td>
- <td width="40%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
- Value
- </font></strong></td>
- <tr>
- <tr>
- <td width="50%"><strong><font face="Arial">
- Protocol
- </font></strong></td>
- <td width="50%">
- <select name="protocol" size="1">
- <%
- Set proxy = Proxies.NewProxy
- proxy.GetFirstDLL sFile, sType, sVersion, sName
-
- if sFile <> "" then
- Response.Write("<option value=All>All Protocols</option>")
- bExist = True
- else
- bExist = False
- end if
-
- Response.Write("<option value=""" & sType & """>" & sType & "</option>")
-
- proxy.GetNextDLL sFile, sType, sVersion, sName
- while Len(sFile)
- Response.Write("<option value=""" & sType & """>" & sType & "</option>")
- proxy.GetNextDLL sFile, sType, sVersion, sName
- wend
-
- if bExist then
- Response.Write("<option value=Schedule>Schedule</option>")
- end if
- %>
- </select>
- </td>
- </tr>
- </table></div>
- <%
- else
- ' procedure for checking rights
- Sub IsChecked( nume, zi, ora )
- if(rule.GetPermission( nume, zi, ora ) = False ) then
- Response.Write(" checked")
- end if
- end sub
- %>
-
- <input type="hidden" name="protocol" value="<%Response.Write(protName)%>"></td>
-
- <div align="center"><center>
- <table border="1" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
-  
- </font></strong></td>
- <%
- for i = 0 to 23
- %>
- <td bgcolor="<%Response.Write(SkinTable)%>" align="center"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
- <%Response.Write(i)%>
- </font></strong></td>
- <%
- next
- %>
- </tr>
- <%
- Sub WriteDay( nr )
- Select case nr
- Case 1
- Response.Write("Sunday")
- Case 2
- Response.Write("Monday")
- Case 3
- Response.Write("Tuesday")
- Case 4
- Response.Write("Wednesday")
- Case 5
- Response.Write("Thursday")
- Case 6
- Response.Write("Friday")
- Case 7
- Response.Write("Saturday")
- End Select
- End Sub
- %>
- <%
- for i = 1 to 7
- %>
- <tr>
- <td><strong><font face="Arial">
- <%WriteDay(i)%>
- </font></strong></td>
- <%
- for j = 0 to 23
- %>
- <td width="50">
- <input type="checkbox" name="cb" value="<%Response.Write(i*100+j)%>" <% IsChecked protName,i,j %>>
- </td>
- <%
- next
- %>
- </tr>
- <%
- next
- %>
- </table></center></div>
- <%
- end if
- %>
- <br>
- <input type="hidden" name="nou" value="<%Response.Write(nou)%>"></td>
- <input type="submit" name="action" value="Commit">
- <input type="submit" name="action" value="Cancel">
-
- <%
- if Not nou then
- %>
- <input type="submit" name="action" value="Remove">
- <%
- end if
- %>
- </form>
- <font size="1" face="Arial"><%Response.Write(GateKeeper.Version)%></font>
- </body>
- </html>
-