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
| <?php
session_start();
$id = $_GET['id'];
require("configuration.php");
$result = mysql_query("SELECT $sbbproduit.id, $sbbproduit.hid, $sbbproduit.sid, $sbbproduit.nom, $sbbproduit.ancienprix, $sbbproduit.spec, $sbbproduit.photoarticle, $sbbproduit.frais, $sbbproduit.promo, $sbbproduit.prix, $sbbproduit.stock, $sbbproduit.visu, $sbbfrs.frsid, $sbbfrs.societe FROM $sbbproduit, $sbbfrs WHERE $sbbproduit.frsid= $sbbfrs.frsid AND $sbbproduit.id='$id'");
$row = mysql_fetch_row($result) or die('Erreur SQL !<br />'.$result.'<br />'.mysql_error());
?>
<table border="0" width="100%">
<tr><?php
if ($row[6] != "nul") {
$split = explode("../", $row[6]);
$row[6] = $split[1];
$img = "<img src=\"$row[6]\" width='120' height='120' target='blank'>";
$image2 = "<a href='$row[6]' target='blank'><font class='moyen'>Photo taille réelle</font></a><br>";
} else {
$img = "<img src=\"$images/na.jpg\" width=100 border=0>";
}
echo "<td colspan='2'>$img</a><br>$image2</td>";
?></tr>
<tr>
<?php
$nom = $row[3];
?>
<td valign="top"><font class='moyen'><b>Article : </b></font></td>
<td><font class='moyen'><?php echo "$nom"; ?></font></td>
</tr>
<tr>
<td valign="top"><font class='moyen'><b>Descriptif : </b></font></td>
<?
$descriptif = $row[5];
$descriptif = str_replace("[retour]","<br>",$descriptif);
$descriptif = str_replace("[gras]","<b>",$descriptif);
$descriptif = str_replace("[/gras]","</b>",$descriptif);
?>
<td><font class='moyen'><? echo "$descriptif"; ?></font></td>
</tr>
<tr>
<td valign="top"></td>
<td></td>
</tr>
<?
$fraisproduit1 = $row[7];
$fraisproduit2 = sprintf("%0.2f", $fraisproduit1);
?>
<tr>
<td valign="top"><font class='moyen'><b>Frais :</b></font></td>
<td><font class='moyen'><? echo "$fraisproduit2"; ?> <? echo "$devises"; ?></font></td>
</tr>
<tr>
<td valign="top"><font class='moyen'><b>Prix TTC : </b></font></td>
<?
$price = $row[9];
$price = sprintf("%0.2f", $price);
$totalgeneral1 = ($price + $fraisproduit2);
$totalgeneral2 = sprintf("%0.2f", $totalgeneral1);
?>
<td><font class='moyen'><b><? echo "$price"; ?> <? echo "$devises"; ?> TTC</font></b></td>
<tr><td><font class='moyen'><b>Total TTC :</b></font></td><td><font class='moyen'><b><? echo "$totalgeneral2"; ?> <? echo "$devises"; ?></b></font></td>
</tr>
<?
if ($row[10] == "oui") {
echo "</tr><tr>";
echo "<td><font color=\"red\">Article non disponible</font></td>";
}
if ($row[8] == "oui") {
$ancienprix = $row[4];
$ancienprix = sprintf("%0.2f", $ancienprix);
echo "</tr><tr><td><font class='moyen'><b>Prix public : </b></font></td>";
echo "<td><font class='moyen' color=red><b>$ancienprix $devises TTC</b></font></td>";
}
$fournisseur = $row[13];
?>
<tr>
<td valign="top"><font class='moyen'><b>Fournisseur : </b></font></td>
<td><font class='moyen'><?php echo "$fournisseur"; ?></font></td>
</tr>
</table>
<a href="panier.php?action=ajout&l=LIBELLEPRODUIT&q=QUANTITEPRODUIT&p=PRIXPRODUIT" onclick="window.open(this.href, '', 'toolbar=no, location=no, directories=no, status=yes, scrollbars=yes, resizable=yes, copyhistory=no, width=600, height=350'); return false;">Ajouter au panier</a>
<?php
// deconnexion de la base
mysql_close();
?> |
Partager