w3Admin.w3LogsControl.Process

subroutine w3Admin.w3LogsControl.process

*

* [00] 28Jun99 jr Initial creation

*

include wbp w3Include

CRT "w3Admin.w3LogsControl.process"

rows       = 0                     ;* number of rows on form

max        = ""                    ;* maximum entries in file

file       = ""                    ;* log file name

enabled    = ""                    ;* logging enabled

deleteit   = ""                    ;* delete entry

errors     = ""                    ;* processing errors

call w3GetVal(rows, "ROWS")     ;* number of rows to process

if rows > 1000 then rows = 1000    ;* safety, sanity check

for i = 1 to rows

*   get user data

    call w3GetVal(max, "MAX":i)

    call w3GetVal(file, "FILE":i)

    call w3GetVal(enabled, "ENABLED":i)                       

    if enabled = "" then

      enabled = 0

    end else

       enabled = 1

    end

    call w3GetVal(deleteit, "DEL":i)

    if deleteit = "" then deleteit = 0 else deleteit = 1      

    CRT "File: ":file:" Max: ":max:" delete: ":deleteit:" enabled: ":enabled

    if file # "" then

       call w3Admin.w3LogsControl.Update(file, max, enabled, deleteit, status)

       if status # "" then

          errors = "Line ":i:" File '":file:"' ":status:@am:errors

       end

    end

next i

call w3Admin.w3LogsControl.form(errors)

     

return