";
//echo "$ART_ARTICLE_NR ";
//echo "$ART_ARTICLE_NR_t ";
//echo "$ARL_KIND2 ";
$db = mysql_connect('localhost', 'root', 'MMeolCOM2002');
mysql_select_db('ppa',$db);
/*
$where = "where (";
if (!empty($ART_ARTICLE_NR)){
$where .= " Ref_Fournisseur like '$ART_ARTICLE_NR' or Code_EAN like '$ART_ARTICLE_NR'";
}
if (!empty($ARL_SEARCH_NUMBER)){
$where .= " or Ref_Fournisseur like '$ARL_SEARCH_NUMBER' or Code_EAN like '$ARL_SEARCH_NUMBER'";
}
if (!empty($ART_ARTICLE_NR_t)){
$where .= " or Ref_Fournisseur like '$ART_ARTICLE_NR_t' or Code_EAN like '$ART_ARTICLE_NR_t'";
}
if (!empty($ARL_KIND2)){
//$where .= " or Ref_Fournisseur like '$ARL_KIND2' or Code_EAN like '$ARL_KIND2'";
}
if (!empty($ART_ARTICLE_NR_t)){
$where .= " or Ref_Fournisseur like REPLACE('$ART_ARTICLE_NR_t', '.', '')";
}
$sql = "SELECT FORMAT(REPLACE(Prix_euro_ttc, ',', '.'),2),FORMAT(REPLACE(Prix_vente_ttc, ',', '.'),2), FORMAT(REPLACE((Montant_consigne_ht+ (Montant_consigne_ht/100)*19.6), ',', '.'),2) FROM PRIX ".$where.") and code_marque=".$SUP_ID."";
echo "$sql ";
*/
$where = "where (";
if (!empty($ART_ARTICLE_NR)){
$where .= " Ref_Fournisseur like '$ART_ARTICLE_NR'";
}
if (!empty($ART_ARTICLE_NR_t)){
$where .= " or Ref_Fournisseur like '$ART_ARTICLE_NR_t'";
}
if (!empty($ARL_KIND2) and $SUP_ID==3){
$where .= " or Ref_Fournisseur like '$ARL_KIND2'";
}
if (!empty($ARL_KIND_1_DISPLAY)){
$where .= " or Ref_Fournisseur like '$ARL_KIND_1_DISPLAY'";
}
if (!empty($ART_ARTICLE_NR_t)){
$where .= " or Ref_Fournisseur like REPLACE('$ART_ARTICLE_NR_t', '.', '')";
}
$sql = "SELECT FORMAT(REPLACE(Prix_euro_ttc, ',', '.'),2),FORMAT(REPLACE(Prix_vente_ttc, ',', '.'),2), FORMAT(REPLACE((Montant_consigne_ht+ (Montant_consigne_ht/100)*19.6), ',', '.'),2) FROM PRIX ".$where.") and code_marque=".$SUP_ID."";
//echo "$sql ";
//$sql = "SELECT FORMAT(REPLACE(Prix_euro_ttc, ',', '.'),2),FORMAT(REPLACE(Prix_vente_ttc, ',', '.'),2), FORMAT(REPLACE((Montant_consigne_ht+ (Montant_consigne_ht/100)*19.6), ',', '.'),2) FROM PRIX where Code_EAN like '$ARL_SEARCH_NUMBER' and code_marque=".$SUP_ID."";
//echo "$sql ";
$result = @mysql_query($sql);
$row=MYSQL_FETCH_ROW($result);
$prix_1 = floatval($row[0]);
$prix_2 = floatval($row[1]);
$prix_3 = floatval($row[2]);
$prix_1 = number_format($prix_1, 2, ',', ' ');
$prix_2 = number_format($prix_2, 2, ',', ' ');
$prix_3 = number_format($prix_3, 2, ',', ' ');
$prix_total = number_format($row[1]+$row[2], 2, ',', ' ');
$ssqsqssZ = "SELECT gra_sup_id, gra_id, gra_doc_type, gra_lng_id, gra_type, gra_norm, gra_supplier_nr, gra_tab_nr, gra_grd_id,
nvl(gra_tex.tex_text, gra_tex_uni.tex_text) gra_designation,
lga_sort, 2 sort
FROM tof_graphics g
JOIN tof_link_gra_art ON gra_id = lga_gra_id and lga_art_id = $id_art and lga_ctm subrange (90 CAST INTEGER) =1
left outer join tof_designations gra_des on gra_des_id nljoin gra_des.des_id and gra_des.des_lng_id = 6
left outer join tof_des_texts gra_tex on gra_des.des_tex_id nljoin gra_tex.tex_id
left outer join tof_designations gra_des_uni on gra_des_id nljoin gra_des_uni.des_id and gra_des_uni.des_lng_id = 255
left outer join tof_des_texts gra_tex_uni on gra_des_uni.des_tex_id nljoin gra_tex_uni.tex_id
where ( gra_lng_id = 6 or
( gra_lng_id = 255 and not exists (
select gra_id from tof_graphics g1 where g.gra_id = g1.gra_id and g1.gra_lng_id = 6) ) ) and
not exists (select 1 from tof_ali_coordinates ali where lga_gra_id nljoin ali.aco_gra_id and
lga_art_id nljoin ali.aco_ali_art_id and
(4 nljoin ali.aco_gra_lng_id or
(ali.aco_gra_lng_id = 255 and not exists (select 1
from tof_ali_coordinates ali_co
where ali_co.aco_gra_id = ali.aco_gra_id and
ali_co.aco_ali_art_id = ali.aco_ali_art_id and
ali_co.aco_gra_lng_id = 6))))";
$exec_Z = @odbc_exec($con,$ssqsqssZ);
$row_Z = @odbc_fetch_array($exec_Z);
$gra_grd_id = $row_Z['GRA_GRD_ID'];
$gra_tab_nr = $row_Z['GRA_TAB_NR'];
$filename = "pieces-auto_".$gra_tab_nr."/".$gra_grd_id.".jpg";
//echo $filename;
if (file_exists($filename)) {
// echo "Le fichier $filename existe.";
} else {
$filename = "logos-marques/".$SUP_ID.".jpg";
}
?>
=$ART_ARTICLE_NR?>
pouravec PlusPiecesAuto.com : vente en ligne de pièces auto d'origine à prix bas
=$ART_ARTICLE_NR?> pour d'origine pas cher avec pluspiecesauto.com" />
$selZ = "select distinct acr_art_id article_id,
null link_id,
cri_tex.tex_text crit_designation,
nvl(acr_value, value_tex.tex_text) crit_value,
nvl(' '||unit_tex.tex_text, '') crit_unit,
1 criteria_art,
cri_id,
acr_value,
cri_is_interval,
cri_successor
from tof_article_criteria
join tof_criteria
on acr_cri_id = cri_id
left outer join tof_designations cri_des
on cri_des.des_id = cri_short_des_id and
cri_des.des_lng_id = 6
left outer join tof_des_texts cri_tex
on cri_tex.tex_id = cri_des.des_tex_id
left outer join tof_designations value_des
on value_des.des_id = acr_kv_des_id and
value_des.des_lng_id = 6
left outer join tof_des_texts value_tex
on value_tex.tex_id = value_des.des_tex_id
left outer join tof_designations unit_des
on unit_des.des_id = cri_unit_des_id and
unit_des.des_lng_id = 6
left outer join tof_des_texts unit_tex
on unit_tex.tex_id = unit_des.des_tex_id
where acr_art_id in ($ART_ID) and acr_ctm subrange(90 cast integer) = 1 and acr_display = 1";
$execZ = @odbc_exec($con,$selZ);
while($rowZ = (@odbc_fetch_array($execZ))){
$crit_designation= htmlentities($rowZ['CRIT_DESIGNATION']);
$crit_value= htmlentities($rowZ['CRIT_VALUE']);
$crit_unit= htmlentities($rowZ['CRIT_UNIT']);
?>
▪
=$crit_designation?>
=$crit_value?>
=$crit_unit?>
}
?>
=$prix_2?>
€ TTC
au lieu de
=$prix_1?>
€
"0,00"){?>
* Ajouter au prix la consigne de
=$prix_3?>
€ TTC,
(soit echo"$prix_total"; ?> € TTC).
La consigne vous sera remboursée à réception de votre ancienne pièce. (Plus d'informations ?)
Référence constructeur (Numéro OEM) pour : :
=$SUP_SUP_BRAND;?>
:
=$ART_ARTICLE_NR?>
$selZ = "select bra_brand,
arl_display_nr, arl_sort, arl_block, 0 color from tof_art_lookup join tof_brands on arl_bra_id=bra_id and arl_kind='3'
where arl_art_id=$id_art and arl_ctm subrange(90 CAST INTEGER)=1 order by bra_brand, arl_block, arl_sort ";
$execZ = @odbc_exec($con,$selZ);
while($rowZ = (@odbc_fetch_array($execZ))){
$BRA_BRAND= htmlentities($rowZ['BRA_BRAND']);
$arl_display_nr= htmlentities($rowZ['ARL_DISPLAY_NR']);
?>
@odbc_close($con);
// La suite du script de mise en cache
$cachecontent = ob_get_contents();
ob_end_flush();
$fd = fopen($cachedir,'w');
if($fd){
fwrite($fd,$cachecontent);
fclose($fd);
}
} else {
include($cachedir);
}
?>