w3Admin.w3LogsControl.form

subroutine w3Admin.w3LogsControl.form(errorMessages)

*

* Creates the w3Logs.Control maintenance Web form

*

* [00] 28Jun99 jr Initial creation

* [01] 06Jan99 jr Use one template, w3LogsControl

*

include wbp w3Include

include bp w3Admin.Include

CRT "w3Admin.w3LogsControl.form"

 

* Open files and set background

call w3Admin.Housekeeping(status)

if status # "" then

   call w3Admin.InsertErrors(status)

   return

end

call w3HtmlInit(w3Admin.background,"")

subs = ""

subs<-1> =  "#HEADLINE#":@VM:"FlashCONNECT Logs Control Maintenance"

subs<-1> =  "##TITLE##":@VM:"FlashCONNECT Logs Control Maintenance"

call w3HtmlHeader("",subs)

* insert any error messages

if not(assigned(errorMessages)) then errorMessages = ""

if errorMessages # "" then

   call w3Admin.InsertErrors(errorMessages)

end

call w3HtmlFormBeg(w3_NP,"")

* set up formname, table definition

call w3HtmlInsertSection("w3LogsControl", "","head")

          

* get a table of all elements

*  A1 = name

*  A2 = current count (read only)

*  A3 = maximum entries

*  A4 = enabled (1), disabled (other)

entries = ""

status  = ""

call w3Admin.w3LogsControl.GetEntries(entries, status)

if status # "" then

   call w3Admin.InsertErrors(status)

   return

end

numEntries = dcount(entries<1>, @VM)

for i = 1 to numEntries

*   insert the group name to the start of the member list

    subs = ""

    subs<-1> = "#ROW#":@VM    :i

    subs<-1> = "#FILE#":@VM   :entries<1,i>

    subs<-1> = "#CURRENT#":@vm:entries<2, i>

    subs<-1> = "#MAX#":@VM    :entries<3, i>

    call w3HtmlInsertSection("w3LogsControl", subs, "detail")

    subs     = "#ROW#":@VM:    i

    if entries<4, i> = 1 then

       call w3HtmlInsertSection("w3LogsControl", subs, "Enabled")

    end else

       call w3HtmlInsertSection("w3LogsControl", subs, "Disabled")

    end       

next i

* allow adding definition of a new log file

subs = "#ROW#":@VM:numEntries + 1

call w3HtmlInsertSection("w3LogsControl", subs, "add1")

* save the number of rows

subs = "#ROW#":@VM:numEntries + 1

call w3HtmlInsertSection("w3LogsControl",subs, "end")

call w3HtmlFormEnd

*  Get the path which got us here so we can set it in the template

Action = ""

call w3Action(Action, "")

subs   = "#ACTION#":@vm:Action

call w3HtmlFooter("",subs)

return