147 lines
5.0 KiB
PHP
Executable File
147 lines
5.0 KiB
PHP
Executable File
<?php
|
|
if (empty($idPrdRech)) {
|
|
if (!empty($idPrd)) {$idPrdRech=$idPrd;}
|
|
else
|
|
if (!empty($tabIdPrd[0])) {$idPrdRech=$tabIdPrd[0];}
|
|
}
|
|
|
|
// ------------------------------------------------------
|
|
// gestion des deplacement depuis la page article
|
|
// on avance de + ou - 1 selon recordset
|
|
// ------------------------------------------------------
|
|
if (isset($codeOpeDeplacement) && $codeOpeDeplacement!="") {
|
|
$trouve=false;
|
|
$NB=count($tabIdPrd);
|
|
|
|
if (isset($debug[1]) && $debug[1] == '1' ) { $debugMsg .= monDebug(1, ['code deplacement' => $codeOpeDeplacement, 'NB articles' => $NB ],'reqSelectPrd.php');}
|
|
|
|
for($n=0; $n < $NB; $n++) {
|
|
if ($idPrdRech==$tabIdPrd[$n] && $trouve == false) {
|
|
if (isset($debug[1]) && $debug[1] == '1' ) { $debugMsg .= monDebug(1, ['idPrdRech' => $idPrdRech ],'');}
|
|
if ($codeOpeDeplacement=="plus" ) {
|
|
if ($n < $NB-1 ) { $idPrdRech=$tabIdPrd[(int)$n+1]; }
|
|
else { $idPrdRech=$tabIdPrd[0]; }
|
|
}
|
|
|
|
if ($codeOpeDeplacement=="moins" ) {
|
|
if ($n > 0 ) { $idPrdRech=$tabIdPrd[$n-1]; }
|
|
else { $idPrdRech=$tabIdPrd[$NB-1]; }
|
|
}
|
|
$trouve=true;
|
|
}
|
|
if (isset($debug[1]) && $debug[1] == '1' ) $debugMsg .= monDebug(1, ['<br>n' => $n, 'idPrdRech' => $idPrdRech, 'tabIdPrd' => $tabIdPrd[$n] ],'');
|
|
}
|
|
if (isset($debug[1]) && $debug[1] == '1' ) $debugMsg .= monDebug(1, ['trouve' => $trouve], '');
|
|
}
|
|
|
|
// ------------------------------------------------------
|
|
// Requete
|
|
// ------------------------------------------------------
|
|
if (!empty($idPrdRech && $idPrdRech!="" )) {
|
|
require_once($includePath. "/_fonctions/fonctions.gene.php");
|
|
if ($lg=='')$lg='FRA';
|
|
// $reqSelect="SELECT * FROM `produits` WHERE idPrd=" .$idPrdRech. "";
|
|
$tabResult= dynRequete_select('SELECT', 'produits', ['*'], ['idPrd' =>$idPrdRech], '', 'reqSelectPrd.php', 0, $debug[2],'tabResult');
|
|
if ($tabResult) {
|
|
foreach ($tabResult as $i => $row) {
|
|
|
|
$idPrd = $row['idPrd'];
|
|
$refPrd = $row['refPrd'];
|
|
if (empty($tabRefPrd[0])) $tabRefPrd[0]=$refPrd;
|
|
$lienImgPrdPt = $row['lienImagePt'];
|
|
$lienImageGd = $row['lienImageGd'];
|
|
$nouveaute = $row['new'];
|
|
$promo = $row['promo'];
|
|
$promo=formatNB($promo,$lg);
|
|
|
|
$gondole = $row['gondole'];
|
|
$prixHt = $row['prixHt'];
|
|
$prixHt=(float)$prixHt;
|
|
$prixHt=formatNB($prixHt,$lg);
|
|
|
|
$prixTtc = $row['prixTtc'];
|
|
$prixTtc=(float)$prixTtc;
|
|
$prixTtc=formatNB($prixTtc,$lg);
|
|
|
|
$idTVA = $row['tva'];
|
|
$idFam = $row['idFam'];
|
|
$idCat = $row['idCat'];
|
|
$idEtat = $row['idEtat'];
|
|
$delais = $row['delais'];
|
|
$poids = $row['poids'];
|
|
$poids=formatNB($poids,$lg);
|
|
|
|
$uniteDelais = $row['uniteDelais'];
|
|
$unitePoids = $row['unitePoids'];
|
|
$annee = $row['annee'];
|
|
$stock = $row['stock'];
|
|
$idPaysPrd = $row['idPaysPrd'];
|
|
|
|
$idMailVendeur = $row['idMailPrd'];
|
|
|
|
$couleur1 = $row['couleur1'];
|
|
$couleur2 = $row['couleur2'];
|
|
$couleur3 = $row['couleur3'];
|
|
$idLargeur = $row['idLargeur'];
|
|
$idLargeur=formatNB($idLargeur,$lg);
|
|
|
|
$uniteLarg = $row['uniteLarg'];
|
|
$idHauteur = $row['idHauteur'];
|
|
$idHauteur=formatNB($idHauteur,$lg);
|
|
|
|
$uniteHaut = $row['uniteHaut'];
|
|
$idLongueur = $row['idLongueur'];
|
|
$idLongueur=formatNB($idLongueur,$lg);
|
|
|
|
$uniteLong = $row['uniteLong'];
|
|
$idDates = $row['idDates'];
|
|
|
|
// pas de quantité sur les caracteristiques dynamiques pour le moment
|
|
$idType1 = $row['idType1'];
|
|
$idType2 = $row['idType2'];
|
|
$idType3 = $row['idType3'];
|
|
$idType4 = $row['idType4'];
|
|
$idType5 = $row['idType5'];
|
|
$idType6 = $row['idType6'];
|
|
$idType7 = $row['idType7'];
|
|
$idType8 = $row['idType8'];
|
|
$idType9 = $row['idType9'];
|
|
$idType10 = $row['idType10'];
|
|
$idType11 = $row['idType11'];
|
|
$idType12 = $row['idType12'];
|
|
$idType13 = $row['idType13'];
|
|
$idType14 = $row['idType14'];
|
|
$idType15 = $row['idType15'];
|
|
$idType16 = $row['idType16'];
|
|
$idType17 = $row['idType17'];
|
|
$idType18 = $row['idType18'];
|
|
$idType19 = $row['idType19'];
|
|
$idType20 = $row['idType20'];
|
|
$idType21 = $row['idType21'];
|
|
$idType22 = $row['idType22'];
|
|
$idType23 = $row['idType23'];
|
|
|
|
$lienImgGauche = $row['lienImgGauche'];
|
|
$lienImgDroite = $row['lienImgDroite'];
|
|
$lienImgDessus = $row['lienImgDessus'];
|
|
$lienImgDessous = $row['lienImgDessous'];
|
|
$lienVideo = $row['lienVideo'];
|
|
$lienNotice = $row['lienNotice'];
|
|
$statusPrd = $row['statusPrd'];
|
|
|
|
if (isset($debug[2]) && $debug[2] == '1' ) $debugMsg .= monDebug(2, ['idPrd = ' .$idPrd.' image' => $lienImgPrdPt], '');
|
|
|
|
// doit retourner le nomPrd
|
|
$idPrdRech=$idPrd;
|
|
include ("reqSelectPrdLib.php");
|
|
}
|
|
}
|
|
else {
|
|
$admMsg .= "Il est impossible de retrouver les données article pour l'article " .$idPrdRech. "."; $admMsgClass='ko';
|
|
}
|
|
}
|
|
else {
|
|
$admMsg .= "Nous sommes désolés, les données article ne peuvent pas être affichées."; $admMsgClass='ko';
|
|
}
|
|
|
|
?>
|