234 lines
9.0 KiB
PHP
234 lines
9.0 KiB
PHP
|
|
<?php
|
|||
|
|
// ####################################################
|
|||
|
|
// producto.php
|
|||
|
|
// parte de shoop
|
|||
|
|
// <20> ff 2005
|
|||
|
|
|
|||
|
|
// wfcart siempre antes del inicio de sesion
|
|||
|
|
include("_incl/wfCart.php");
|
|||
|
|
session_start();
|
|||
|
|
|
|||
|
|
include('db.php');
|
|||
|
|
include("_incl/code.php");
|
|||
|
|
include("_incl/shoopBanners.php");
|
|||
|
|
|
|||
|
|
|
|||
|
|
// ####################################################
|
|||
|
|
// cargo el carrito o lo creo nuevo si fuera menester
|
|||
|
|
|
|||
|
|
$cart =& $_SESSION['cart'];
|
|||
|
|
if(!is_object($cart)) $cart = new wfCart();
|
|||
|
|
|
|||
|
|
$oferta_id = $_REQUEST['id'];
|
|||
|
|
|
|||
|
|
$oferta_categoria_id = "";
|
|||
|
|
$oferta_categoria_nombre = "";
|
|||
|
|
$oferta_nombre = "";
|
|||
|
|
$oferta_descripcion = "";
|
|||
|
|
$oferta_estado = "";
|
|||
|
|
$oferta_pvp = "";
|
|||
|
|
$oferta_fab_id = "";
|
|||
|
|
$oferta_unidades = "";
|
|||
|
|
|
|||
|
|
$conn = db_connect();
|
|||
|
|
if($conn) {
|
|||
|
|
$query = 'SELECT oferta_id, oferta_categoria, oferta_nombre, oferta_descripcion, oferta_estado, oferta_pvp, oferta_fab_id, oferta_unidades
|
|||
|
|
FROM shoop_oferta
|
|||
|
|
WHERE oferta_id="' . $oferta_id . '"';
|
|||
|
|
$result = mysql_query($query, $conn);
|
|||
|
|
if (mysql_num_rows($result)) {
|
|||
|
|
$row = mysql_fetch_array($result);
|
|||
|
|
$oferta_categoria_id = $row['oferta_categoria'];
|
|||
|
|
$oferta_nombre = $row['oferta_nombre'];
|
|||
|
|
$oferta_descripcion = $row['oferta_descripcion'];
|
|||
|
|
$oferta_estado = $row['oferta_estado'];
|
|||
|
|
$oferta_pvp = $row['oferta_pvp'];
|
|||
|
|
$oferta_fab_id = $row['oferta_fab_id'];
|
|||
|
|
$oferta_unidades = $row['oferta_unidades'];
|
|||
|
|
|
|||
|
|
//PARCHE DE CATEGORIAS DE OFERTA
|
|||
|
|
switch($oferta_categoria_id) {
|
|||
|
|
case 1: $oferta_categoria_nombre = 'Altavoces'; break;
|
|||
|
|
case 2: $oferta_categoria_nombre = 'Electrónicas'; break;
|
|||
|
|
case 3: $oferta_categoria_nombre = 'Reproductores de CD, convertidores D/A, etc.'; break;
|
|||
|
|
case 4: $oferta_categoria_nombre = 'Varios'; break;
|
|||
|
|
default: $oferta_categoria_nombre = 'N/A';
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
$topLabel = '<span class="seccion"><a href="tienda.php" class="pielink">Tienda ></a><a href="ocasion.php" class="pielink"> Oferta</a></span>';
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
?>
|
|||
|
|
|
|||
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|||
|
|
"http://www.w3.org/TR/html4/loose.dtd">
|
|||
|
|
<html>
|
|||
|
|
<head>
|
|||
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|||
|
|
<title>clave audio</title>
|
|||
|
|
<link href="_incl/ca.css" rel="stylesheet" type="text/css" />
|
|||
|
|
<link href="_incl/prod.css" rel="stylesheet" type="text/css" />
|
|||
|
|
<link href="_incl/banners.css" rel="stylesheet" type="text/css" />
|
|||
|
|
<script type="text/javascript" src="_incl/code.js"></script>
|
|||
|
|
</head>
|
|||
|
|
<body onLoad="MM_preloadImages('_imgs/comprb.gif')">
|
|||
|
|
<?php
|
|||
|
|
include("top.htm");
|
|||
|
|
?>
|
|||
|
|
<table border="0" align="center" cellpadding="0" cellspacing="0">
|
|||
|
|
<tr>
|
|||
|
|
<td colspan="7"><img src="_bann/topTienda.jpg"></td></tr>
|
|||
|
|
<tr>
|
|||
|
|
<td><img src="_imgs/d.gif" width="168" height="12"></td>
|
|||
|
|
<td><img src="_imgs/d.gif" width="12" height="12"></td>
|
|||
|
|
<td><img src="_imgs/d.gif" width="168" height="12"></td>
|
|||
|
|
<td><img src="_imgs/d.gif" width="12" height="12"></td>
|
|||
|
|
<td><img src="_imgs/d.gif" width="168" height="12"></td>
|
|||
|
|
<td><img src="_imgs/d.gif" width="12" height="12"></td>
|
|||
|
|
<td><img src="_imgs/d.gif" width="168" height="12"></td></tr>
|
|||
|
|
<tr>
|
|||
|
|
<td valign="top" width="168">
|
|||
|
|
|
|||
|
|
<?php
|
|||
|
|
// ####################################################
|
|||
|
|
// la celda que contiene el buscador, el menu y el carrito.
|
|||
|
|
?>
|
|||
|
|
|
|||
|
|
<table border="0" cellspacing="0" cellpadding="0" id="colIzda">
|
|||
|
|
<tr>
|
|||
|
|
<td bgcolor="#7A706A"><img src="_imgs/d.gif" width="6" height="12"></td>
|
|||
|
|
<td bgcolor="#7A706A"><img src="_imgs/titSearch.gif" width="156" height="18"></td>
|
|||
|
|
<td bgcolor="#7A706A" align="right"><img src="_imgs/crnr.gif" width="6" height="18"></td></tr></table>
|
|||
|
|
<?php include("buscar.php"); ?>
|
|||
|
|
<img src="_imgs/d.gif" width="168" height="12"><br>
|
|||
|
|
<?php
|
|||
|
|
$menu_cat = (strlen($cat_str) ? substr($cat_str, 0, 2) : '');
|
|||
|
|
include("categorias.php");
|
|||
|
|
?>
|
|||
|
|
<img src="_imgs/d.gif" width="168" height="12"><br>
|
|||
|
|
<?php include("carrito.php"); ?></td>
|
|||
|
|
<td></td>
|
|||
|
|
<td colspan="3" width="348" valign="top">
|
|||
|
|
<?php echo $topLabel; ?><br><img src="_imgs/g.gif" width="348" height="1"><br><br>
|
|||
|
|
<table width="348" border="0" cellpadding="0" cellspacing="0">
|
|||
|
|
|
|||
|
|
<form id="ocasion" name="ocasion" method="post" action="carrito_add.php">
|
|||
|
|
<input name="id" id="id" type="hidden" value="<?php echo $oferta_id; ?>">
|
|||
|
|
<input name="oferta_categoria_id" id="oferta_categoria_id" type="hidden" value="<?php echo $oferta_categoria_id; ?>">
|
|||
|
|
<input name="oferta_categoria_nombre" id="oferta_categoria_nombre" type="hidden" value="<?php echo $oferta_categoria_nombre; ?>">
|
|||
|
|
<input name="oferta_nombre" id="oferta_nombre" type="hidden" value="<?php echo $oferta_nombre; ?>">
|
|||
|
|
<input name="oferta_descripcion" id="oferta_descripcion" type="hidden" value="<?php echo $oferta_descripcion; ?>">
|
|||
|
|
<input name="oferta_estado" id="oferta_estado" type="hidden" value="<?php echo $oferta_estado; ?>">
|
|||
|
|
<input name="oferta_pvp" id="oferta_pvp" type="hidden" value="<?php echo $oferta_pvp; ?>">
|
|||
|
|
<input name="oferta_precio" id="oferta_fab_id" type="hidden" value="<?php echo $oferta_fab_id; ?>">
|
|||
|
|
<input name="oferta_estado" id="oferta_unidades" type="hidden" value="<?php echo $oferta_unidades; ?>">
|
|||
|
|
|
|||
|
|
<tr>
|
|||
|
|
<td width="170" valign="top" class="producto_texto">
|
|||
|
|
<span class="producto_tipo azul"><?php echo $oferta_categoria_nombre; ?></span><br>
|
|||
|
|
<span class="producto_modelo"><?php echo $oferta_nombre; ?></span><br>
|
|||
|
|
<span class="producto_tipo azul"><?php echo $oferta_estado; ?></span><!--span class="producto_tipo rojo"> <?php //echo $oferta_unidades; ?> Unidades</span--><br>
|
|||
|
|
<span class="producto_modelo">Oferta PVP:</span> <span class="producto_precio_ocasion2"><?php echo $oferta_pvp; ?><span class="euro">€</span><br>
|
|||
|
|
<img src="_imgs/d.gif" width="170" height="6"><br>
|
|||
|
|
|
|||
|
|
<a href="oferta_add.php?id=<?= $oferta_id; ?>&precio=<?= $oferta_pvp; ?>&modelo=<?= $oferta_nombre; ?>" onMouseOver="MM_swapImage('comprar','','_imgs/comprb.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="_imgs/compra.gif" name="comprar" width="61" height="13" border="0" id="comprar"></a>
|
|||
|
|
</td>
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
<td></td>
|
|||
|
|
<td width="170" valign="top" align="center">
|
|||
|
|
|
|||
|
|
<?php
|
|||
|
|
//LOGOTIPO FABRICANTE
|
|||
|
|
$path = '_logos/c/' . $oferta_fab_id . '.gif';
|
|||
|
|
if (file_exists($path)) {
|
|||
|
|
echo '<img src="'.$path.'"><br>';
|
|||
|
|
}
|
|||
|
|
?>
|
|||
|
|
<img src="_imgs/d.gif" width="170" height="6"><br>
|
|||
|
|
|
|||
|
|
<?php
|
|||
|
|
//IMAGEN ARTICULO OCASION
|
|||
|
|
$path = '_ofr/' . $oferta_id . '_168.jpg';
|
|||
|
|
if (file_exists($path)) {
|
|||
|
|
echo '<img src="'.$path.'"></td></tr>';
|
|||
|
|
}
|
|||
|
|
?>
|
|||
|
|
<tr>
|
|||
|
|
<td width="170"><img src="_imgs/d.gif" width="170" height="12"></td><td width="8"><img src="_imgs/d.gif" width="8" height="1"></td><td width="170"><img src="_imgs/d.gif" width="170" height="1"></td></tr>
|
|||
|
|
|
|||
|
|
<?php
|
|||
|
|
if($prod_precio > 0) {
|
|||
|
|
?>
|
|||
|
|
</form>
|
|||
|
|
<?php
|
|||
|
|
}
|
|||
|
|
?>
|
|||
|
|
</table>
|
|||
|
|
<table width="348" border="0" cellpadding="0" cellspacing="0">
|
|||
|
|
<?php
|
|||
|
|
if(strlen($oferta_descripcion)) {
|
|||
|
|
?>
|
|||
|
|
<tr><td class="tit azul">DESCRIPCIÓN</td></tr>
|
|||
|
|
<tr><td background="_imgs/ptoshg.gif"><img src="_imgs/d.gif" width="168" height="1"></td></tr>
|
|||
|
|
<tr><td width="348" class="producto_texto"><br><?php echo $oferta_descripcion; ?></td></tr>
|
|||
|
|
<tr><td><img src="_imgs/d.gif" width="170" height="12"></td></tr>
|
|||
|
|
<?php
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(strlen($prod_intro)) {
|
|||
|
|
?>
|
|||
|
|
<tr><td width="348" class="producto_texto"><?php echo str_replace("\r", "<br>", htmlentities(stripslashes($prod_intro))); ?></td></tr>
|
|||
|
|
<tr><td><img src="_imgs/d.gif" width="170" height="12"></td></tr>
|
|||
|
|
<?php
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(strlen($prod_dimensiones)){
|
|||
|
|
?>
|
|||
|
|
<tr><td width="348" class="producto_texto"><?php echo '<b>Dimensiones:</b> ' . $prod_dimensiones; ?></td></tr>
|
|||
|
|
<?php
|
|||
|
|
}
|
|||
|
|
if(strlen($prod_peso) && $prod_peso != '0.00'){
|
|||
|
|
?>
|
|||
|
|
<tr><td width="348" class="producto_texto"><?php echo '<b>Peso:</b> ' . $prod_peso; ?></td></tr>
|
|||
|
|
<?php
|
|||
|
|
}
|
|||
|
|
if(strlen($prod_volumen) && $prod_volumen != '0.00'){
|
|||
|
|
?>
|
|||
|
|
<tr><td width="348" class="producto_texto"><?php echo '<b>Volumen:</b> ' . $prod_volumen; ?></td></tr>
|
|||
|
|
<?php
|
|||
|
|
}
|
|||
|
|
?>
|
|||
|
|
|
|||
|
|
<?php
|
|||
|
|
if($conn){
|
|||
|
|
$query = 'SELECT procat_valor, catop_label FROM shoop_prod_caracteristicas, shoop_cate_caracteristicas WHERE catop_id=procat_catop AND procat_producto=' . $prod_id ;
|
|||
|
|
$result = mysql_query($query, $conn);
|
|||
|
|
if($result){
|
|||
|
|
while($row = mysql_fetch_array($result)) {
|
|||
|
|
?>
|
|||
|
|
<tr><td width="348" class="producto_texto"><?php echo '<b>' . $row['catop_label'] . ':</b> ' . $row['procat_valor']; ?></td></tr>
|
|||
|
|
<?php
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
?>
|
|||
|
|
</table>
|
|||
|
|
</td>
|
|||
|
|
<td></td>
|
|||
|
|
<td width="168" valign="top">
|
|||
|
|
<img src="_bann/168clave.gif" alt="ventajas" border="0">
|
|||
|
|
</td>
|
|||
|
|
</tr>
|
|||
|
|
<tr><td colspan="7"><img src="_imgs/d.gif" width="708" height="12"></td></tr>
|
|||
|
|
<tr>
|
|||
|
|
<td colspan="7"><?php include("pie.htm"); ?></td>
|
|||
|
|
</tr>
|
|||
|
|
<tr><td colspan="7"><img src="_imgs/d.gif" width="708" height="12"></td></tr>
|
|||
|
|
</table>
|
|||
|
|
</body>
|
|||
|
|
</html>
|