home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / srev13g.zip / COUNTER.RX0 < prev    next >
Text File  |  1999-03-26  |  4KB  |  113 lines

  1. /* This is a server-side-include  "counter display" for SRE-Http.
  2.   See COUNTER.DOC for details on installation and use.
  3. Examples:
  4.         <!-- INTERPRET FILE COUNTER.RXX file=afile opt1=val1 opt2=.. , 0 -->
  5.        ctval=counter.rxx(optlist,noaugment,usedfile,sel,isent,ilen)
  6.        i.e; <!-- INTERPRET FILE COUNTER.RXX FILE=afile IMGTYPE=MBC --> */
  7.  
  8. /* Start USER configurable parameters **************/
  9. /*BEGIN  ---  (this line is used by the EDITSREF.CMD SRE-Http utility)*/
  10.  
  11. /* record using the common-log format  
  12.   1=use common log format, 0 = use the save_xxx parameters below */
  13. common_log_format=0
  14.  
  15. /* where to store .cnt files. 
  16.  0 means "use documents own directory"
  17.  Use ' ' Around The Name: counter_dir='D:\GOSERVE' 
  18.  Note: If you specify a non-0 value, 
  19.         and a host-specific COUNTER_RXX directory was specified, 
  20.         then the host-specific directory will be used 
  21.         (and NOT this "default" directory) */
  22. counter_dir=0
  23.  
  24. /* Set directory (relative to the GoServe data directory)
  25.   that contains the "digit images". Counter_image_dir
  26.   is a selector pointing to root of image directories.
  27.   i.e; counter_image_dir='/DIGITS'*/
  28. counter_image_dir ='/digits'  
  29.  
  30. /* 1=create a .cnt file if none exists, 0=do not */
  31. create_file=1
  32.  
  33. /* 2 = use a 1 cell <TABLE>
  34.    1 =  use <NOBR> around strings of  "graphical digits". 
  35.    0 =  do not use <NOBR> 
  36.    Note that FORCE_BREAK>0 overrides DIGITS_NOBR */
  37. digits_nobr=1
  38.  
  39. /* 0 = Normal, don't force <BR> before/after digits.
  40.    1 = Place a <BR> in front of each digit.
  41.    2 = Place a <BR> after each digit. */
  42. force_break=0
  43.  
  44. /* 1 = Suppress the "log users" option, 0=do not (a logusers option will override write_users)*/
  45. suppress_logusers=0
  46.  
  47. /* suppress incrementing if request is from a same client within
  48.    a suppress_recent timespan (by default, in minutes).
  49.    If 0, do NOT suppress.   
  50.    Note that: 15 = 15m = 900s =  .25h
  51.    Note:   For suppress recent to work, you MUST set 
  52.            either use_queue=1 or write_users=1 */
  53. suppress_recent=0
  54.  
  55. /* suppress incrementing  OWNER requests:  1=yes, 0=no */
  56. suppress_owners=0             
  57.  
  58. /* SAVE_ parameters used if common_log_format=0 
  59.    1=save ip name, 0=do not save ip name     */
  60. save_ipname=1  
  61.  
  62. /* 1=save username (if available),0=do not   */
  63. save_username=1        
  64.  
  65. /* 1= save time (10:01:33), 0= do not        */
  66. save_time=1             
  67.  
  68. /* 1=Save date (10 Feb 1996), 0=do not       */
  69. save_date=1             
  70.  
  71. /* 1=save "request selector",0=do not          */
  72. save_docname=1          
  73.  
  74. /* 1=save "referer", 0=do not                */
  75. save_referer=1          
  76.  
  77. /* 1= save the "user-agent", 0=do not         */
  78. save_browser=1          
  79.  
  80. /* 1 = save # of bytes sent & file size (or approximations thereof */
  81. save_bytes = 1          
  82.  
  83. /* 1=Use sref_http queues to cache recent hits. 0=use file */
  84. use_queue=1
  85.  
  86. /* store info on each request. 0=no, 1=yes. Can be overridden
  87.    by a LOGUSERS option */
  88. write_users=0
  89.  
  90. /*END  ---  (this line is used by the EDITSREF.CMD utility)*/
  91. /* END OF USER CONFIGURABLE PARAMETERS  -------------- */
  92.  
  93. if counter_dir<>0 then do
  94.   env=value('SREF_PREFIX',,'os2environment')
  95.   ahos=sref_value('HOST_NICKNAME',,'REQ')
  96.   if ahos<>'' then do
  97.     cdir=value(env||'COUNTER_RXX_DIR.'||ahos,,'os2environment')
  98.     if cdir<>'' then counter_dir=cdir
  99.   end
  100. end
  101. cparams=common_log_Format' 'counter_dir' 'counter_image_dir' 'create_file' 'digits_nobr   
  102. cparams=cparams' 'suppress_logusers' 'suppress_recent' 'suppress_owners' 'write_users
  103. cparams=cparams' 'save_ipname' 'save_username' 'save_time' 'save_date' 'save_docname' 'save_referer' 'save_browser' 'save_bytes
  104. cparams=cparams' 'use_queue' 'force_break
  105. parse arg v1,v2,v3,v4,v5,v6,v7 
  106.  
  107. yow=sref_counter(cparams,v1,usedfile,docname,verbose,v1,v2,v3,v4,v5,v6,v7)
  108. return yow
  109.  
  110.  
  111.  
  112. /* updated on 11:17:28 23 Mar 1999 */
  113.