w3Admin.w3Apps.Maintain

subroutine w3Admin.w3Apps.maintain

**************************************************************************

* 09 FEB 01  DJZ  Initial draft.

* w3Admin.w3Apps.maintain

*   genNamesForm

*   w3Admin.w3Apps.update

**************************************************************************

$options EXT

include wbp w3include

include bp w3Admin.Include

equ WAITTIME to 300

status = ''

call w3Admin.Housekeeping(status)

*  Handle housekeeping errors

if status # '' then

   call w3HtmlInit("w3Admin", '')

   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

call w3GetVal(cmd, 'B1')

call w3GetVal(appName, 'appName')

begin case

   case cmd = 'Edit'

      call w3Admin.w3Apps.update(appName)

   case cmd = 'Delete'

      call w3admin.w3apps.Delete(appName)

   case cmd = 'New'

      call w3Admin.w3Apps.update('')

end case

call w3HtmlInit('w3Admin', '')

subs = ''

subs<-1> = '##TITLE##':@vm:'FlashCONNECT Application Selection'

subs<-1> = '#HEADLINE#':@vm:'FlashCONNECT Applications Selection'

call w3HtmlHeader('', subs)

call w3HtmlFormBeg(w3_NP, '')

list.id = ''

call w3Admin.w3Apps.GetNames(list.id)                              

call w3HtmlInsertSection('w3Admin.w3Apps.template', '', 'section-1')

call w3HtmlSelect('appName', list.id, list.id, 1, '', 'size="1"', '')

call w3HtmlInsertSection('w3Admin.w3Apps.template', '', 'section0')

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