home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 August / CHIP_08_2003.iso / Spesial / proxy / ProxPro / ProxyPro.exe / data1.cab / ConfigSite_Files / rules / EditOnlineAccess.agp < prev    next >
Encoding:
Text File  |  2002-12-09  |  6.8 KB  |  213 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.     ruleName = Request.ReqParam("rule")
  14.     UserName = ruleName
  15.  
  16.  
  17.     Set OnlineRule = Rules.item(ruleName)
  18. %>
  19. <script language="JavaScript">
  20.     <!--
  21.     function MM_preloadImages() { //v3.0
  22.       var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  23.         var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  24.         if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  25.     }
  26.  
  27.     function MM_swapImgRestore() { //v3.0
  28.       var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  29.     }
  30.  
  31.     function MM_findObj(n, d) { //v4.0
  32.       var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  33.         d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  34.       if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  35.       for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  36.       if(!x && document.getElementById) x=document.getElementById(n); return x;
  37.     }
  38.  
  39.     function MM_swapImage() { //v3.0
  40.       var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  41.        if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  42.     }
  43.     //-->
  44. </script>
  45. <html>
  46. <head>
  47.     <title>Professional GateKeeper - Infopulse</title>
  48.     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
  49. <title>MediaFamily - Welcome</title>
  50. </head>
  51. <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">
  52.   <tr> 
  53.     <td width="344"><img src="images/1_r1_c2.jpg" width="344" height="70"></td>
  54.     <td width="135"><img src="images/1_r1_c3.jpg" width="135" height="70"></td>
  55.     <td width="100"><a href="hlpRules.agp"><img src="images/1_r1_c4.jpg" width="100" height="70"border=0></a></td>
  56.     <td width="1000"> </td>
  57.   </tr>
  58. </table>
  59. <map name="n1_r4_c3Map"> 
  60.   <area shape="rect" coords="492,45,567,76" href="#">
  61. </map>
  62.  
  63. <%
  64.     UserName = Request.ReqParam("rule")
  65.     if UserName = "" then
  66.         UserName = Request.ReqParam("UName")
  67.     End If
  68.     
  69.     command = Request.ReqParam("action")
  70.  
  71.     if command = "Commit changes" Then
  72.         TimeEr = True
  73.         dim Day
  74.         dim DayType
  75.         dim Month
  76.         dim MonthType
  77.         If Request.ReqParam("LimitDay") = "UnlimitedDay" Then
  78.             Day = 0
  79.             DayType = 1
  80.         else 
  81.             If Request.ReqParam("DayType") = "Hours" Then
  82.                 Day = Request.ReqParam("DayTime")
  83.                 DayType = 1
  84.             Else
  85.                 Day = Request.ReqParam("DayTime")
  86.                 DayType = 0
  87.             End If
  88.         End If
  89.  
  90.  
  91.         If Request.ReqParam("LimitMonth") = "UnlimitedMonth" Then
  92.             Month = 0
  93.             MonthType = 1
  94.         Else
  95.             If Request.ReqParam("MonthType") = "Days" Then
  96.                 Month = Request.ReqParam("MonthTime")
  97.                 MonthType = 1
  98.             Else
  99.                 Month = Request.ReqParam("MonthTime")
  100.                 MonthType = 0
  101.             End If
  102.         End If
  103.         On Error Resume Next
  104.         'Accounts.SetUserAccessLimits UserName, Day, DayType, Month, MonthType
  105.         OnlineRule.SetOnlineTimeRestriction Day, DayType, Month, MonthType
  106.         OnlineRule.Commit
  107.         If Not Err.Number = 0 Then 
  108.             ErrLine = Err.Description
  109.         End If
  110.     End If
  111.  
  112.  
  113.     If Not Len(ErrLine) = 0 And TimeEr Then
  114.         Response.Write("<B><FONT COLOR=""#FF0000"">" & ErrLine & "</FONT></B><br>")
  115.     End If
  116. %>
  117. <form method="POST" action= "EditOnlineAccess.agp?rule=<%Response.Write(UserName)%>">
  118.  
  119. <table border="1" cellpadding="0" cellspacing="0" width="90%">
  120.  
  121.     <tr>
  122.         <input type="hidden" name="UName" value="<%Response.Write(UserName)%>">
  123.         <td colspan=2 width="30%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  124.             Onlime Time Access Restrictions for <%Response.Write(UserName)%>
  125.         </font></strong></td>
  126.         <td></td>
  127.     </tr>         
  128.     <tr>
  129.         <td width="30%" align="left"><font face="Arial"><strong>  Daily Access</strong></font></td>
  130. <%
  131. if OnlineRule.HasLimitedDayAccess Then
  132. %>
  133.         
  134.         <td width="70%"><font face="Arial">
  135.              <input type="radio" name="LimitDay" value="UnlimitedDay">Unlimited<br>
  136.              <input type="radio" name="LimitDay" value="LimitedDay" checked>Limit to 
  137.              <input type="text" size="10" maxlength="5" name="DayTime" value="<%Response.Write(OnlineRule.GetDailyLimit)%>">
  138. <%
  139. if OnlineRule.DailyAccessIsHourly Then
  140. %>             
  141.              <input type="radio" name="DayType" value="Hours" checked>hours
  142.              <input type="radio" name="DayType" value="Minutes">minutes
  143. <%
  144. else
  145. %>
  146.              <input type="radio" name="DayType" value="Hours">hours
  147.              <input type="radio" name="DayType" value="Minutes" checked>minutes
  148. <%
  149. end if
  150. %>
  151.         </td>
  152. <%
  153. else
  154. %>
  155.         <td width="70%"><font face="Arial">
  156.              <input type="radio" name="LimitDay" value="UnlimitedDay" checked>Unlimited<br>
  157.              <input type="radio" name="LimitDay" value="LimitedDay">Limit to  
  158.              <input type="text" size="10" maxlength="5" name="DayTime" value="0">
  159.              <input type="radio" name="DayType" value="Hours" checked>hours
  160.              <input type="radio" name="DayType" value="Minutes">minutes
  161.         </td>
  162. <%
  163. end if
  164. %>
  165.     </tr>
  166.     <tr>
  167.         <td width="30%" align="left"><font face="Arial"><strong>  Monthly Access</strong></font></td>
  168. <%if OnlineRule.HasLimitedMonthAccess Then
  169. %>
  170.         <td width="70%"><font face="Arial">
  171.              <input type="radio" name="LimitMonth" value="UnlimitedMonth">Unlimited<br>
  172.              <input type="radio" name="LimitMonth" value="LimitedMonth" checked>Limit to  
  173.              <input type="text" size="10" maxlength="6" name="MonthTime" value="<%Response.Write(OnlineRule.GetMonthlyLimit)%>">
  174. <%
  175. if OnlineRule.MonthlyAccessIsDaily Then
  176. %>             
  177.              <input type="radio" name="MonthType" value="Days" checked>days
  178.              <input type="radio" name="MonthType" value="Hours">hours
  179. <%
  180. else
  181. %>
  182.              <input type="radio" name="MonthType" value="Days">days
  183.              <input type="radio" name="MonthType" value="Hours" checked>hours
  184. <%
  185. end if
  186. %>
  187.         </td>
  188. <%else%>
  189.         <td width="70%"><font face="Arial">
  190.              <input type="radio" name="LimitMonth" value="UnlimitedMonth" checked>Unlimited<br>
  191.              <input type="radio" name="LimitMonth" value="LimitedMonth">Limit to  
  192.              <input type="text" size="10" maxlength="6" name="MonthTime" value="0">
  193.              <input type="radio" name="MonthType" value="Days" checked>days
  194.              <input type="radio" name="MonthType" value="Hours">hours
  195.         </td>
  196.  
  197. <%end if%>
  198.  
  199.     </tr>
  200.  
  201. </table>
  202. <br>
  203.     <input type="submit" name="action" value="Commit changes">
  204. </form>     
  205.  
  206. <br>
  207.  
  208. <div>
  209.  
  210. <font size="1" face="Arial"><%Response.Write(GateKeeper.Version)%></font>
  211. </body>
  212. </html>
  213.