Attribute VB_Name = "modPrincipal"
Option Explicit

' Variables de Conecccion

'Public conn As ADODB.Connection
'Public Anno As String
Public Const gesCartola As Integer = 1
Public Const gesCalendarioCurso As Integer = 2
Public Const gesModalXmes As Integer = 3
Public Const gesGradoXmes As Integer = 4
Public Const gesLetraXmes As Integer = 5
Public Const gesNombreModalXmes As Integer = 6
Public Const gesNombreMes As Integer = 7
Public Const gesAsisOK As Integer = 8
Public Const gesAsisBad As Integer = 9
Public Const gesLetraNivelSinTerminar As Integer = 10
Public strServ As String
Public strUser As String
Public strBase As String
Public strPass As String


'Public Sub Main()
''Dim Autoriz
''Dim clave
''Dim asistencia
''Autoriz = InputBox("Ingrese nombre de usuario", "Ingrese nombre de usuario")
''clave = InputBox("Ingrese clave de usuario", "Ingrese clave de usuario")
''
'    Dim frmAsis As Form_AsisMain
''    Dim Servidor As String
''    Dim Base As String
''    Dim sede As String
''    Dim VarConecta As Boolean
''    Dim AnnoIni As String
'    Set frmAsis = New Form_AsisMain
''    Servidor = IniGet("GESCOL.INI", "Servidor", "IP", "")
''    If Len(Trim(Servidor)) = 0 Then
''        Servidor = InputBox("Ingrese IP del Servidor", "IP Servidor")
''        IniWrite "GESCOL.INI", "Servidor", "IP", Servidor
''        IniWrite "GESCOL.INI", "Servidor", "Base de Datos", "Gescol"
''    End If
'    frmAsis.Show
''    frmAsis.cmdAsistencia.Enabled = False
''    frmAsis.cmdCalendario.Enabled = False
''    frmAsis.cmdSubvenciones.Enabled = False
''    frmAsis.fraTabs.Item(1) = "Conectando..."
''    frmAsis.StatusBar1.Panels.Clear
''    frmAsis.StatusBar1.Panels.Add 1, "srv", "Conectando..."
''    'frmAsis.Shape1.Item(0).FillColor = &HFF&
''    'frmAsis.Shape1.Item(1).FillColor = &HFF&
''    'frmAsis.Shape1.Item(2).FillColor = &HFF&
''    'frmAsis.Timer1.Enabled = True
''    frmAsis.Refresh
''    Base = IniGet("GESCOL.INI", "Servidor", "Base de Datos", "")
''    VarConecta = Conecta(conn, Servidor, Base, "") '"password")
''
''Dim objRS As ADODB.Recordset
''Set objRS = New ADODB.Recordset
''Dim var_sql As String
'''Dim clave As String
''var_sql = "SELECT asistencia FROM usuarios where aut_nombre_usuario = '" & Autoriz & "'"
''objRS.Open var_sql, conn
'''asistencia = objRS("asistencia")
''
''If objRS.RecordCount < 1 Then
''   ' conn.Close
''    MsgBox "Usuario o Clave incorrectos"
''    objRS.Close
''    Exit Sub
''Else
''    asistencia = objRS("asistencia")
''End If
''objRS.Close
''
''If asistencia = 1 Then
''    Form_AsisMain.Visible = True
''
'''    Dim frmAsis As Form_AsisMain
'''    Dim Servidor As String
'''    Dim Base As String
'''    Dim sede As String
'''    Dim VarConecta As Boolean
'''    Dim AnnoIni As String
'''    Set frmAsis = New Form_AsisMain
'''    Servidor = IniGet("GESCOL.INI", "Servidor", "IP", "")
'''    If Len(Trim(Servidor)) = 0 Then
'''        Servidor = InputBox("Ingrese IP del Servidor", "IP Servidor")
'''        IniWrite "GESCOL.INI", "Servidor", "IP", Servidor
'''        IniWrite "GESCOL.INI", "Servidor", "Base de Datos", "Gescol"
'''    End If
'''    frmAsis.Show
'''    frmAsis.cmdAsistencia.Enabled = False
'''    frmAsis.cmdCalendario.Enabled = False
'''    frmAsis.cmdSubvenciones.Enabled = False
'''    frmAsis.fraTabs.Item(1) = "Conectando..."
'''    frmAsis.StatusBar1.Panels.Clear
'''    frmAsis.StatusBar1.Panels.Add 1, "srv", "Conectando..."
'''    'frmAsis.Shape1.Item(0).FillColor = &HFF&
'''    'frmAsis.Shape1.Item(1).FillColor = &HFF&
'''    'frmAsis.Shape1.Item(2).FillColor = &HFF&
'''    'frmAsis.Timer1.Enabled = True
'''    frmAsis.Refresh
'''    Base = IniGet("GESCOL.INI", "Servidor", "Base de Datos", "")
'''    VarConecta = Conecta(conn, Servidor, Base, "") '"password")
''    sede = UCase(Base)
''    If VarConecta Then
''        AnnoIni = DevuelveCampo("cfg", "", "valor", " param = 'ANNO' ", conn)
''        Anno = AnnoIni
''        strServ = Servidor
''        strBase = Base
''        strUser = "root"
''        strPass = ""
'        frmAsis.cmdAsistencia.Enabled = True
'        frmAsis.cmdCalendario.Enabled = True
'        frmAsis.cmdSubvenciones.Enabled = True
'        'frmAsis.fraTabs.Item(1).Caption = ""
'        frmAsis.StatusBar1.Panels.Clear
'        frmAsis.StatusBar1.Panels.Add 1, "srv", strServ
'        frmAsis.StatusBar1.Panels.Add 2, "base", strBase
'        frmAsis.StatusBar1.Panels.Add 3, "agno", Anno
''    Else
''        End
''    End If
''Else
''    MsgBox ("Ud. no tiene acceso a este modulo. De aviso al Depto. de Informática")
''    Exit Sub
''End If
'End Sub



