alpha_full/pages/panier/panier.form.php
2026-04-06 22:58:51 +02:00

154 lines
7.6 KiB
PHP
Executable File

<style>
#menuIndep-container, #menuD-container, #header-container {z-index: 3;}
</style>
<?php
if (isset($debug[1]) && $debug[1] == '1' ) { $debugMsg .= '<br><b>JE PASSE DANS FORM PANIER</b>'; }
echo '<form name="formPanier" id="formPanier" method="POST" >';
// ---------------------------------------------------
// Champs cachés
// ---------------------------------------------------
echo '<input type="hidden" name="codeOpe" id="codeOpe" value="0" >';
if ( $affMContext === true ) echo '<div id="tablePages" style="cursor:context-menu" ' .$mouseOverMenuContextContainer. ' onContextMenu="return mConStyle(this, \'Transverses site\', \'tablePages\', 1,\'cde\', 4, 0, event);" >';
else echo '<div id="tablePages" >';
if ($idMail=='' && isset ($_SESSION['idMail'])) {$idMail=$_SESSION['idMail'];}
if (isset($debug[1]) && $debug[1] == '1') { $debugMsg .= monDebug (1,[
'totalHtCde ' => $totalHtCde,
'totalTtcCde ' =>$totalTtcCde,
'totalCde ' =>$totalCde,
'idMail ' => $idMail ],'panier.form.php');
}
// ---------------------------------------------------
// Titre de la page
// ---------------------------------------------------
// msg titre ==> Mon panier
// ---------------------------------------------------
echo '<h1 class="panierTitre" >';
dynamiqItemImage (0,0,'panierTitre', 'span', '-action-','menu', 13, 'icones', '-textClass-','-varStyle-');
echo '</h1>';
// on est obligé de refaire une requete s'il y a eu un codeOpe
// a terme mettre le panier en session
$trouvePanier=false;
$step=2;
include ("_reqPanier/panier.reqSelectCde.php");
if ( $affMContext === true ) echo '<div class="tablePanier" ' .$mouseOverMenuContextContainer. ' onContextMenu="return mConStyle(this, \'Panier\', \'tablePanier\', 1,\'cde\', 4, 0, event);" >';
else echo '<div class="tablePanier" >';
if ($trouvePanier==true) {
// ---------------------------------------------------
// Affichage des entetes de ligne
// ---------------------------------------------------
if ( $affMContext === true ) echo '<div id="syntheseLignes" class="notInResponsive" style="display:flex; flex-direction:column; width:100%; cursor:context-menu" ' .$mouseOverMenuContextContainer. ' onContextMenu="return mConStyle(this, \'Panier\', \'syntheseLignes\', 2,\'cde\', 4, 21, event);" >';
else echo '<div id="syntheseLignes" class="notInResponsive" style="display:flex; flex-direction:column; width:100%; " >';
echo '<div class="notInResponsive" style="display:flex; grid-column:1 / span 5; width:100%; " >';
// ---------------------------------------------------
// Image
// ---------------------------------------------------
dynamiqItemMessage(0, 1, 'libPanierCell notInResponsive', 'grid-column: 1 / span 2; grid-row:1; text-align:center; align-items:center; ', 'div', 'libPanier', '-action-', '-', '', ' ' );
// ---------------------------------------------------
// Nom
// ---------------------------------------------------
dynamiqItemMessage(0, 1, 'libPanierCell notInResponsive', 'grid-column: 1 / span 2; grid-row:1; text-align:center; align-items:center; ', 'div', 'libPanier', '-action-', 'cde', 21, '-' );
// ---------------------------------------------------
// Réduction
// ---------------------------------------------------
dynamiqItemMessage(0, 1, 'libPanierCell notInResponsive', 'grid-column: 3; grid-row:1; ', 'div', 'libPanier', '-action-', 'cde', 28, '-' );
// ---------------------------------------------------
// Prix HT --> pas de place pour responsive
// ---------------------------------------------------
dynamiqItemMessage(0, 1, 'libPanierCell notInResponsive', 'grid-column: 4; grid-row:1; ', 'div', 'libPanier', '-action-', 'cde', 25, '-' );
// ---------------------------------------------------
// Quantité
// ---------------------------------------------------
dynamiqItemMessage(0, 1, 'libPanierCell notInResponsive', 'grid-column: 4; grid-row:1; ', 'div', 'libPanier', '-action-', 'cde', 26, '-' );
// ---------------------------------------------------
// Total TTC
// ---------------------------------------------------
dynamiqItemMessage(0, 1, 'libPanierCell notInResponsive', 'grid-column: 5; grid-row:1; ', 'div', 'libPanier', '-action-', 'cde', '0', '-' );
echo '</div>';
// ligne de séparation
include ("_reqPanier/panier.reqSelectLignes.php");
if (!empty($idLgCdeTab)) {
if (isset($_SESSION['nbArt'])) {$nbArt=$_SESSION['nbArt']; };
include ("panier.affLignes.php");
}// panier pas vide
echo '</div>'; //syntheseLignes
// ---------------------------------------------------
// Bloc synthèse
// ---------------------------------------------------
include ("panier.affCde.php");
// ---------------------------------------------------
// Bloc valider
// ---------------------------------------------------
if ($nbArt!=0) {
if (isset($_SESSION['connected']) && $_SESSION['connected']=='O') {
// Saisir adresse Fact
$etape=3;
$action='adresse-fact-' .$etape. '';
}
else {
// se connecter + redirect vers appel
$etape=2;
$appel=10;
$_SESSION['appel']=$appel;
$action='connection';
}
}
echo '<div style="grid-column : 1 / span 4; text-align:center; padding:8px; margin:10px;" class="flexToColumn" >';
// ---------------------------------------------------
// Btn d'autres achats
// ---------------------------------------------------
dynamiqItemImage (0, 0, 'boutons', 'div', 'onClick="window.location=\'./index.php\'; "', 'bouton', 17, 'icones', '-textClass-', 'margin:2%;');
// ---------------------------------------------------
// Btn continuer si nb art > 0
// ---------------------------------------------------
if ($nbArt!=0 ) dynamiqItemImage (0, 0, 'boutons', 'div', 'onClick="window.location=\'' .$action. '\'; "', 'bouton', 5, 'icones', '-textClass-', 'margin:2%;');
echo '</div>';
// ---------------------------------------------------
// Recap des etapes
// ---------------------------------------------------
$etape=1;
include ("./pages/panier/etapes.php");
}//panier existe
else {
if ( $affMContext === true ) echo '<div id="syntheseLignes" style="margin:auto;grid-column:1 / span 4; cursor:context-menu" ' .$mouseOverMenuContextContainer. ' onContextMenu="return mConStyle(this, \'Panier\', \'syntheseLignes\', 2,\'cde\', 4, 62, event);" >';
else echo '<div id="syntheseLignes" style="margin:auto;grid-column:1 / span 4; " >';
echo '<div class="flexToColumn" style="margin:auto;grid-column:1 / span 4;" >';
// msg ==> pas de panier // panier vide
dynamiqItemMessage(0, 1, 'msgPanier', '-styleDiv-', 'span', 'msgKo', '-action-', 'cde', 62, '-' );
// echo '&#160; &#160; &#160; ';
// ---------------------------------------------------
// Btn d'autres achats
// ---------------------------------------------------
echo '<br>';
dynamiqItemImage (0, 1, 'boutons', 'div', 'onClick="window.location=\'./index.php\'; "', 'bouton', 17, 'icones', '-textClass-', '-');
echo '<br>';
echo '</div>';
echo '</div>';
}
echo '</div>'; //table panier
echo '</div>'; //page
echo '</form>';
?>