<?php

define("PWA", 1);

define("TIME_ZONE", "Europe/Paris");

// Dossier Root
define("DIR_PHP_CLASS", DOCUMENT_ROOT . "core/class/");
define("DIR_PHP_VIEWS", DOCUMENT_ROOT . "core/views/");
define("DIR_PHP_VIEWS_PAGE", DOCUMENT_ROOT . "core/views/pages/");
define("DIR_PHP_LAYOUTS", DOCUMENT_ROOT . "core/controllers/");
define("DIR_PHP_SUBMIT", DOCUMENT_ROOT . "core/submit/");
define("DIR_PHP_LIBS", DOCUMENT_ROOT . "core/libs/");
define("DIR_PHP_JAVASCRIPT", DOCUMENT_ROOT . "core/javascript/");
define("DIR_DATAS_JSONDATA", DOCUMENT_ROOT . "core/json/");
define("DIR_TEMPLATE_EMAILS", DOCUMENT_ROOT . "core/views/templates/emails/");
define("DIR_PRINT", DOCUMENT_ROOT . "core/print/");
define("DIR_MAJ", DOCUMENT_ROOT . "maj/");

// Dossier Data
define("DIR_DATAS", DOCUMENT_DATAS . "datas/");
define("DIR_DATAS_JSON", DOCUMENT_DATAS . "datas/json/");
define("DIR_DATAS_FILES", DOCUMENT_DATAS . "datas/files/");
define("DIR_DATAS_DOCS", DOCUMENT_DATAS . "datas/documents/");
define("SFTP_LOCAL", DOCUMENT_DATAS . "datas/sftp/");
define("DIR_TEMP", DOCUMENT_DATAS . "tmp/");
define("DIR_BACKUP", DOCUMENT_DATAS . "backups/");

// Tables base de données
define("DB_T_CONFIG", "config");
define("DB_T_USER", "user");
define("DB_T_USER_TAGS", "user_tags");
define("DB_T_SALARIES", "salaries");
define("DB_T_TEMP_SALARIES", "tmp_salaries");
define("DB_T_ENTREE_SORTIE", "entree_sortie");
define("DB_T_EXCEL", "excelRH");
define("DB_T_EVENTS", "evenement");
define("DB_T_EVENTS_INSCRITS", "evenement_salaries");
define("DB_T_SALARIES_PROWEB", "salariesProweb");
define("DB_T_EXCEL_PROWEB", "excelProweb");
define("DB_T_FILES", "files");
define("DB_T_LOTTERY", "lottery");
define("DB_T_LOTTERY_INSCRITS", "lottery_salaries");
define("DB_T_HISTORIQUE", "historique");
define("DB_T_HISTORIQUE_REF", "historiqueRef");
define("DB_T_BANQUE_COMPTES", "banque_comptes");
define("DB_T_BANQUE_LIGNES", "banque_lignes");
define("DB_T_BANQUE_CSV", "banque_csv");
define("DB_T_ACCESS", "access");
define("DB_T_DOCUMENTS", "documents");
define("DB_T_DOCUMENT_FILES", "documents_files");
define("DB_T_DOCUMENT_TAGS", "documents_tags");
define("DB_T_TAGS", "tags");

define("DB_T_ALERTES_EMAILS", "alertesEmails");
define("DB_T_TYPE_TAGS", "type_tags");
define("DB_T_TYPE_USER", "type_user");
define("DB_T_TYPE_DOCUMENT", "type_document");
define("DB_T_TYPE_ACCESS", "type_access");

define("HOME_TYPE_USER", array(
    1 =>    [ // Administrateur
                "home" => "rh-liste-salaries",
            ],
    2 =>    [ // Contrôleur QRCode (émargement)
                "home" => NULL
            ],
    3 =>    [ // Assistance sociale
                "home" => "sociale-check-salarie",
            ],
    4 =>    [ // Modérateur du CMS
                "home" => "rh-liste-salaries",
            ],
    5 =>    [ // Membre du Bureau du CSE
                "home" => "rh-liste-salaries",
            ],
    6 =>    [ // Elu du CSE
                "home" => "rh-liste-salaries",
            ],
    7 =>    [ // Comptable
                "home" => "compte-historique-csv",
            ],
));

// Liens utiles
define("FICHE_SALARIE_PROWEB", "https://www.cse-invent.com/gestion/beneficiaire/od/edit/");

// Emargement
define("EMEMARGEMENT_END", 1800); // Possibilité de s'émarger 1800 secondes soit 30 minutes après l'évènements

// Backup
define("BACKUP_LIMIT", 15); // nombre de backup max

// Email
define("EMAIL_SMTP_HOST", "ssl0.ovh.net");
define("EMAIL_SMTP_USER", "cms@cse-invent.com");
define("EMAIL_SMTP_PASSWORD", "3gK!LYj&9xa!Y");
define("EMAIL_SMTP_PORT", 465); // TLS par défaut 587, pour SSL utiliser 465
define("EMAIL_SMTP_SECURE", "ssl"); // TLS par défaut en port 587, pour SSL utiliser 465

define("EMAIL_FROM_EMAIL", "cms@cse-invent.com");
define("EMAIL_FROM_NAME", "CMS CSE Invent");

// Sécurité
define("NB_ALERT_AUTHENTICATOR", 3);