diff --git a/Vue/gabarit.php b/Vue/gabarit.php index f5e92263..94810a18 100755 --- a/Vue/gabarit.php +++ b/Vue/gabarit.php @@ -1,432 +1,1049 @@ get_full_path($activeLink); + $fullPath = explode("\ ", $fullPath); + + $activeLevel1 = $activeLink; + $activeLevel2 = sizeof($fullPath)>1?$fullPath[1]:''; + $activeLevel3 =sizeof($fullPath)>2?$fullPath[2]:''; + $activeLevel4 = sizeof($fullPath)>3?$fullPath[3]:''; + $activeLevel5 = sizeof($fullPath)>4?$fullPath[4]:''; + + $_SESSION['firstLevelMenu']=$activeLink; + + const MAX_COMPANY_NAME_LENGTH = 20; -// Active menu tracking -$_SESSION['firstLevelMenu'] = ''; -$current_url = $_SERVER['REQUEST_URI']; -$elements = explode("/", $current_url); -$activeLink = $elements[1]; -$fullPath = $gabary->get_full_path($activeLink); -$fullPath = explode("\ ", $fullPath); - -$activeLevel1 = $activeLink; -$activeLevel2 = sizeof($fullPath) > 1 ? $fullPath[1] : ''; -$activeLevel3 = sizeof($fullPath) > 2 ? $fullPath[2] : ''; -$activeLevel4 = sizeof($fullPath) > 3 ? $fullPath[3] : ''; -$activeLevel5 = sizeof($fullPath) > 4 ? $fullPath[4] : ''; - -$_SESSION['firstLevelMenu'] = $activeLink; - -const MAX_COMPANY_NAME_LENGTH = 20; - -$companyDisplayName = htmlspecialchars($_SESSION['nomSociete'], ENT_QUOTES); -$modeDev = $_SESSION['modeDev_C']; -$imgData = $_SESSION['photoAssureCrypte']; - -// Get breadcrumb info -$infovue = $gabary->getInfosVue($_SESSION['vue']); -$_SESSION['descriptionVue'] = est_anglophone() ? $infovue['DescriptionEng'] : $infovue['Description']; -$_SESSION['titreRetour'] = est_anglophone() ? $infovue['titreRetourEng'] : $infovue['titreRetour']; -$_SESSION['retourVue'] = $infovue['lienRetour']; +/* + if (strlen($_SESSION['nomSociete']) <= MAX_COMPANY_NAME_LENGTH) { + $companyDisplayName = htmlspecialchars($_SESSION['nomSociete'], ENT_QUOTES); + } else { + $companyDisplayName = strtoupper($_SESSION['codeSociete']); + } +*/ + $companyDisplayName = htmlspecialchars($_SESSION['nomSociete'], ENT_QUOTES); + $modeDev = $_SESSION['modeDev_C']; + + $imgData = $_SESSION['photoAssureCrypte']; ?> - - - - + + +
+ + + + +