1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
| <?php
session_start();
date_default_timezone_set('Europe/Brussels');
require_once("connexionMysql.inc.php");
$retour = "";
if (isset($_REQUEST['item_id'])) {
$query = mysql_query("SELECT * FROM monture_data".
" WHERE ref_monture=".$_REQUEST['item_id']);
$back = mysql_fetch_assoc($query);
$reference = trim($back['ref_monture']);
$finition = trim($back['finition']);
$modele = trim($back['modele']);
$carat = trim($back['carat']);
$descriptif = trim($back['descriptif']);
$jourdelai = trim($back['delai_fournisseur']);
$largeurmin = trim($back['anneau_largeur_min']);
$largeurmax = trim($back['anneau_largeur_max']);
$epaisseur = trim($back['anneau_epaisseur']);
$typesolitaire = trim($back['type_solitaire']);
$nbpierrescotes = trim($back['nbre_pierres_cotes']);
$nbpierresdessus = trim($back['nbre_pierres_dessus']);
$nbpierrestotal = trim($back['nbre_pierres_total']);
$prixfullht = trim($back['PV_full_HT']);
$prixfullttc = trim($back['PV_full_TTC']);
$prixht = trim($back['PV_HT']);
$prixttc = trim($back['PV_TTC']);
$max_carat_rond = trim($back['max_carat_rond']);
$max_carat_marquise = trim($back['max_carat_marquise']);
$max_carat_emeraude = trim($back['max_carat_emeraude']);
$max_carat_radiant = trim($back['max_carat_radiant']);
$max_carat_ovale = trim($back['max_carat_ovale']);
$max_carat_poire = trim($back['max_carat_poire']);
$max_carat_coeur = trim($back['max_carat_coeur']);
$max_carat_aascher = trim($back['max_carat_aascher']);
$max_carat_cs = trim($back['max_carat_cs']);
$max_carat_autre = trim($back['max_carat_autre']);
$compatible = "";
if ($max_carat_rond != "") {
$compatible .= "Rond jusque ".number_format($max_carat_rond,2,",",".")." cts<br>";
}
if ($max_carat_marquise != 0) {
$compatible .= "Marquise jusque ".$max_carat_marquise." cts<br>";
}
if ($max_carat_emeraude != 0) {
$compatible .= "Emeraude jusque ".number_format($max_carat_emeraude,2,",",".")." cts<br>";
}
if ($max_carat_radiant != 0) {
$compatible .= "Radiant jusque ".number_format($max_carat_radiant,2,",",".")." cts<br>";
}
if ($max_carat_ovale != 0) {
$compatible .= "Ovale jusque ".number_format($max_carat_ovale,2,",",".")." cts<br>";
}
if ($max_carat_poire != 0) {
$compatible .= "Poire jusque ".number_format($max_carat_poire,2,",",".")." cts<br>";
}
if ($max_carat_coeur != 0) {
$compatible .= "Coeur jusque ".number_format($max_carat_coeur,2,",",".")." cts<br>";
}
if ($max_carat_aascher != 0) {
$compatible .= "Aascher jusque ".number_format($max_carat_aascher,2,",",".")." cts<br>";
}
if ($max_carat_cs != 0) {
$compatible .= "CS jusque ".number_format($max_carat_cs,2,",",".")." cts<br>";
}
if ($max_carat_autre != 0) {
$compatible .= "Autre jusque ".number_format($max_carat_autre,2,",",".")." cts<br>";
}
if ($compatible != "") {
$compatible = substr($compatible, 0, -4);
} else {
$compatible = "nc";
}
switch ($finition){
case "YG":
$metal = "Or jaune";
break;
case "WG":
$metal = "Or blanc";
break;
case "PT":
$metal = "Platine";
break;
default:
$metal = "nc";
break;
}
if ($jourdelai != "") {
if ($jourdelai < 2) {
$jourdelai .= " jour";
} else {
$jourdelai .= " jours";
}
} else {
$jourdelai .= "nc";
}
if ($carat == "") {
$carat = "nc";
} else {
$carat = number_format($carat,2,",",".")." cts";
}
if ($largeurmin == "") {
$largeurmin = "nc";
} else {
$largeurmin = number_format($largeurmin,2,",",".")." mm";
}
if ($largeurmax == "") {
$largeurmax = "nc";
} else {
$largeurmax = number_format($largeurmax,2,",",".")." mm";
}
if ($epaisseur == "") {
$epaisseur = "nc";
} else {
$epaisseur = number_format($epaisseur,2,",",".")." mm";
}
$retour .= "<table cellpadding='0' cellspacing='0' border='0'>";
$retour .= "<tr>";
$retour .= "<td colspan='2' class='c10 bold'>".$modele."</td>";
$retour .= "</tr>";
$retour .= "<tr>";
$retour .= "<td colspan='2' class='c10 bold'>".$descriptif."<br> </td>";
$retour .= "</tr>";
$retour .= "<tr>";
$retour .= "<td colspan='2' class='c12 souligne titre'>INFORMATIONS SUR LA SERTISSURE</td>";
$retour .= "</tr>";
$retour .= "<tr height='23' valign='bottom'>";
$retour .= "<td width='76' class='c10 souligne bold'>Référence :</td>";
$retour .= "<td width='150' class='c10 souligne' align='right'>".number_format($reference,0,"",".")."</td>";
$retour .= "</tr>";
$retour .= "<tr>";
$retour .= "<td width='76' class='c10 souligne bold'>Métal :</td>";
$retour .= "<td width='150' class='c10 souligne' align='right'>".$metal."</td>";
$retour .= "</tr>";
$retour .= "<tr>";
$retour .= "<td width='76' class='c10 souligne bold'>Carats :</td>";
$retour .= "<td width='150' class='c10 souligne' align='right'>".$carat."</td>";
$retour .= "</tr>";
$retour .= "<tr>";
$retour .= "<td width='76' class='c10 souligne bold'>Largeur Min :</td>";
$retour .= "<td width='150' class='c10 souligne' align='right'>".$largeurmin."</td>";
$retour .= "</tr>";
$retour .= "<tr>";
$retour .= "<td width='76' class='c10 souligne bold'>Largeur Max :</td>";
$retour .= "<td width='150' class='c10 souligne' align='right'>".$largeurmax."</td>";
$retour .= "</tr>";
$retour .= "<tr>";
$retour .= "<td width='76' class='c10 souligne bold'>Epaisseur :</td>";
$retour .= "<td width='150' class='c10 souligne' align='right'>".$epaisseur."</td>";
$retour .= "</tr>";
$retour .= "<tr>";
$retour .= "<td width='76' class='c10 souligne bold'>Délai :</td>";
$retour .= "<td width='150' class='c10 souligne' align='right'>".$jourdelai."</td>";
$retour .= "</tr>";
$retour .= "<tr>";
$retour .= "<td width='76' class='c10 souligne bold'>Type solitaire :</td>";
$retour .= "<td width='150' class='c10 souligne' align='right'>".$typesolitaire."</td>";
$retour .= "</tr>";
if ($typesolitaire != "simple") {
$retour .= "<tr>";
$retour .= "<td width='76' class='c10 souligne bold'>Nbre pierres<br>sur les côtés :</td>";
$retour .= "<td width='150' class='c10 souligne' align='right' valign='bottom'>".$nbpierrescotes."</td>";
$retour .= "</tr>";
$retour .= "<tr>";
$retour .= "<td width='76' class='c10 souligne bold'>Nbre pierres<br>sur le dessus :</td>";
$retour .= "<td width='150' class='c10 souligne' align='right' valign='bottom'>".$nbpierresdessus."</td>";
$retour .= "</tr>";
$retour .= "<tr>";
$retour .= "<td width='76' class='c10 souligne bold'>Nbre pierres<br>total :</td>";
$retour .= "<td width='150' class='c10 souligne' align='right' valign='bottom'>".$nbpierrestotal."</td>";
$retour .= "</tr>";
}
$retour .= "<tr>";
$retour .= "<td width='76' class='c10 souligne bold'>Prix<br>bijouterie:</td>";
$retour .= "<td width='150' class='c10 souligne' align='right'>".number_format($prixfullht,0,",",".")." <br><span class='grisfonce' style='font-style:oblique;'>TTC ".number_format($prixfullttc,0,",",".")." </span></td>";
$retour .= "</tr>";
$retour .= "<tr><td> </td><td> </td></tr>";
$retour .= "<tr>";
$retour .= "<td width='76' class='c10 bold' valign='top'>Peut être serti<br>avec diamant</td>";
$retour .= "<td width='150' class='c10' align='right' valign='bottom'>".$compatible."</td>";
$retour .= "</tr>";
$retour .= "<tr><td> </td><td> </td></tr>";
$retour .= "<tr style='background-color:#cbcaca;'>";
$retour .= "<td width='76' class='c12 bold' style='padding:3px 0px 3px 3px;'>Prix<br>Celinni : </td>";
$retour .= "<td width='150' class='c12' align='right' valign='bottom' style='padding:3px 3px 3px 0px;'> ".number_format($prixht,0,",",".")." <br><span class='grisclair' style='font-style:oblique;'>TTC ".number_format($prixttc,0,",",".")." </span></td>";
$retour .= "</tr>";
$retour .= "</table>";
}
echo $retour;
mysql_free_result($back);
mysql_close($connexion);
?> |
Partager