home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / utilsf / login / audit.opl next >
Text File  |  1995-03-14  |  2KB  |  123 lines

  1. REM AUDIT
  2. REM 12/27/92 13:58 complete 15:47
  3. REM REM AUDIT TRAIL OF LAST 6 LOGINS
  4.  
  5. PROC AUDIT:
  6.     local num%,i%,j%,k%,id%,k1%,k2%,k3%,K4%,K5%,gr%,tot%,h,m,s,hd,ht,dt$(25),i,pt%,tt
  7.     loadm "timelib"
  8.     OPEN "AUDIT",A,DATE1$,DATE2$,N%,TEMPS
  9.     gat 43,12
  10.     gstyle 3
  11.     gprint "The "+gen$(count,3)+" preceding sessions."
  12.     last
  13.     id%=gcreate(18,20,200,40,1)
  14.     k1%=gcreate(15,67,15,12,1)
  15.     k2%=gcreate(115,67,15,12,1)
  16.     k3%=gcreate(200,67,24,12,1)
  17.     
  18.     guse k1%
  19.     gborder 3
  20.     gtmode 3
  21.     gat 3,9
  22.     gprint chr$(283) :rem <--
  23.  
  24.     guse k2%
  25.     gborder 3
  26.     gtmode 3
  27.     gat 3,9
  28.     gprint chr$(282) :rem -->
  29.     
  30.     guse k3%
  31.     gborder 3
  32.     gtmode 3
  33.     gat 3,9
  34.     gprint "esc"
  35.  
  36.     
  37.     guse id%
  38.     gborder 1
  39.     gtmode 3
  40.     i%=count
  41.     do
  42.       gat 3,20
  43.       gstyle 16
  44.       gprint "Start:"; a.date2$;
  45.       gat 3,30
  46.       gprint "Session#";gen$(a.n%,-4);"  for  ";hrs$:(a.temps)
  47.       k%=get
  48.       if k%=258
  49.         if pos>=count
  50.           print chr$(7);
  51.           giprint "*end"
  52.         else
  53.           next
  54.           i%=i%+1
  55.         endif
  56.       elseif k%=259
  57.         if pos<=1
  58.           print chr$(7);
  59.           giprint "*begin"
  60.         else
  61.           back
  62.           i%=i%-1
  63.         endif
  64.       elseif k%=256
  65.         first
  66.         i%=1
  67.       elseif k%=257
  68.         last
  69.         i%=count
  70.       elseif k%=27
  71.         return
  72.       elseif k%=%g or k%=%G
  73.         pt%=pos
  74.         tt=0
  75.         gr%=gcreate (0,45,240,35,1)
  76.         gborder 1
  77.         ht=hour*100+(minute*(1.+2./3.))
  78.         gat 3+ht/10.,20
  79.         gprint chr$(281)
  80.         gfont 3
  81.         gat 4,30
  82.         gprint "0"
  83.         i=1
  84.         do
  85.           gat i*10-6,21
  86.           gbox 3,3
  87.           gat i*10,21
  88.           glineto i*10,23
  89.           if i/2=int(i/2)
  90.         gat i*10+5+((i>=10)*4)-1,30
  91.         gprint i
  92.           endif
  93.           i=i+1
  94.         until i=24
  95.         gfont 1
  96.         first
  97.         do
  98.           if left$(a.date2$,14)=left$(datimf$:,14)
  99.         h=val(mid$(a.date2$,17,2)) :m=val(mid$(a.date2$,20,2)) 
  100.         ht=h*100+(m*(1.+2./3.))
  101.         gat 5+ht/10,0
  102.         gbox (int(a.temps/60)*(1.+2./3.))/10,15
  103.         tt=tt+a.temps
  104.           endif
  105.           next
  106.         until eof
  107.         position pt%
  108.         tot%=gcreate (56,0,128,15,1)
  109.         gborder 1
  110.         guse tot%
  111.         gat 2,10
  112.         gprint "total/day =";hrs$:(tt)
  113.      
  114.         get
  115.         gclose gr%
  116.         gclose tot%
  117.         guse id%
  118.       endif
  119.     until k%=27
  120.     get
  121. ENDP
  122.  
  123.