home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 August / CHIP_08_2003.iso / Spesial / proxy / ProxPro / ProxyPro.exe / data1.cab / ConfigSite_Files / services / editcache.agp < prev    next >
Encoding:
Text File  |  2002-12-09  |  6.4 KB  |  239 lines

  1. <%
  2.     dim szPath
  3.     szPath = "Table"
  4.     SkinTable = SysInfo.GetSkinParameter(szPath)
  5.     szPath = "Font"
  6.     SkinFont = SysInfo.GetSkinParameter(szPath)
  7.     szPath = "Link"
  8.     SkinLink = SysInfo.GetSkinParameter(szPath)
  9.     szPath = "VLink"
  10.     SkinVLink= SysInfo.GetSkinParameter(szPath)
  11. %>
  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="hlpServices.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.     
  61.     if Request.ReqParam("action") = "Empty cache" Then 
  62.         Cache.ClearCache()
  63.     End If
  64.  
  65.     if Request.ReqParam("action") = "Commit" Then
  66.         ' Process the Cache settings
  67.         if Request.ReqParam("Size") <> "" then
  68.             Cache.Size = Request.ReqParam("Size")
  69.         else
  70.             Cache.Size = 5
  71.         end if
  72.  
  73.  
  74.     if Request.ReqParam("LeaseDuration") = "Never" Then
  75.             Cache.TimeToLive =24*365
  76.     End If
  77.  
  78.     if Request.ReqParam("LeaseDuration") = "Every time" Then
  79.             Cache.TimeToLive =0
  80.     End If
  81.  
  82.     if Request.ReqParam("LeaseDuration") = "After" Then
  83.         
  84.         if Request.ReqParam("TTL") <> "" then
  85.             Cache.TimeToLive = Request.ReqParam("TTL")
  86.         else
  87.             Cache.TimeToLive = 6
  88.         end if
  89.  
  90.     End If
  91.     
  92.  
  93.         
  94.  
  95.         On Error Resume Next
  96.         Cache.Commit
  97.         If Not Err.Number = 0 Then 
  98.             ErrLine = Err.Description
  99.         else
  100.             Response.Redirect("hlpServices.agp")
  101.         End If
  102.     End If
  103. %>
  104.     <p><big><strong><font face="Arial">Edit the Cache service</font></strong></big></p>
  105. <%
  106.     If Not Len(ErrLine) = 0 Then
  107.         Response.Write("<B><FONT COLOR=""#FF0000"">" & ErrLine & "</FONT></B><br>")
  108.     End If
  109. %>
  110.  
  111. <form method="POST" action= "/services/editcache.agp">
  112.     <table border="1" cellpadding="0" cellspacing="0" width="90%">
  113.     <tr>
  114.         <td width="40%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  115.             Option
  116.         </font></strong></td>
  117.         <td width="60%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  118.             Value
  119.         </font></strong></td>
  120.     </tr>    
  121.     <tr>
  122.         <td width="40%"><strong><font face="Arial">
  123.             Cache size (in MB)
  124.         </font></strong></td>
  125.         <td width="60%">
  126.             <input type="text" size="10" maxlength="4" name="Size" value="<%Response.Write(Cache.Size)%>">
  127.         </td>        
  128.     </tr>
  129.     <tr>
  130.         <td width="40%"><strong><font face="Arial">
  131.             Current cache size (in MB)
  132.         </font></strong></td>
  133.         <td width="60%"><font face="Arial">
  134.             <%Response.Write(Cache.CurrentExactSize)%>
  135.             (<%Response.Write(Cache.CurentByteSize)%>    bytes)
  136.         </font></td>
  137.     </tr>
  138.     <tr>
  139.         <td width="40%"><strong><font face="Arial">
  140.             Cache directory
  141.         </font></strong></td>
  142.         <td width="60%"><font face="Arial">
  143.             <%Response.Write(Cache.CacheDirectory)%>
  144.         </font></td>        
  145.     </tr>
  146.     </table>
  147.  
  148.     <p><big><strong><font face="Arial">Compare with original resource</font></strong></big></p>
  149.  
  150.     <table border="1" cellpadding="0" cellspacing="0" width="90%">
  151.     <tr>
  152.         <td width="10%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  153.             Selection
  154.         </font></strong></td>
  155.         <td width="90%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  156.             Meaning
  157.         </font></strong></td>
  158.     </tr>    
  159.         <tr>
  160.         <td width="10%">        
  161.         <center>
  162.         <%
  163.             if Cache.TimeToLive <> 0 and  Cache.TimeToLive <> 8760  Then
  164.         %>
  165.             <input type="radio" size="55" name="LeaseDuration" Value="After" CHECKED>
  166.         <%
  167.             Else
  168.         %>
  169.             <input type="radio" size="55" name="LeaseDuration" Value="After" UNCHECKED>
  170.         <%
  171.             End If
  172.         %>
  173.         </center>
  174.         </td>        
  175.  
  176.         <td width="90%">
  177.          After
  178.          <input type="text" size="10" maxlength="4" name="TTL" value="<%Response.Write(Cache.TimeToLive)%>">
  179.          hours
  180.         </td>
  181.  
  182.  
  183.     <tr>
  184.         <td width="10%">
  185.         <center>
  186.         <%
  187.             if Cache.TimeToLive = 0 Then
  188.         %>
  189.                 <input type="radio" size="55" name="LeaseDuration" Value="Every time" CHECKED>
  190.         <%
  191.             Else
  192.         %>
  193.                 <input type="radio" size="55" name="LeaseDuration" Value="Every time" UNCHECKED>
  194.         <%
  195.             End If
  196.         %>
  197.  
  198.         </center>
  199.         </td>        
  200.         <td width="90%">Every time</td>
  201.     </tr>
  202.  
  203.     <tr>
  204.         <td width="10%">
  205.         <center>
  206.         <%
  207.             if Cache.TimeToLive = 8760 Then
  208.         %>
  209.             <input type="radio" size="55" name="LeaseDuration" Value="Never" CHECKED>
  210.         <%
  211.             Else
  212.         %>
  213.                 <input type="radio" size="55" name="LeaseDuration" Value="Never" UNCHECKED>
  214.         <%
  215.             End If
  216.         %>
  217.  
  218.  
  219.         </center>
  220.         </td>        
  221.         <td width="90%">Never</td>
  222.     </tr>
  223.  
  224.     </tr>
  225.  
  226.  
  227.     </table>
  228.  
  229. <br>
  230.     <input type="submit" name="action" value="Commit">
  231.     <input type="submit" name="action" value="Empty cache">
  232. </form>
  233.  
  234. <font size="1" face="Arial"><%Response.Write(GateKeeper.Version)%></font>
  235.  
  236. </body>
  237. </html>
  238.  
  239.