alpha_full/admin/agencement/optionsPres/optionsColonne.reqUpdate.php
2026-04-06 22:58:51 +02:00

62 lines
2.4 KiB
PHP
Executable File

<?php
$nomFicAppelant = basename(__FILE__);
if (isset($theOption)) {
// -----------------------------------------------------
// Requete update nombre de colonnes sur themes
// -----------------------------------------------------
if ($theOption!='' && isset($_SESSION['nomThemeCss'])) {
$reqUpdate="UPDATE `cssthemes` SET affNbColones=" .$theOption. " WHERE nom='" .$_SESSION['nomThemeCss']. "';";
if (isset($debug[2]) && $debug[2] == '1') $debugMsg .= monDebug(2,['reqUpdate' => $reqUpdate],'optionsColonne.reqUpdate.php');
$resConn=$idPdo->query($reqUpdate) ;
if ($resConn)
{$admMsg .= 'Nombre de colonnes mis à jour à : ' .$theOption. ' avec succès ! ';$admMsgClass='ok';}
else {
$admMsg .= 'Erreur lors de la mise à jour du nombre de colonnes.';
$erreur = $idPdo->errorInfo();
if (isset($debug[2]) && $debug[2] == '1') $debugMsg .= $monDebug(2,['Erreur mysql' => $erreur[2] ],'');
$admMsgClass='ko';
}
}
// -----------------------------------------------------
// Requete update style tableCatalogue
// -----------------------------------------------------
$resConn='';
switch ($theOption) {
case '1':
$gondWidth='99%';
$reqUpdate="UPDATE `" .$_SESSION['nomThemeCss']. "` SET width='" .$gondWidth. "' WHERE nom='tableCatalogue';";
break;
case '2':
$gondWidth='49%';
$reqUpdate="UPDATE `" .$_SESSION['nomThemeCss']. "` SET width='" .$gondWidth. "' WHERE nom='tableCatalogue';";
break;
case '3':
$gondWidth='32%';
$reqUpdate="UPDATE `" .$_SESSION['nomThemeCss']. "` SET width='" .$gondWidth. "' WHERE nom='tableCatalogue';";
break;
case '4':
$gondWidth='24%';
$reqUpdate="UPDATE `" .$_SESSION['nomThemeCss']. "` SET width='" .$gondWidth. "' WHERE nom='tableCatalogue';";
break;
default:
$gondWidth='49%';
$reqUpdate="UPDATE `" .$_SESSION['nomThemeCss']. "` SET width='" .$gondWidth. "' WHERE nom='tableCatalogue';";
break;
}
$resConn=$idPdo->query($reqUpdate) ;
if ($resConn)
{$admMsg .= 'Style tableCatalogue mis à jour avec succès pour ' .$_SESSION['nomThemeCss']. '! ';$admMsgClass='ok';}
else {
$admMsg .= 'Erreur lors de la mise à jour du Style tableCatalogue.';
$erreur = $idPdo->errorInfo();
if (isset($debug[2]) && $debug[2] == '1') $debugMsg .= $monDebug(2,['Erreur mysql' => $erreur[2] ],'');
$admMsgClass='ko';
}
}
?>