2011-06-06 14:29:53 +00:00
|
|
|
|
<?php
|
|
|
|
|
|
// ####################################################
|
|
|
|
|
|
// tienda.php
|
|
|
|
|
|
// parte de shoop
|
|
|
|
|
|
// <20> ff 2005
|
|
|
|
|
|
|
|
|
|
|
|
// wfcart siempre antes del inicio de sesion
|
|
|
|
|
|
include("_incl/wfCart.php");
|
|
|
|
|
|
session_start();
|
|
|
|
|
|
|
|
|
|
|
|
ini_set ('error_reporting', E_ALL);
|
|
|
|
|
|
ini_set ('display_errors', '1');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include('db.php');
|
|
|
|
|
|
include("_incl/shoopOfertas.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();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$result = false;
|
|
|
|
|
|
$conn = db_connect();
|
|
|
|
|
|
if($conn) {
|
|
|
|
|
|
$query = 'SELECT oferta_id, oferta_fab_id, fab_nombre, oferta_categoria, oferta_nombre, oferta_estado, oferta_pvp, oferta_descripcion
|
|
|
|
|
|
FROM shoop_oferta
|
|
|
|
|
|
LEFT JOIN shoop_fabricantes on (oferta_fab_id=fab_id)
|
|
|
|
|
|
WHERE oferta_unidades > 0
|
|
|
|
|
|
ORDER BY oferta_categoria, oferta_id';
|
|
|
|
|
|
|
|
|
|
|
|
$result = mysql_query($query, $conn);
|
|
|
|
|
|
if($result) {
|
|
|
|
|
|
$numProductos = mysql_num_rows($result);
|
|
|
|
|
|
$topLabel = '<span class="seccion"><a href="tienda.php" class="pielink">Tienda ></a> Material de oferta</span>';
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ####################################################
|
|
|
|
|
|
// llegados a este punto sabemos en que estado esta la pagina
|
|
|
|
|
|
// tenemos, incluso, los resultados de la busqueda, if any
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
<!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/sformi.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/comprbm.gif')">
|
|
|
|
|
|
<?php
|
|
|
|
|
|
// ####################################################
|
|
|
|
|
|
// la banda superior y el men<65> principal
|
|
|
|
|
|
|
|
|
|
|
|
include('top.htm');
|
|
|
|
|
|
|
|
|
|
|
|
// ####################################################
|
|
|
|
|
|
// esta es la tabla general que da forma a la pagina.
|
|
|
|
|
|
?>
|
|
|
|
|
|
<table border="0" align="center" cellpadding="0" cellspacing="0">
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td colspan="7"><!--img src="_bann/ocasion.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">
|
|
|
|
|
|
|
|
|
|
|
|
<?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 = '';
|
|
|
|
|
|
include("categorias.php");
|
|
|
|
|
|
?>
|
|
|
|
|
|
<img src="_imgs/d.gif" width="168" height="12"><br>
|
|
|
|
|
|
<?php include("carrito.php"); ?></td>
|
|
|
|
|
|
<td></td>
|
|
|
|
|
|
<td colspan="5" valign="top" width="528">
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
// ####################################################
|
|
|
|
|
|
// esta parte es comun: texto y destacado de 3 columnas.
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0" id="topClaim">
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
// ####################################################
|
|
|
|
|
|
// dependiendo de si estoy en el indice muestro el bienvenidos o el nombre de la secci<63>n/busqueda.
|
|
|
|
|
|
?>
|
|
|
|
|
|
<!--tr><td><?= $topLabel; ?><br><img src="_imgs/g.gif" width="528" height="1"></td></tr-->
|
|
|
|
|
|
|
|
|
|
|
|
<tr><td>
|
|
|
|
|
|
<?php
|
|
|
|
|
|
// ####################################################
|
|
|
|
|
|
// este es el destacado que aparece en la parte superior de todas las paginas de la tienda.
|
|
|
|
|
|
|
|
|
|
|
|
// quiero una oferta de tipo dos de la categoria que me han pasado (o de cualquiera si no hay categor<6F>a)
|
|
|
|
|
|
$miOferta = new shoopOfertaNueva(1, '');
|
|
|
|
|
|
if($miOferta->getNum()){
|
|
|
|
|
|
$arrayOferta = $miOferta->getNextOferta();
|
|
|
|
|
|
if(!empty($arrayOferta))
|
|
|
|
|
|
include('bann2_oferta.php');
|
|
|
|
|
|
?>
|
|
|
|
|
|
</td></tr>
|
|
|
|
|
|
<tr><td background="_imgs/ptoshb.gif"><img src="_imgs/d.gif" width="168" height="8"></td></tr>
|
|
|
|
|
|
<?php
|
|
|
|
|
|
}
|
|
|
|
|
|
?>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0" id="saludo">
|
|
|
|
|
|
<tr><td><img src="_imgs/d.gif" width="168" height="8"></td></tr>
|
|
|
|
|
|
<tr><td width="528" class="parr">Este es un listado parcial de productos en oferta.<br \>
|
|
|
|
|
|
Estos precios incluyen IVA.
|
|
|
|
|
|
</td></tr>
|
|
|
|
|
|
<tr><td background="_imgs/ptoshb.gif"><img src="_imgs/d.gif" width="168" height="8"></td></tr>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
if($result && $numProductos) {
|
|
|
|
|
|
?>
|
|
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0" width="528">
|
2011-06-16 15:34:28 +00:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td colspan="2" class="lbl">OFERTA<img src="_imgs/d.gif" width="15" height="18"></td>
|
|
|
|
|
|
<td width="70" class="lbl" align="right" valign="bottom">PVP Oferta</td>
|
|
|
|
|
|
<td width="30"></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
2011-06-06 14:29:53 +00:00
|
|
|
|
<?php
|
|
|
|
|
|
$secciones = array('', 'Altavoces', 'Electrónicas', 'Reproductores de CD, convertidores D/A, etc.', 'Varios');
|
|
|
|
|
|
$curSeccion='';
|
|
|
|
|
|
while ($row = mysql_fetch_array($result))
|
|
|
|
|
|
{
|
|
|
|
|
|
$oferta_id = $row['oferta_id'];
|
|
|
|
|
|
$oferta_categoria = $row['oferta_categoria'];
|
|
|
|
|
|
$oferta_nombre = $row['oferta_nombre'];
|
|
|
|
|
|
$oferta_estado = $row['oferta_estado'];
|
|
|
|
|
|
$oferta_pvp = $row['oferta_pvp'];
|
|
|
|
|
|
$oferta_fab_id = $row['oferta_fab_id'];
|
|
|
|
|
|
$fab_nombre = $row['fab_nombre'];
|
|
|
|
|
|
$oferta_descripcion = $row['oferta_descripcion'];
|
|
|
|
|
|
|
2011-06-16 15:34:28 +00:00
|
|
|
|
// if($oferta_categoria != $curSeccion){
|
|
|
|
|
|
// $curSeccion = $oferta_categoria;
|
2011-06-06 14:29:53 +00:00
|
|
|
|
?>
|
|
|
|
|
|
<?php
|
2011-06-16 15:34:28 +00:00
|
|
|
|
// }
|
2011-06-06 14:29:53 +00:00
|
|
|
|
?>
|
|
|
|
|
|
<tr onMouseOver="overRow(this);return false;" onMouseOut="outRow(this);return false;">
|
|
|
|
|
|
<td width="10"></td>
|
|
|
|
|
|
<td width="335" valign="top" class="data">
|
2011-06-16 15:34:28 +00:00
|
|
|
|
<span class="tit azul"><a href="oferta_ficha.php?id=<?= $oferta_id; ?> " class="pielink"> <?= $oferta_nombre . (strlen($oferta_estado) ? '</span>': "") ; ?></a></span><br/>
|
|
|
|
|
|
|
|
|
|
|
|
<?php if(strlen($oferta_descripcion)) { echo substr($oferta_descripcion, 0, 150); } ?><a href="oferta_ficha.php?id=<?php echo $oferta_id; ?>" class="mas">[+]</a>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
2011-06-06 14:29:53 +00:00
|
|
|
|
<td width="70" valign="top" align="right" class="data"><?= miNumberFormat($oferta_pvp); ?> €</td>
|
|
|
|
|
|
<td width="30" align="right" valign="top"><a href="oferta_add.php?id=<?= $oferta_id; ?>&precio=<?= $oferta_pvp; ?>&modelo=<?= $oferta_nombre; ?>" onMouseOver="MM_swapImage('comprar<?= $oferta_id; ?>','','_imgs/comprbm.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="_imgs/compram.gif" name="comprar<?= $oferta_id; ?>" width="16" height="13" border="0" id="comprar<?= $oferta_id; ?>"></a></td></tr>
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td bgcolor="#EDEEF1" colspan="5"><img src="_imgs/d.gif" width="2" height="1"></td></tr>
|
|
|
|
|
|
<?php
|
|
|
|
|
|
} // while
|
|
|
|
|
|
?>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
<?php
|
|
|
|
|
|
}
|
|
|
|
|
|
?>
|
|
|
|
|
|
</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>
|