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
| <?php require_once('Connections/ConnexionBoutiquedream.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colreference_rsFiche = "-1";
if (isset($_GET['reference'])) {
$colreference_rsFiche = $_GET['reference'];
}
mysql_select_db($database_ConnexionBoutiquedream, $ConnexionBoutiquedream);
$query_rsFiche = sprintf("SELECT articles.reference, articles.titre, articles.`description`, articles.prix, articles.photo, rubriques.theme FROM articles, rubriques WHERE rubriques.ID=articles.rubriqueID AND articles.reference=%s", GetSQLValueString($colreference_rsFiche, "text"));
$rsFiche = mysql_query($query_rsFiche, $ConnexionBoutiquedream) or die(mysql_error());
$row_rsFiche = mysql_fetch_assoc($rsFiche);
$totalRows_rsFiche = mysql_num_rows($rsFiche);$colreference_rsFiche = "-1";
if (isset($_GET['reference'])) {
$colreference_rsFiche = $_GET['reference'];
}
mysql_select_db($database_ConnexionBoutiquedream, $ConnexionBoutiquedream);
$query_rsFiche = sprintf("SELECT articles.reference, articles.titre, articles.`description`, articles.prix, articles.photo, rubriques.theme FROM articles, rubriques WHERE rubriques.ID=articles.rubriqueID AND articles.reference=%s", GetSQLValueString($colreference_rsFiche, "text"));
$rsFiche = mysql_query($query_rsFiche, $ConnexionBoutiquedream) or die(mysql_error());
$row_rsFiche = mysql_fetch_assoc($rsFiche);
$totalRows_rsFiche = mysql_num_rows($rsFiche);
?>
<!doctype html>
<!-- InstanceBegin template="/Templates/ModelePublic.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Boutique DREAM</title>
<!-- InstanceEndEditable -->
<meta charset="utf-8">
<link href="../style/styleBoutique.css" rel="stylesheet" type="text/css" />
<!--<script type="text/javascript" src="js/index.js"></script> -->
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>
<body>
<div id="conteneur">
<div id="tete"> <img src="../images/bandeauPublic.gif" width="950" height="60" border="0"> </div>
<div id="menu">
<a href="catalogue.php" >Catalogue</a>
<a href="panier.php" >Panier</a>
<a href="commande.php" >Commande</a>
</div>
<!-- Contenus : -->
<!-- InstanceBeginEditable name="pagePublic" -->
<h1>FICHE</h1>
<div id="contenu">
<table id="medium">
<tr>
<th width="20%" >Titre :</th>
<td width="60%" ><?php echo $row_rsFiche['titre']; ?></td>
<!-- <td width="20%" rowspan="6"><img src="/images/<?php echo $row_rsFiche['photo']; ?>"></td> -->
</tr>
<tr>
<th >Thème :</th>
<td><?php echo $row_rsFiche['theme']; ?></td>
</tr>
<tr>
<th >Description : </th>
<td><?php echo $row_rsFiche['description']; ?></td>
</tr>
<tr>
<th >Prix :</th>
<td><?php echo $row_rsFiche['prix']; ?></td>
</tr>
<tr>
<th > </th>
<td><a href="panier.php?reference=<?php echo $row_rsFiche['reference']; ?>&prix=<?php echo $row_rsFiche['prix']; ?>&ajoutPanier=AJOUTER">ajouter cet article au panier</a></td>
</tr>
</table>
</div>
<div><canvas id="c5" width="480" height = "300" ></canvas>
<div id="c4" width="480" height = "300" >
<button onClick="draw_Noir();return true;">Noir</button>
<button onClick="draw_Rouge();return true;">Rouge</button>
<button onClick="draw_Bleu();return true;">Bleu</button>
</div>
</div>
<script>
var c5 = document.getElementById("c5");
var c5_context = c5.getContext("2d");
var Noir = new Image();
Noir.src = 'images/TshirtNoir.jpg';
var Rouge = new Image();
Rouge.src = 'images/TshirtRouge.jpg';
var Bleu = new Image();
Bleu.src = 'images/TshirtBleu.jpg';
function draw_Noir() {
c5_context.drawImage(Noir, 100, 5, 300, 300);
}
function draw_Rouge() {
c5_context.drawImage(Rouge, 100, 5, 300, 300);
}
function draw_Bleu() {
c5_context.drawImage(Bleu, 100, 5, 300, 300);
}
</script>
<!-- InstanceEndEditable -->
<!-- Fin Contenus : -->
<div id="piedpage"><img src="images/BarreBasPublic.gif" width="950" height="20"></div>
</div>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($rsFiche);
?> |