home *** CD-ROM | disk | FTP | other *** search
- <%
- lArgs = "xx"
-
- On Error Resume Next
- nou = False
- ruleName = Request.ReqParam("rule")
- Set rule = Rules.item(ruleName)
- protName = Request.ReqParam("protocol")
-
- 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 )
- end if
- end if
- if action = "Remove" then
- rule.DelProtocol(protName)
- rule.Commit
- Response.Redirect( "/rules/rule.agp?rule=" & ruleName )
- end if
- end if
- %>
- <html>
- <head>
- <meta NAME="Author,Design" Content="GateKeeper Team; gatekeeper@infopulse.net">
- <meta NAME="Copyright" Content="Infopulse; www.infopulse.net">
- <title>Empty</title>
- </head>
-
- <body bgcolor="#FFFFFF" text="#000000">
- <%
- 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="#183159"><strong><font face="Arial" color="#FFFFFF">
- Option
- </font></strong></td>
- <td width="40%" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
- 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
- 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
- %>
- </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>
- <input type="hidden" name="nou" value="<%Response.Write(nou)%>"></td>
-
- <div align="center"><center>
- <table border="1" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
-  
- </font></strong></td>
- <%
- for i = 0 to 23
- %>
- <td bgcolor="#183159" align="center"><strong><font face="Arial" color="#FFFFFF">
- <%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="submit" name="action" value="Commit">
- <%
- 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>
-