85 lines
3.5 KiB
PHP
Executable File
85 lines
3.5 KiB
PHP
Executable File
<?php
|
|
// ---------------------------------------------------
|
|
// dimensions du site
|
|
// ---------------------------------------------------
|
|
if (!isset($refresh)) $refresh='N';
|
|
if (isset($debug[9]) && $debug[9] == '1' ) { $debugMsg .= monDebug (1, ['refresh' => $refresh], '17-init.dimensions.php'); }
|
|
if (empty($_SESSION['dimensionsVal']) or ($refresh==='Oui')) {
|
|
$i=0;
|
|
$reqSelect="SELECT * FROM sitedimensions order by id;";
|
|
if (isset($debug[9]) && $debug[9] == '1' ) { $debugMsg .= monDebug (1, ['reqSelect' => $reqSelect], '');}
|
|
$resConn=$idPdo->query($reqSelect);
|
|
// si la requête a fonctionnée
|
|
if ($resConn) {
|
|
while($tabResult=$resConn->fetch(PDO::FETCH_ASSOC)) {
|
|
|
|
$dimensionsVal[$i]=$tabResult['val'];
|
|
$dimId[$i]=$tabResult['id'];
|
|
|
|
// largeur du site
|
|
// $tableSiteWidth="800px";
|
|
if ($dimId[$i]==1) {$tableSiteWidth= $dimensionsVal[$i];$_SESSION['tableSiteWidth']= $dimensionsVal[$i];}
|
|
|
|
// largeur menu gauche si existe
|
|
// $tableMenuGaucheWidth="200";
|
|
if ($dimId[$i]==2) {$tableMenuGaucheWidth= $dimensionsVal[$i];$_SESSION['tableMenuGaucheWidth']= $dimensionsVal[$i];}
|
|
|
|
// largeur des pages/forms/titres sans partie droite
|
|
if ($dimId[$i]==3) {$tableTitresWidth= $dimensionsVal[$i];$_SESSION['tableTitresWidth']= $dimensionsVal[$i];}
|
|
|
|
// largeur de table pub si existe
|
|
// $tablePubWidth="200";
|
|
if ($dimId[$i]==4) {$tablePubWidth= $dimensionsVal[$i];$_SESSION['tablePubWidth']= $dimensionsVal[$i];}
|
|
|
|
// hauteur standard de tables
|
|
if ($dimId[$i]==5) {$tableHeigth= $dimensionsVal[$i];$_SESSION['tableHeigth']= $dimensionsVal[$i];}
|
|
|
|
// hauteur des champs standard
|
|
if ($dimId[$i]==6) {$champsHaut= $dimensionsVal[$i];$_SESSION['champsHaut']= $dimensionsVal[$i];}
|
|
|
|
// hauteur du site
|
|
if ($dimId[$i]==7) {$siteHeigh= $dimensionsVal[$i];$_SESSION['siteHeigh']= $dimensionsVal[$i];}
|
|
|
|
// hauteur entete
|
|
if ($dimId[$i]==8) {$enteteHeight= $dimensionsVal[$i];$_SESSION['enteteHeight']= $dimensionsVal[$i];}
|
|
|
|
// hauteur page accueil
|
|
if ($dimId[$i]==9) {$accueilHeight= $dimensionsVal[$i];$_SESSION['accueilHeight']= $dimensionsVal[$i];}
|
|
|
|
// hauteur pages/form sans partie droite
|
|
if ($dimId[$i]==10) {$formHeight= $dimensionsVal[$i];$_SESSION['formHeight']= $dimensionsVal[$i];}
|
|
|
|
$i++;
|
|
|
|
}
|
|
$_SESSION['dimensionsVal']= $dimensionsVal;
|
|
$tabResult='';
|
|
if (isset($debug[9]) && $debug[9] == '1' ) { $debugMsg .= monDebug (1,['session re-chargée' => 'Oui'],'');}
|
|
}
|
|
else {
|
|
echo 'pb requete dimensions dans initSessLg.php -> la requete a échouée';
|
|
}
|
|
}
|
|
else {
|
|
if (isset($debug[9]) && $debug[9] == '1' ) { $debugMsg .= monDebug (1,['session déjà chargée' => 'Oui'],'');}
|
|
$dimensionsVal=$_SESSION['dimensionsVal'];
|
|
}
|
|
|
|
// ---------------------------------------------------
|
|
// Debug
|
|
// ---------------------------------------------------
|
|
if (isset($debug[10]) && $debug[10] == '1' ) {
|
|
$debugMsg .= monDebug (1,
|
|
[
|
|
'tableSiteWidth' => $_SESSION['tableSiteWidth'],
|
|
'tableMenuGaucheWidth' => $_SESSION['tableMenuGaucheWidth'],
|
|
'tableTitresWidth' => $_SESSION['tableTitresWidth'],
|
|
'tablePubWidth' => $_SESSION['tablePubWidth'],
|
|
'tableHeigth' => $_SESSION['tableHeigth'],
|
|
'champsHaut' => $_SESSION['champsHaut'],
|
|
'siteHeight' => $_SESSION['enteteHeight'],
|
|
'accueilHeight' => $_SESSION['accueilHeight'],
|
|
'formHeight' => $_SESSION['formHeight']
|
|
],'');
|
|
}
|
|
?>
|