home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2002 March / PCWMAR02.iso / software / windowsxp / ftgateoffice / ftgateoffice.exe / Main / log.fts < prev    next >
Encoding:
Text File  |  2001-11-29  |  4.2 KB  |  176 lines

  1. <%
  2. #include </utility/security.fts>
  3. #include </utility/global.fts>
  4. #include </utility/theme.fts>
  5. #include </utility/ftgate.fts>
  6. %>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
  8. <HTML>
  9. <HEAD>
  10. <LINK REL=STYLESHEET HREF="/utility/main<%=nn4%>.css" TYPE="text/css">
  11. <STYLE>
  12.     TD { padding-right: 4 }
  13.     TH { padding-right: 4 }
  14. </STYLE>
  15. <META NAME="GENERATOR" CONTENT="MICROSOFT DEVELOPER STUDIO">
  16. <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML; CHARSET=ISO-8859-1">
  17. <%
  18. if (number(request.refresh)>0)
  19. {
  20.     %>
  21.     <META HTTP-EQUIV="REFRESH" CONTENT="<%=request.refresh%>; URL=log.fts?refresh=<%=request.refresh%>&direction=<%=request.direction%>&entries=<%=request.entries%>'"> 
  22.     <%
  23. }
  24.  
  25. if (request.clear=="1")
  26. {
  27.     log.history.size=0
  28.   log.write(0, "Clear Log")
  29. }
  30. %>
  31. <SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
  32. <!--
  33. function onLoad()
  34. {
  35.     if (parent.ui)
  36.         parent.ui.focus();
  37. }
  38. //-->
  39. </SCRIPT>
  40. <TITLE>FTGate Log</TITLE>
  41. </HEAD>
  42. <BODY BGCOLOR="<%=border%>" onLoad="onLoad()">
  43. <TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
  44.     <TR>
  45.         <TH>Date</TH><TH>Time</TH><TH>Thread</TH><TH>ID</TH><TH>Entry</TH>
  46.     </TR>
  47.     <%
  48.         var wm=new server.webmail
  49.         var toggle=0
  50.         log.history.size=request.entries
  51.  
  52.         var count=0
  53.         var ok = log.history.first()
  54.         while (ok)
  55.         {
  56.             count=count+1
  57.             ok=log.history.next()
  58.         }
  59.  
  60.         if (request.direction==1)
  61.         {
  62.             var index=count
  63.             var i
  64.  
  65.             var stop=count-number(request.entries)
  66.             if (stop<0)
  67.                 stop=0
  68.  
  69.             while (index!=stop)
  70.             {
  71.                 log.history.first()
  72.                 for (i=0; i<index-1; i=i+1)
  73.                     log.history.next()
  74.  
  75.                 var str=log.history.item
  76.  
  77.                 // FUNCTION logLine(str)
  78.                 output.writeln("<TR>")
  79.  
  80.                 var cutstart=0
  81.                 var cutend=str.indexof(",",0)
  82.                 output.writeln("<TD CLASS=\"toggle"+toggle+"\" VALIGN=\"TOP\" NOWRAP>"+str.slice(cutstart,cutend)+" </TD>");
  83.  
  84.                 cutstart=cutend+2
  85.                 cutend=str.indexof(",",cutstart)
  86.                 output.writeln("<TD CLASS=\"toggle"+toggle+"\" VALIGN=\"TOP\" NOWRAP>"+str.slice(cutstart,cutend)+" </TD>");
  87.  
  88.                 cutstart=cutend+2
  89.                 cutend=str.indexof(",",cutstart)
  90.                 output.writeln("<TD CLASS=\"toggle"+toggle+"\" VALIGN=\"TOP\" NOWRAP>"+str.slice(cutstart,cutend)+" </TD>");
  91.  
  92.                 cutstart=cutend+2
  93.                 cutend=str.indexof(",",cutstart)
  94.                 output.writeln("<TD CLASS=\"toggle"+toggle+"\" VALIGN=\"TOP\" NOWRAP>"+str.slice(cutstart,cutend)+" </TD>");
  95.  
  96.  
  97.                 cutstart=cutend+2
  98.                 cutend=999
  99.         str = str.slice(cutstart,cutend)
  100.         str=wm.escape(str)
  101.  
  102.                 output.writeln("<TD CLASS=\"toggle"+toggle+"\" VALIGN=\"TOP\">"+str+"</TD>");
  103.                 output.writeln("</TR>")
  104.  
  105.                 index=index-1
  106.                 toggle=!toggle
  107.             }
  108.         }
  109.         else
  110.         {
  111.             var index=0
  112.  
  113.             log.history.first()
  114.  
  115.             var start=count-number(request.entries)
  116.             while (start>0)
  117.             {
  118.                 log.history.next()
  119.                 start=start-1
  120.             }
  121.  
  122.             var logic=false
  123.             if (log.history.item)
  124.             {
  125.                 if (index<number(request.entries))
  126.                     logic=true;
  127.             }
  128.  
  129.             while (logic)
  130.             {
  131.                 var str=log.history.item
  132.  
  133.                 // FUNCTION logLine(str)
  134.                 output.writeln("<TR>")
  135.  
  136.                 var cutstart=0
  137.                 var cutend=str.indexof(",",0)
  138.                 output.writeln("<TD CLASS=\"toggle"+toggle+"\" VALIGN=\"TOP\" NOWRAP>"+str.slice(cutstart,cutend)+"</TD>");
  139.  
  140.                 cutstart=cutend+2
  141.                 cutend=str.indexof(",",cutstart)
  142.                 output.writeln("<TD CLASS=\"toggle"+toggle+"\" VALIGN=\"TOP\" NOWRAP>"+str.slice(cutstart,cutend)+"</TD>");
  143.  
  144.                 cutstart=cutend+2
  145.                 cutend=str.indexof(",",cutstart)
  146.                 output.writeln("<TD CLASS=\"toggle"+toggle+"\" VALIGN=\"TOP\" NOWRAP>"+str.slice(cutstart,cutend)+"</TD>");
  147.  
  148.                 cutstart=cutend+2
  149.                 cutend=str.indexof(",",cutstart)
  150.                 output.writeln("<TD CLASS=\"toggle"+toggle+"\" VALIGN=\"TOP\" NOWRAP>"+str.slice(cutstart,cutend)+"</TD>");
  151.  
  152.                 cutstart=cutend+2
  153.                 cutend=999
  154.         str = str.slice(cutstart,cutend)
  155.         str=wm.escape(str);
  156.  
  157.                 output.writeln("<TD CLASS=\"toggle"+toggle+"\" VALIGN=\"TOP\">"+str+"</TD>");
  158.                 output.writeln("</TR>")
  159.  
  160.                 log.history.next()
  161.                 index=index+1
  162.                 toggle=!toggle
  163.  
  164.                 logic=false
  165.                 if (log.history.item)
  166.                 {
  167.                     if (index<number(request.entries))
  168.                         logic=true
  169.                 }
  170.             }
  171.         }
  172.     %>
  173. </TABLE>
  174. </BODY>
  175. </HTML>
  176.