home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 August / CHIP_08_2003.iso / Spesial / proxy / ProxPro / ProxyPro.exe / data1.cab / ConfigSite_Files / policies / policyedit.agp < prev   
Encoding:
Text File  |  2002-12-09  |  6.2 KB  |  222 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. <html>
  40. <head>
  41. <title>Professional GateKeeper - Infopulse</title>
  42. <!--              -->
  43. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
  44. <title>MediaFamily - Welcome</title>
  45.  
  46. </head>
  47. <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">
  48.   <tr> 
  49.     <td width="344"><img src="images/1_r1_c2.jpg" width="344" height="70"></td>
  50.     <td width="135"><img src="images/1_r1_c3.jpg" width="135" height="70"></td>
  51.     <td width="100"><a href="hlpPolicies.agp"><img src="images/1_r1_c4.jpg" width="100" height="70"border=0></a></td>
  52.     <td width="1000"> </td>
  53.   </tr>
  54. </table>
  55. <map name="n1_r4_c3Map"> 
  56.   <area shape="rect" coords="492,45,567,76" href="#">
  57. </map>
  58.  
  59. <%
  60.     If Request.ReqParam("action") = "Cancel" Then
  61.         Response.Redirect("policies.agp")
  62.     End If
  63.     If Request.ReqParam("name") = "" Then
  64.         Set userPol = Policies.NewPolicy
  65.         NewPolicy = TRUE
  66.     Else
  67.         If Request.ReqParam("newpolicy") = "True" Then
  68.             Set userPol = Policies.NewPolicy
  69.             userPol.Name = Request.ReqParam("name")
  70.             NewPolicy = TRUE
  71.         Else
  72.             Set userPol = Policies.item(Request.ReqParam("name"))
  73.             NewPolicy = FALSE
  74.         End If
  75.     End If
  76.  
  77.     If Request.ReqParam("action") = "Remove" AND Not NewPolicy = TRUE Then
  78.         On Error Resume Next
  79.         userPol.Remove
  80.         If Not Err.Number = 0 Then 
  81.             ErrLine = Err.Description
  82.         Else
  83.             Response.Redirect("policies.agp")
  84.         End If
  85.     ElseIf Request.ReqParam("action") = "Commit" Then
  86.         ' Process the user policy
  87.         userPol.Right = Request.ReqParam("right")
  88.  
  89.         On Error Resume Next
  90.         userPol.Commit
  91.         If Not Err.Number = 0 Then 
  92.             ErrLine = Err.Description
  93.         Else
  94.             Response.Redirect("policies.agp")
  95.         End If
  96.     End If
  97.  
  98.     sType = Request.ReqParam("type")
  99.     
  100.     If Not NewPolicy Then
  101.         If sType = "User" then
  102. %>
  103.         <p><big><strong><font face="Arial">
  104.             Edit user policy
  105.         </font></strong></big></p>
  106. <%
  107.         Else
  108. %>
  109.         <p><big><strong><font face="Arial">
  110.             Edit group policy
  111.         </font></strong></big></p>
  112. <%
  113.         End If
  114.     Else
  115.         If sType = "User" then
  116. %>
  117.         <p><big><strong><font face="Arial">
  118.             Add a new user policy
  119.         </font></strong></big></p>
  120. <%
  121.         Else
  122. %>
  123.         <p><big><strong><font face="Arial">
  124.             Add a new group policy
  125.         </font></strong></big></p>
  126. <%
  127.         End If
  128.     End If
  129.  
  130.     If Not Len(ErrLine) = 0 Then
  131.         Response.Write("<B><FONT COLOR=""#FF0000"">" & ErrLine & "</FONT></B><br>")
  132.     End If
  133. %>
  134.  
  135. <form method="POST" action= "/policies/policyedit.agp">
  136.     <input type="hidden" name="newpolicy" value="<%Response.Write(NewPolicy)%>">
  137.     
  138.     <div>
  139.     <table border="1" cellpadding="0" cellspacing="0" width="60%">
  140.         <tr>
  141.             <td width="50%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  142.                 Option
  143.             </font></strong></td>
  144.             <td width="50%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  145.                 Value
  146.             </font></strong></td>
  147.         </tr>
  148.         <tr>
  149.             <td width="50%"><strong><font face="Arial">
  150.                 Name
  151.             </strong></font></td>
  152.             <td width="50%"><font face="Arial">
  153. <%
  154.     If NewPolicy Then
  155. %>
  156.                 <select name="name" size="1">
  157. <%
  158.                 If sType = "User" Then
  159.                     Set users = Accounts.users
  160.                     for i = 1 to users.count
  161.                         Set user = users.item(i)
  162. %>
  163.                         <option value="<%Response.Write(user.Name)%>"><%Response.Write(user.Name)%></option>
  164. <%
  165.                     next
  166.                 Else
  167.                     Set groups = Accounts.Groups
  168.                     for i = 1 to groups.count
  169.                         Set group = groups.item(i)
  170. %>
  171.                         <option value="<%Response.Write(group.Name)%>"><%Response.Write(group.Name)%></option>
  172. <%
  173.                         next
  174.                 End if
  175. %>
  176.                 </select>
  177. <%
  178.    Else
  179. %>
  180.     <input type="hidden" name="name" value="<%Response.Write(userPol.Name)%>">
  181.     <%Response.Write(userPol.Name)%>
  182. <%
  183.     End If
  184. %>
  185.             </font></td>
  186.         </tr>
  187. <%
  188.     Sub sel( right )
  189.         if(userPol.Right=right) Then Response.Write("selected")
  190.     End Sub
  191. %>
  192.  
  193.         <tr>
  194.             <td width="50%"><strong><font face="Arial">
  195.                 Right
  196.             </strong></font></td>
  197.             <td width="50%">
  198.                 <select name="right" size="1">
  199.                     <option value="Full Access" <% sel "Full Access" %> >Full Access</option>
  200.                     <option value="Read Access" <% sel "Read Access" %> >Read Access</option>
  201.                     <option value="No Access" <% sel "No Access" %> >No Access</option>
  202.                 </select>
  203.             </td>
  204.         </tr>
  205.     </table>
  206.     </div>
  207. <br>
  208.  
  209.     <input type="submit" name="action" value="Commit">
  210.     <input type="submit" name="action" value="Cancel">
  211. <% 
  212.     If Not NewPolicy = TRUE Then 
  213. %>
  214.     <input type="submit" name="action" value="Remove">
  215. <%
  216.    End If
  217. %>
  218. </form>
  219. <font size="1" face="Arial"><%Response.Write(GateKeeper.Version)%></font>
  220. </body>
  221. </html>
  222.