subroutine w3Admin
**********************************************************************
* w3Admin: Main driver for FlashCONNECT Administration
**********************************************************************
* 18Sep00 00.00 jack Initial creation
include wbp w3Include
include bp w3Admin.Include
call w3Admin.Housekeeping(status)
* Handle housekeeping errors
if status # "" then
call w3HtmlInit(w3Admin.background, "")
subs = ""
subs<-1> = "##TITLE##":@vm:"wAdmin Fatal Error"
subs<-1> = "##HEADLINE##":@VM:"w3Admin Initialization Error"
call w3HtmlHeader("",subs)
call w3HtmlInsertSection("w3Config", "", "head")
* Insert messages
msgs = dcount(status, @am)
call w3HtmlInsertSection("w3Config", "", "Messages.start")
for i = 1 to msgs
text = trim(status<i>)
if text # "" then
subs = "#text#":@vm:status<i>
call w3HtmlInsertSection("w3Config", subs, "Messages.text")
end
next i
call w3HtmlInsertSection("w3Config", "", "Messages.end")
call w3HtmlFooter("","")
return
end
* find out what form we received and the submit button selected
formname = ""
submit = ""
call w3GetVal(formname, "formname")
call w3GetVal(submit, "submit")
formname = trim(formname)
submit = trim(submit)
* diagnostic messages
CRT "w3Admin Driver"
CRT "Formname: ":formname
CRT "Submit: ":submit
* first process the form submitted
skip = 0 ;* should default form creation be skipped
begin case
case submit = "Cancel" ;* don't process the form
null
case formname = "w3Config"
call w3Admin.w3Config.process
skip = 1
case formname = "w3Groups"
call w3Admin.w3Groups.process
skip = 1
case formname = "w3LogsControl"
call w3Admin.w3LogsControl.process
skip = 1
case formname = "w3User"
call w3Admin.w3User.process
skip = 1
case formname = "w3Apps"
call w3Admin.w3Apps.maintain
skip = 1
case 1
CRT "No form processed"
end case
* next look at the submit button to determine the next form
if not(skip) then
begin case
case submit = "w3Config"
call w3Admin.w3Config.create
case submit = "w3Groups"
call w3Admin.w3Groups.form("")
case submit = "w3LogsControl"
call w3Admin.w3LogsControl.form("")
case submit = "w3Users"
call w3Admin.w3User.create
case submit = "w3Apps"
call w3Admin.w3Apps.maintain
case 1
CRT "Default form"
call w3Admin.w3Apps.maintain
end case
end
return