home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 August / CHIP_08_2003.iso / Spesial / proxy / ProxPro / ProxyPro.exe / data1.cab / ConfigSite_Files / logging / showlog.agp < prev   
Encoding:
Text File  |  2002-12-09  |  14.3 KB  |  441 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="hlpLogging.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.     file = Request.ReqParam("file")
  62.     y = Mid( file, 3, 4 )
  63.     m = Mid( file, 7, 2 )
  64.     d = Mid( file, 9, 2 )
  65.     Dat = DateSerial( y, m, d)
  66.     fName = FormatDateTime( Dat, 1 )
  67.  
  68.     client = Request.ReqParam("client")
  69.     reqType = Request.ReqParam("reqType")
  70.     host = Request.ReqParam("host")
  71.     sAudit = Request.ReqParam("audit")
  72.     Sort = Request.ReqParam("Sort")
  73.     Sort_Clients = Request.ReqParam("Sort_Clients")
  74.     Sort_Req = Request.ReqParam("Sort_Req")
  75.     if sAudit = "True" Then
  76.         audit = True
  77.     Else
  78.         audit = False
  79.     End if
  80.     Logging.File=file
  81.     Logging.SetSearchParams client, reqType, host, audit
  82.     Logging.ParseLog
  83. %>
  84. <center>
  85. <p><big><strong><font face="Arial">Logging of <%Response.Write(fName)%></font></strong></big></p>
  86. <p><big><strong><font face="Arial"><%Response.Write(client)%></font></strong></big></p>
  87. <p><big><strong><font face="Arial"><%Response.Write(reqType)%></font></strong></big></p>
  88. <p><big><strong><font face="Arial"><%Response.Write(host)%></font></strong></big></p>
  89. </center>
  90. <hr>
  91. <%
  92.    total = Logging.GetTotalDownload()
  93.    Sub PutBar( dwnLoad )
  94.     if dwnLoad > 0 Then
  95.         percent = ((dwnLoad * 100)/total)
  96.     Else
  97.         percent = 0
  98.     End If
  99.     if percent > 90 Then
  100.        line = "<img src=""images/yellow.gif"" height=200 width=15 border=0>"
  101.        Response.Write(line)
  102.        Exit Sub
  103.     End if
  104.     if percent > 80 Then
  105.        line = "<img src=""images/ltgreen.gif"" height=180 width=15 border=0>"
  106.        Response.Write(line)
  107.        Exit Sub
  108.     End if
  109.     if percent > 70 Then
  110.        line = "<img src=""images/green.gif"" height=160 width=15 border=0>"
  111.        Response.Write(line)
  112.        Exit Sub
  113.     End if
  114.     if percent > 60 Then
  115.        line = "<img src=""images/purple.gif"" height=140 width=15 border=0>"
  116.        Response.Write(line)
  117.        Exit Sub
  118.     End if
  119.     if percent > 50 Then
  120.        line = "<img src=""images/pink.gif"" height=120 width=15 border=0>"
  121.        Response.Write(line)
  122.        Exit Sub
  123.     End if
  124.     if percent > 40 Then
  125.        line = "<img src=""images/red.gif"" height=100 width=15 border=0>"
  126.        Response.Write(line)
  127.        Exit Sub
  128.     End if
  129.     if percent > 30 Then
  130.        line = "<img src=""images/orange.gif"" height=80 width=15 border=0>"
  131.        Response.Write(line)
  132.        Exit Sub
  133.     End if
  134.     if percent > 20 Then
  135.        line = "<img src=""images/brown.gif"" height=50 width=15 border=0>"
  136.        Response.Write(line)
  137.        Exit Sub
  138.     End if
  139.     if percent > 10 Then
  140.        line = "<img src=""images/cyan.gif"" height=30 width=15 border=0>"
  141.        Response.Write(line)
  142.        Exit Sub
  143.     End if
  144.     if percent > 0 Then
  145.        line = "<img src=""images/blue.gif"" height=5 width=15 border=0>"
  146.        Response.Write(line)
  147.        Exit Sub
  148.     End If
  149.     line = "<img src=""images/clear.gif"" height=1 width=15 border=0>"
  150.     Response.Write(line)
  151.    End Sub
  152. %>
  153.  
  154. <br>
  155. <div align="center"><center>
  156. <table border="1" cellpadding="0" cellspacing="0" width="100%">
  157.     <tr>
  158.         <td width="80%" align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  159.             Access statistics(<%Response.Write(Logging.GetTotalHits())%> hits, <%Response.Write(Logging.GetTotalDownloadSz())%> download)
  160.         </font></strong></td>
  161.         <td width="20%" align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  162.             Legend
  163.         </font></strong></td>
  164.     </tr>
  165.     <tr>
  166.         <td align=center width="80%">
  167.             <img src="images/ruler_ver.gif" height=200 width=16 border=0>
  168. <%
  169.             for i = 0 to 23
  170.                 tmp = Logging.GetDownloadForHour(i)
  171.                 PutBar( tmp )
  172.             next
  173. %>
  174.             <br>
  175.             <img src="images/ruler_hor.gif" height=20 width=382 border=0>
  176.         </td>
  177.         <td align="center" width="20%">
  178.         <table  border="1" cellpadding="0" cellspacing="0" width="100%">
  179.             <tr>
  180.                 <td align="center">
  181.                     <font face="Arial">
  182.                     <img src="images/yellow.gif" height=18 width=15 border=0>
  183.                       > 90%
  184.                     </font>
  185.                 </td>
  186.             </tr>
  187.             <tr>
  188.                 <td align="center">
  189.                     <font face="Arial">
  190.                     <img src="images/ltgreen.gif" height=18 width=15 border=0>
  191.                       > 80%
  192.                     </font>
  193.                 </td>
  194.             </tr>
  195.             <tr>
  196.                 <td align="center">
  197.                     <font face="Arial">
  198.                     <img src="images/green.gif" height=18 width=15 border=0>
  199.                       > 70%
  200.                     </font>
  201.                 </td>
  202.             </tr>
  203.             <tr>
  204.                 <td align="center">
  205.                     <font face="Arial">
  206.                     <img src="images/purple.gif" height=18 width=15 border=0>
  207.                       > 60%
  208.                     </font>
  209.                 </td>
  210.             </tr>
  211.             <tr>
  212.                 <td align="center">
  213.                     <font face="Arial">
  214.                     <img src="images/pink.gif" height=18 width=15 border=0>
  215.                       > 50%
  216.                     </font>
  217.                 </td>
  218.             </tr>
  219.             <tr>
  220.                 <td align="center">
  221.                     <font face="Arial">
  222.                     <img src="images/red.gif" height=18 width=15 border=0>
  223.                       > 40%
  224.                     </font>
  225.                 </td>
  226.             </tr>
  227.             <tr>
  228.                 <td align="center">
  229.                     <font face="Arial">
  230.                     <img src="images/orange.gif" height=18 width=15 border=0>
  231.                       > 30%
  232.                     </font>
  233.                 </td>
  234.             </tr>
  235.             <tr>
  236.                 <td align="center">
  237.                     <font face="Arial">
  238.                     <img src="images/brown.gif" height=18 width=15 border=0>
  239.                       > 20%
  240.                     </font>
  241.                 </td>
  242.             </tr>
  243.             <tr>
  244.                 <td align="center">
  245.                     <font face="Arial">
  246.                     <img src="images/cyan.gif" height=18 width=15 border=0>
  247.                       > 10%
  248.                     </font>
  249.                 </td>
  250.             </tr>
  251.             <tr>
  252.                 <td align="center">
  253.                     <font face="Arial">
  254.                     <img src="images/blue.gif" height=18 width=15 border=0>
  255.                       >   0%
  256.                     </font>
  257.                 </td>
  258.             </tr>
  259.         </table>
  260.          </td>
  261.     </tr>
  262. </table>
  263. </center></div>
  264. <br>
  265. <hr>
  266. <%
  267.    if Len(client) = 0 Then
  268.    link_client_by_name = "showlog.agp?file=" & file & "&audit=" & sAudit & "&reqType=" & reqType & "&Sort_Clients=byClient" & "&client=" & client & "&host=" & host
  269.    link_client_by_hits = "showlog.agp?file=" & file & "&audit=" & sAudit & "&reqType=" & reqType & "&Sort_Clients=byHits" & "&client=" & client & "&host=" & host
  270.    link_client_by_download = "showlog.agp?file=" & file & "&audit=" & sAudit & "&reqType=" & reqType & "&Sort_Clients=" & "&client=" & client & "&host=" & host
  271. %>
  272. <br>
  273. <center><strong><font face="Arial">Clients</font></strong></center>
  274. <br><br>
  275. <div align="center"><center>
  276. <table border="1" cellpadding="0" cellspacing="0" width="50%">
  277.     <tr>
  278.         <td align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  279.             <a href=<%Response.Write link_client_by_name%> title="Clients sorted by Client Name" >Client</a>
  280.         </font></strong></td>
  281.         <td align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  282.             <a href=<%Response.Write link_client_by_hits%> title="Clients sorted by Hits Number">Hits</a>
  283.         </font></strong></td>
  284.         <td align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  285.             <a href=<%Response.Write link_client_by_download%> title="Clients sorted by Downlods Size">Download</a>
  286.         </font></strong></td>
  287.     </tr>
  288. <%
  289.     if Sort_Clients  = "byClient" Then
  290.         Response.Write(Logging.Clients(file))
  291.     End if
  292.     if    Sort_Clients  = "byHits" Then
  293.         Response.Write(Logging.ClientsByHits(file))
  294.     End if
  295.     if Sort_Clients = "" Then
  296.         Response.Write(Logging.ClientsByDownload(file))
  297.     End if
  298. %>
  299. </table>
  300. </center></div>
  301. <br>
  302. <hr>
  303. <%
  304.    End if ' if Len(client) = 0 ...
  305.    if Len(reqType) = 0 Then
  306.    link_req_by_name = "showlog.agp?file=" & file & "&audit=" & sAudit & "&reqType=" & reqType & "&Sort_Req=byReq" & "&client=" & client  & "&host=" & host
  307.    link_req_by_hits = "showlog.agp?file=" & file & "&audit=" & sAudit & "&reqType=" & reqType & "&Sort_Req=byHits" & "&client=" & client  & "&host=" & host
  308.    link_req_by_download = "showlog.agp?file=" & file & "&audit=" & sAudit & "&reqType=" & reqType & "&Sort_Req=" & "&client=" & client  & "&host=" & host
  309. %>
  310. <br>
  311. <center><strong><font face="Arial">Request types</font></strong></center>
  312. <br><br>
  313. <div align="center"><center>
  314. <table border="1" cellpadding="0" cellspacing="0" width="50%">
  315.     <tr>
  316.         <td align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  317.             <a href=<%Response.Write link_req_by_name%> title="Request type sorted by Request Description" >Request type</a>
  318.         </font></strong></td>
  319.         <td align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  320.             <a href=<%Response.Write link_req_by_hits%> title="Request type sorted by Hits Number">Hits</a>
  321.         </font></strong></td>
  322.         <td align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  323.             <a href=<%Response.Write link_req_by_download%> title="Request type sorted by Downloads Size">Download</a>        
  324.         </font></strong></td>
  325.     </tr>
  326. <%
  327.     if Sort_Req  = "byReq" Then
  328.         Response.Write(Logging.ReqType(file))
  329.     End if
  330.     if    Sort_Req  = "byHits" Then
  331.         Response.Write(Logging.ReqByHits(file))
  332.     End if
  333.     if Sort_Req = "" Then
  334.         Response.Write(Logging.ReqByDownloads(file))
  335.     End if
  336. %>
  337.     
  338. </table>
  339. </center></div>
  340. <br>
  341. <hr>
  342. <%
  343.    End if 'if Len(reqType) = 0 ...
  344.    if Len(host) = 0 Then
  345.    link_host = "showlog.agp?file=" & file & "&audit=" & sAudit & "&reqType=" & reqType & "&Sort=byHost" & "&client=" & client  & "&host=" & host
  346.    link_hits = "showlog.agp?file=" & file & "&audit=" & sAudit & "&reqType=" & reqType & "&Sort=byHits" & "&client=" & client  & "&host=" & host
  347.    link_size = "showlog.agp?file=" & file & "&audit=" & sAudit & "&reqType=" & reqType & "&Sort=" & "&client=" & client  & "&host=" & host
  348. %>
  349. <br>
  350. <center><strong><font face="Arial">Contacted hosts</font></strong></center>
  351. <br><br>
  352. <div align="center"><center>
  353. <table border="1" cellpadding="0" cellspacing="0" width="50%">
  354.     <tr>
  355.         <td align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  356.            <a href=<%Response.Write link_host%> title="Contacted Hosts sorted by Host Name">Host</a>
  357.         </font></strong></td>
  358.         <td align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  359.             <a href=<%Response.Write link_hits%> title="Contacted Hosts sorted by Hits Number">Hits</a>    
  360.         </font></strong></td>
  361.         <td align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  362.             <a href=<%Response.Write link_size%> title="Contacted Hosts sorted by Downloads Size">Download</a>
  363.         </font></strong></td>
  364.     </tr>
  365. <%
  366.     
  367.     if Sort  = "byHost" Then
  368.         Response.Write(Logging.Hosts(file))
  369.     End if
  370.     if    Sort  = "byHits" Then
  371.         Response.Write(Logging.HostByHits(file))
  372.     End if
  373.     if Sort = "" Then
  374.         Response.Write(Logging.HostsBySize(file))
  375.     End if
  376.  
  377. %>
  378.  
  379. </table>
  380. </center></div>
  381. <br>
  382. <hr>
  383. <br>
  384. <%
  385.    End if 'if Len(host) = 0 ...
  386.    nr = 0
  387.    if Len(client) > 0 Then
  388.     nr = nr + 1
  389.    End if
  390.    if Len(reqType) > 0 Then
  391.     nr = nr + 1
  392.    End if
  393.    if Len(host) > 0 Then
  394.     nr = nr + 1
  395.    End if
  396.    if (nr > 0) Then
  397. %>
  398.  
  399. <%
  400.     if Len(host)>0 Then
  401. %>
  402. <div align="center"><center>
  403. <table border="1" cellpadding="0" cellspacing="0" width="100%">
  404.     <tr>
  405.         <td align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  406.             Time
  407.         </font></strong></td>
  408.         <td align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  409.             Received
  410.         </font></strong></td>
  411.         <td align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  412.             Contacted host
  413.         </font></strong></td>
  414.         <td align="center" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
  415.             Requested URL
  416.         </font></strong></td>
  417.     </tr>
  418. <%
  419.         Response.Write(Logging.FullHostURLs)
  420. %>
  421. </table>
  422. </center></div>
  423. <br>
  424. <hr>
  425. <%
  426.     End If
  427. %>
  428.  
  429. <%
  430.    End if 'if Len(host) = 0 ...
  431. %>
  432. <br>
  433. <%
  434.     'Remove all elements from lists (free up memory)
  435.     Logging.File = ""
  436. %>
  437. <font size="1" face="Arial"><%Response.Write(GateKeeper.Version)%></font>
  438.  
  439. </body>
  440. </html>
  441.