Attribute VB_Name = "modGlobalVars"
Option Explicit
Public LoginSucceeded As Boolean    'Used to validate log-in procedure.
Public guest As Boolean
Public Sub ConfigMenus()
 With frmmain
    If LoginSucceeded = True Then
        'menu items
        .mnulog.Enabled = False
        .fsgs.Enabled = True
        .mnubookinfo.Enabled = True
        .mnusfo.Enabled = True
        .mnuouts.Enabled = True
        .mhd.Enabled = True
        .mnuedit.Enabled = True
        .mnutools.Enabled = True
        
        'toolbar buttons
        .Toolbar1.Buttons(1).Caption = "Log Out" 'login/logout button
        .Toolbar1.Buttons(1).ToolTipText = "Log Out" 'login button
        .Toolbar1.Buttons(2).Enabled = True
        .Toolbar1.Buttons(3).Enabled = True
        .Toolbar1.Buttons(4).Enabled = True
        .Toolbar1.Buttons(5).Enabled = True
        .Toolbar1.Buttons(6).Enabled = True
        .Toolbar1.Buttons(13).Enabled = True
        .Toolbar1.Buttons(15).Enabled = True
        .Toolbar1.Buttons(11).Enabled = True
        .Toolbar1.Buttons(7).Enabled = True
        .Toolbar1.Buttons(18).Enabled = True
  End If
End With
End Sub

Public Sub ConfigMenuss()
 With frmmain
 If guest = True Then
        'menu items
        .mnulog.Enabled = False
        .cgfgfg.Enabled = True
        .fsgs.Enabled = False
        .mnubookinfo.Enabled = False
        .mnusfo.Enabled = False
        .mnuouts.Enabled = False
        .mhd.Enabled = False
        .mnuedit.Enabled = False
        .mnutools.Enabled = False
        
        'toolbar buttons
         .Toolbar1.Buttons(1).Caption = "Log Out" 'login/logout button
        .Toolbar1.Buttons(1).ToolTipText = "Log Out" 'login button
        .Toolbar1.Buttons(1).Enabled = True
        .Toolbar1.Buttons(2).Enabled = False
        .Toolbar1.Buttons(3).Enabled = False
        .Toolbar1.Buttons(4).Enabled = False
        .Toolbar1.Buttons(6).Enabled = False
        .Toolbar1.Buttons(9).Enabled = True
        .Toolbar1.Buttons(11).Enabled = True
        .Toolbar1.Buttons(12).Enabled = True
        .Toolbar1.Buttons(17).Enabled = True
        .Toolbar1.Buttons(14).Enabled = True
        .Toolbar1.Buttons(15).Enabled = True
End If
End With
End Sub


