home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 August / CHIP_08_2003.iso / Spesial / proxy / ProxPro / ProxyPro.exe / data1.cab / ConfigSite_Files / rules / EditUserAccess.agp < prev    next >
Encoding:
Text File  |  2002-12-09  |  10.1 KB  |  314 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. </head>
  43. <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">
  44.   <tr> 
  45.     <td width="344"><img src="images/1_r1_c2.jpg" width="344" height="70"></td>
  46.     <td width="135"><img src="images/1_r1_c3.jpg" width="135" height="70"></td>
  47.     <td width="100"><a href="hlpRules.agp"><img src="images/1_r1_c4.jpg" width="100" height="70"border=0></a></td>
  48.     <td width="1000"> </td>
  49.   </tr>
  50. </table>
  51. <map name="n1_r4_c3Map"> 
  52.   <area shape="rect" coords="492,45,567,76" href="#">
  53. </map>
  54.  
  55.  
  56. <%
  57.     UserName = Request.ReqParam("name")
  58.     if UserName = "" then
  59.         UserName = Request.ReqParam("UName")
  60.     End If
  61.     
  62.     command = Request.ReqParam("action")
  63.  
  64.     if command = "Apply" Then
  65.         TimeEr = False
  66.         dim nThread
  67.         if Request.ReqParam("nThread") = "UThread" Then
  68.             nThread = 0
  69.         Else  
  70.             nThread = Request.ReqParam("nrThread")
  71.         End If
  72.         
  73.         On Error Resume Next
  74.         Accounts.SetMaxThread UserName, nThread
  75.         If Not Err.Number = 0 Then 
  76.             ErrLine = Err.Description
  77.         End If
  78.     Else
  79.         nThread = Accounts.GetMaxThread (UserName)
  80.     End if
  81.  
  82.     if command = "Commit changes" Then
  83.         TimeEr = True
  84.         dim Day
  85.         dim DayType
  86.         dim Month
  87.         dim MonthType
  88.         If Request.ReqParam("LimitDay") = "UnlimitedDay" Then
  89.             Day = 0
  90.             DayType = 1
  91.         else 
  92.             If Request.ReqParam("DayType") = "Hours" Then
  93.                 Day = Request.ReqParam("DayTime")
  94.                 DayType = 1
  95.             Else
  96.                 Day = Request.ReqParam("DayTime")
  97.                 DayType = 0
  98.             End If
  99.         End If
  100.  
  101.  
  102.         If Request.ReqParam("LimitMonth") = "UnlimitedMonth" Then
  103.             Month = 0
  104.             MonthType = 1
  105.         Else
  106.             If Request.ReqParam("MonthType") = "Days" Then
  107.                 Month = Request.ReqParam("MonthTime")
  108.                 MonthType = 1
  109.             Else
  110.                 Month = Request.ReqParam("MonthTime")
  111.                 MonthType = 0
  112.             End If
  113.         End If
  114.         On Error Resume Next
  115.         Accounts.SetUserAccessLimits UserName, Day, DayType, Month, MonthType
  116.         If Not Err.Number = 0 Then 
  117.             ErrLine = Err.Description
  118.         End If
  119.     End If
  120.  
  121.  
  122.     if command = "Allow" Then 
  123.         Accounts.UserAccessType(UserName) = False
  124.         Path = "/Rules/EditUserAccess.agp?name="+UserName
  125.         Response.Redirect(Path)
  126.     end if
  127.  
  128.  
  129.     if command = "Deny" Then 
  130.         Accounts.UserAccessType(UserName) = True
  131.         Path = "/Rules/EditUserAccess.agp?name="+UserName
  132.         Response.Redirect(Path)
  133.     end if
  134. %>
  135.  
  136. <p><big><strong><font face="Arial">
  137.         Restrictions for user <%Response.Write(UserName)%>
  138. </font></strong></big></p>
  139. <%
  140.     If Not Len(ErrLine) = 0 And TimeEr Then
  141.         Response.Write("<B><FONT COLOR=""#FF0000"">" & ErrLine & "</FONT></B><br>")
  142.     End If
  143. %>
  144. <form method="POST" action= "EditUserAccess.agp">
  145.  
  146. <table border="1" cellpadding="0" cellspacing="0" width="90%">
  147.  
  148.     <tr>
  149.         <input type="hidden" name="UName" value="<%Response.Write(UserName)%>">
  150.         <td width="30%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  151.             Time Access Restrictions
  152.         </font></strong></td>
  153.         <td width="70%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  154.          
  155.         </font></strong></td>
  156.  
  157.     </tr>         
  158.     <tr>
  159.         <td width="30%" align="left"><font face="Arial"><strong>  Daily Access</strong></font></td>
  160. <%
  161. if Accounts.UserHasLimitedDayAccess(UserName) Then
  162. %>
  163.         
  164.         <td width="70%"><font face="Arial">
  165.              <input type="radio" name="LimitDay" value="UnlimitedDay">Unlimited<br>
  166.              <input type="radio" name="LimitDay" value="LimitedDay" checked>Limit to 
  167.              <input type="text" size="10" maxlength="5" name="DayTime" value="<%Response.Write(Accounts.GetDayRestriction (UserName))%>">
  168. <%
  169. if Accounts.UserTimeoutAccessType(UserName) Then
  170. %>             
  171.              <input type="radio" name="DayType" value="Hours" checked>hours
  172.              <input type="radio" name="DayType" value="Minutes">minutes
  173. <%
  174. else
  175. %>
  176.              <input type="radio" name="DayType" value="Hours">hours
  177.              <input type="radio" name="DayType" value="Minutes" checked>minutes
  178. <%
  179. end if
  180. %>
  181.         </td>
  182. <%
  183. else
  184. %>
  185.         <td width="70%"><font face="Arial">
  186.              <input type="radio" name="LimitDay" value="UnlimitedDay" checked>Unlimited<br>
  187.              <input type="radio" name="LimitDay" value="LimitedDay">Limit to  
  188.              <input type="text" size="10" maxlength="5" name="DayTime" value="0">
  189.              <input type="radio" name="DayType" value="Hours" checked>hours
  190.              <input type="radio" name="DayType" value="Minutes">minutes
  191.         </td>
  192. <%
  193. end if
  194. %>
  195.     </tr>
  196.     <tr>
  197.         <td width="30%" align="left"><font face="Arial"><strong>  Monthly Access</strong></font></td>
  198. <%if Accounts.UserHasLimitedMonthAccess(UserName) Then
  199. %>
  200.         <td width="70%"><font face="Arial">
  201.              <input type="radio" name="LimitMonth" value="UnlimitedMonth">Unlimited<br>
  202.              <input type="radio" name="LimitMonth" value="LimitedMonth" checked>Limit to  
  203.              <input type="text" size="10" maxlength="6" name="MonthTime" value="<%Response.Write(Accounts.GetMonthRestriction (UserName))%>">
  204. <%
  205. if Accounts.UserAccessTypePerMonth(UserName) Then
  206. %>             
  207.              <input type="radio" name="MonthType" value="Days" checked>days
  208.              <input type="radio" name="MonthType" value="Hours">hours
  209. <%
  210. else
  211. %>
  212.              <input type="radio" name="MonthType" value="Days">days
  213.              <input type="radio" name="MonthType" value="Hours" checked>hours
  214. <%
  215. end if
  216. %>
  217.         </td>
  218. <%else%>
  219.         <td width="70%"><font face="Arial">
  220.              <input type="radio" name="LimitMonth" value="UnlimitedMonth" checked>Unlimited<br>
  221.              <input type="radio" name="LimitMonth" value="LimitedMonth">Limit to  
  222.              <input type="text" size="10" maxlength="6" name="MonthTime" value="0">
  223.              <input type="radio" name="MonthType" value="Days" checked>days
  224.              <input type="radio" name="MonthType" value="Hours">hours
  225.         </td>
  226.  
  227. <%end if%>
  228.  
  229.     </tr>
  230.  
  231. </table>
  232. <br>
  233.     <input type="submit" name="action" value="Commit changes">
  234. </form>     
  235.  
  236. <br>
  237.  
  238. <%
  239.     If Not Len(ErrLine) = 0 And Not Time Then
  240.         Response.Write("<B><FONT COLOR=""#FF0000"">" & ErrLine & "</FONT></B><br>")
  241.     End If
  242. %>
  243. <div>
  244. <form method="POST" action= "EditUserAccess.agp">
  245.    <input type="hidden" name="UName" value="<%Response.Write(UserName)%>">
  246.    <table border="1" cellpadding="0" cellspacing="0" width="90%">
  247.    <tr>
  248.         <td width="100%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">Maximum running threads</font></strong></td>
  249.    </tr>
  250.    <tr>
  251.         <td width="80%"><font face="Arial">
  252.         <input type="radio" name="nThread" value="UThread" <%if nThread = 0 Then Response.Write("checked") end if%>>Unlimited running threads<br>
  253.         <input type="radio" name="nThread" value="LThread" <%if nThread > 0 Then Response.Write("checked") end if%>>Limited running threads to  
  254.         <input type="text" size="10" maxlength="6" name="nrThread" value=<%Response.Write(nThread)%>>
  255.         </td>
  256.    </tr>
  257.    </table><br>
  258.    <input type=submit name="action" value="Apply"><br>
  259. </form></div>
  260.  
  261. <br>
  262.    <div>
  263.     <table border="1" cellpadding="0" cellspacing="0" width="90%">
  264.    <tr>
  265.         <%
  266.             if Accounts.UserAccessType(UserName) then
  267.                 msg = "DENY access from all IP addresses, except these"
  268.             else
  269.                 msg = "ALLOW access from all IP addresses, except these"
  270.             end if
  271.         %>
  272.  
  273.         <td width="80%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  274.             IP Restrictions <br><%Response.Write(msg)%>
  275.         </font></strong></td>
  276.         <td align="center" width="20%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  277.             Action
  278.         </font></strong></td>
  279.    </tr>
  280.     <%Response.Write(Accounts.UserFilterList(UserName))%>
  281.    </table></div>
  282. <br>
  283. <table border="0" cellpadding="0" cellspacing="1" width="90%">
  284.   <tr valign=top>
  285.     <td width="100%" valign=top align=left>
  286. <a
  287.     href="EditUserFilter.agp?name=<%Response.Write(UserName)%>&NewFilter=1" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('add_ip_addrs_filt01.gif','','../images/add_ip_addrs_filt01.gif',1)" >
  288.     <img src="../images/add_ip_addrs_filt.gif" name='add_ip_addrs_filt01.gif' alt="Create new IP address filter" border=0></a>
  289.     </td>  
  290.     </tr>
  291. </table>
  292. <br>
  293. <form method="POST" action= "EditUserAccess.agp">
  294.     <font face="Arial">
  295.         <input type="hidden" name="UName" value="<%Response.Write(UserName)%>">
  296.     Press this button in order to 
  297.     <%
  298.         if Accounts.UserAccessType(UserName) then
  299.     %>
  300.             <input type="submit" name="action" value="Allow">
  301.     <%
  302.         else
  303.     %>
  304.             <input type="submit" name="action" value="Deny">
  305.     <%
  306.         end if
  307.     %>
  308.     access from all IP adresses except those listed above.</font>
  309. </form>
  310.  
  311. <font size="1" face="Arial"><%Response.Write(GateKeeper.Version)%></font>
  312. </body>
  313. </html>
  314.