diff --git a/Controleur/ControleurAjaxconnexioncookie.php b/Controleur/ControleurAjaxconnexioncookie.php index e9ccac2..19700f2 100755 --- a/Controleur/ControleurAjaxconnexioncookie.php +++ b/Controleur/ControleurAjaxconnexioncookie.php @@ -41,6 +41,8 @@ class ControleurAjaxconnexioncookie extends Controleur } } + $afficherLogoSociete = $this->societeuser->get_afficher_logo_societe($codeSociete); + $this->genererVueAjax ( array @@ -52,7 +54,8 @@ class ControleurAjaxconnexioncookie extends Controleur 'codeSocieteUnique' => $codeSocieteUnique, 'userUnique' => $userUnique, 'codeSociete' => $codeSociete, - 'codeUtilisateur' => $codeUtilisateur + 'codeUtilisateur' => $codeUtilisateur, + 'afficherLogoSociete' => $afficherLogoSociete, ) ); } diff --git a/Framework/Functions.php b/Framework/Functions.php index 12417b8..9cb3116 100755 --- a/Framework/Functions.php +++ b/Framework/Functions.php @@ -1,1112 +1,1660 @@ -format($number))); -} - -function format_N($nombre) -{ - if (is_numeric($nombre)) - { - return number_format($nombre, 0, ',', ' '); - } else - { - // return "0"; - return ""; - } -} - -function heureFr($d) -{ - if ($d<="0000-00-00") return ""; - return date("d/m/Y", strtotime($d)); -} - -function dateFr($d) -{ - if ($d<="0000-00-00") return ""; - return date("d/m/Y", strtotime($d)); -} - -function dateEng($d) -{ - if ($d<="0000-00-00") return ""; - return date("m/d/Y", strtotime($d)); -} - -function dateLang($d, $lang=null) -{ - if (isset($lang) && $lang=="en_US") - { - // return dateEng($d); - return dateFr($d); - } - else - { - return dateFr($d); - } -} - -function dateheureFr($d) -{ - if ($d<="0000-00-00") return ""; - return date("d/m/Y", strtotime($d)).' '.substr($d,-8); -} - -function dateheureEng($d) -{ - if ($d<="0000-00-00") return ""; - return date("m/d/Y", strtotime($d)).' '.substr($d,-8); -} - -function dateheureLang($d, $lang=null) -{ - if (isset($lang) && $lang=="en_US") - { - // return dateheureEng($d); - return dateheureFr($d); - } - else - { - return dateheureFr($d); - } -} - -function heureCourante() -{ - return date("d/m/Y H:i:s"); -} - -function heureCouranteLang($lang=null) -{ - if (isset($lang) && $lang=="en_US") - { - // return heureCouranteEng(); - return heureCouranteFr(); - } - else - { - return heureCouranteFr(); - } -} - -function heureCouranteFr() -{ - return date("d/m/Y H:i:s"); -} - -function heureCouranteEng() -{ - return date("m/d/Y H:i:s"); -} - -function dateCouranteLang($lang=null) -{ - if (isset($lang) && $lang=="en_US") - { - // return dateCouranteEng(); - return dateCouranteFr(); - } - else - { - return dateCouranteFr(); - } -} - -function dateToFrench($date, $format) -{ - $english_days = array('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'); - $french_days = array('lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche'); - $english_months = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); - $french_months = array('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'); - return str_replace($english_months, $french_months, str_replace($english_days, $french_days, date($format, strtotime($date) ) ) ); -} -function dateCouranteFr() -{ - return date('d/m/Y'); -} - -function dateCouranteEng() -{ - return date("m/d/Y"); -} - -function heureCouranteSql() -{ - return date("Y-m-d H:i:s"); -} - -function dateJourSql() -{ - return date("Y-m-d"); -} - - -function existeParam($param) -{ - return (($param!==null) && ($param != "")); -} - -function contruireParam($param) -{ - return ($param == null) ? "" : trim($param); -} - -function contruireParamLike($param) -{ - $p=($param == null) ? "" : trim($param); - return "%".$p."%"; -} - -function liste_options($liste,$val_def,$strict=false) -{ - // '; - } - else - { - $select = $strict ? '' : ''; - } - - foreach ($liste as $option): - $select .= ' '; - if (isset($_SESSION['lang']) && $_SESSION['lang']=="en_US") - { - $select = $strict ? '' : ''; - } - else - { - $select = $strict ? '' : ''; - } - - foreach ($liste as $option): - $select .= '