*!*****************************************************************************
PROCEDURE open_database_front
IF DBUSED("frontsql")
    SET DATABASE TO frontsql
    m.boladbfront=.T.
ELSE
    DO nastavsety
    m.boladbfront=.F.
    IF !FILE(m.gcpri_path + "frontsql.dbc")
        COPY FILE (m.gcini_path + "views\frontsql.*") TO (gcpri_path + "frontsql.*")
    ENDIF 
    IF !FILE(m.gcpri_path + "s_appar_de.dbf")
        COPY FILE (m.gcini_path + "views\s_appar_de.*") TO (gcpri_path + "s_appar_de.*")
    ENDIF 
    IF !FILE(m.gcpri_path + "s_col_tab.dbf")
        COPY FILE (m.gcini_path + "views\s_col_tab.*") TO (gcpri_path + "s_col_tab.*")
    ENDIF 
    IF !FILE(m.gcpri_path + "s_form.dbf")
        COPY FILE (m.gcini_path + "views\s_form.*") TO (gcpri_path + "s_form.*")
    ENDIF 
    IF !FILE(m.gcpri_path + "s_form_tab.dbf")
        COPY FILE (m.gcini_path + "views\s_form_tab.*") TO (gcpri_path + "s_form_tab.*")
    ENDIF 
    IF !FILE(m.gcpri_path + "s_form_tlac.dbf")
        COPY FILE (m.gcini_path + "views\s_form_tlac.*") TO (gcpri_path + "s_form_tlac.*")
    ENDIF 
    IF !FILE(m.gcpri_path + "s_message.dbf")
        COPY FILE (m.gcini_path + "views\s_message.*") TO (gcpri_path + "s_message.*")
    ENDIF 
    IF !FILE(m.gcpri_path + "s_pravo.dbf")
        COPY FILE (m.gcini_path + "views\s_pravo.*") TO (gcpri_path + "s_pravo.*")
    ENDIF 
    IF !FILE(m.gcpri_path + "s_tab.dbf")
        COPY FILE (m.gcini_path + "views\s_tab.*") TO (gcpri_path + "s_tab.*")
    ENDIF 
    IF !FILE(m.gcpri_path + "s_tlac.dbf")
        COPY FILE (m.gcini_path + "views\s_tlac.*") TO (gcpri_path + "s_tlac.*")
    ENDIF 
    IF !FILE(m.gcpri_path + "s_text.dbf")
        COPY FILE (m.gcini_path + "views\s_text.*") TO (gcpri_path + "s_text.*")
    ENDIF 
    IF !FILE(m.gcpri_path + "s_text_mut.dbf")
        COPY FILE (m.gcini_path + "views\s_text_mut.*") TO (gcpri_path + "s_text_mut.*")
    ENDIF 
    IF !FILE(m.gcpri_path + "s_user.dbf")
        COPY FILE (m.gcini_path + "views\s_user.*") TO (gcpri_path + "s_user.*")
    ENDIF 
*!*		IF .not. FILE(m.gcpri_path + "food600_ps.dbc")
*!*			COPY FILE (m.gcini_path + "views\food600_ps.*") TO (gcpri_path + "food600_ps.*")
*!*		ENDIF 
    OPEN DATABASE (m.gcpri_path + "frontsql") EXCLUSIVE 
    REMOVE TABLE s_appar_de
    REMOVE TABLE s_col_tab
    REMOVE TABLE s_form
    REMOVE TABLE s_form_tab
    REMOVE TABLE s_form_tlac
    REMOVE TABLE s_message
    REMOVE TABLE s_pravo
    REMOVE TABLE s_tab
    REMOVE TABLE s_tlac
    REMOVE TABLE s_text
    REMOVE TABLE s_text_mut
    REMOVE TABLE s_user
    ADD TABLE (m.gcpri_path+"s_appar_de") NAME s_appar_de
    ADD TABLE (m.gcpri_path+"s_col_tab") NAME s_col_tab
    ADD TABLE (m.gcpri_path+"s_form") NAME s_form
    ADD TABLE (m.gcpri_path+"s_form_tab") NAME s_form_tab
    ADD TABLE (m.gcpri_path+"s_form_tlac") NAME s_form_tlac
    ADD TABLE (m.gcpri_path+"s_message") NAME s_message
    ADD TABLE (m.gcpri_path+"s_pravo") NAME s_pravo
    ADD TABLE (m.gcpri_path+"s_tab") NAME s_tab
    ADD TABLE (m.gcpri_path+"s_tlac") NAME s_tlac
    ADD TABLE (m.gcpri_path+"s_text") NAME s_text
    ADD TABLE (m.gcpri_path+"s_text_mut") NAME s_text_mut
    ADD TABLE (m.gcpri_path+"s_user") NAME s_user
ENDIF
