git-svn-id: https://192.168.0.254/svn/Proyectos.ClaveAudio_Web/trunk@17 44ade383-bb54-5b4f-835b-923f7702b206
353 lines
11 KiB
PHP
353 lines
11 KiB
PHP
<!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/banners.css" rel="stylesheet" type="text/css">
|
||
<script type="text/javascript" src="_incl/code.js"></script>
|
||
<script type="text/javascript" language="javascript">
|
||
function doZona(num){
|
||
document.getElementById('tab1').className = (num == 1 ? 'tab2a' : 'tab1a');
|
||
document.getElementById('tab2').className = (num == 2 ? 'tab2b' : 'tab1b');
|
||
document.getElementById('tab3').className = (num == 3 ? 'tab2a' : 'tab1a');
|
||
|
||
document.getElementById('zone1').style.display = (num == 1 ? 'block' : 'none');
|
||
document.getElementById('zone2').style.display = (num == 2 ? 'block' : 'none');
|
||
document.getElementById('zone3').style.display = (num == 3 ? 'block' : 'none');
|
||
}
|
||
</script>
|
||
<style type="text/css">
|
||
<!--
|
||
#zona{border:1px solid #b9e5fb; background:url(_imgs/zonab.gif) repeat-x;margin-top:16px}
|
||
.tab1a, .tab1b, .tab2a, .tab2b{font: bold 11px Verdana, Arial, Helvetica, sans-serif;text-align:center;background:no-repeat;height:26px}
|
||
#tabs a{display:block;width:100%;text-decoration:none;color:#666666}
|
||
#tabs a:hover{text-decoration:underline;color:blue}
|
||
#tabs .tab2a a, #tabs .tab2b a{color:#00AEEF}
|
||
#tabs .tab2a a:hover, #tabs .tab2b a:hover{text-decoration:none}
|
||
|
||
.tab1a {background: url(_imgs/zonatab1a.gif)}
|
||
.tab1b {background: url(_imgs/zonatab1b.gif)}
|
||
.tab2a {background: url(_imgs/zonatab2a.gif)}
|
||
.tab2b {background: url(_imgs/zonatab2b.gif)}
|
||
|
||
#zone1{padding:8px;}
|
||
|
||
.sepa{background:url(_imgs/dotsblue.png) repeat-x;width:330px;height:11px;margin:0;}
|
||
#novedades{margin-bottom:12px;font:normal 10px Verdana, Arial, Helvetica, sans-serif;color:#555555;}
|
||
.data{font:normal 11px Verdana, Arial, Helvetica, sans-serif;color:#555555;padding:3px}
|
||
-->
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<?php
|
||
ini_set ('error_reporting', E_ALL);
|
||
ini_set ('display_errors', '0');
|
||
|
||
include('db.php');
|
||
include("_incl/shoopOfertas.php");
|
||
include("_incl/shoopBanners.php");
|
||
include("top.htm");
|
||
|
||
|
||
// ############################################
|
||
// la trampa: estas dos variables son los ids de los art<72>culos que
|
||
// quiero mantener en portada, independientemente de los que se a<>adan
|
||
// en la base de datos
|
||
|
||
// $huecoNovedad = 2;
|
||
// $huecoLearning = 1;
|
||
|
||
// esta es la conexion con la base de datos
|
||
$conn = db_connect();
|
||
|
||
?>
|
||
<table width="708" border="0" align="center" cellpadding="0" cellspacing="0">
|
||
|
||
<!--Banners cabecera-->
|
||
<tr>
|
||
<td colspan="3">
|
||
<table id="banner" width="708" border="0" cellpadding="0" cellspacing="0">
|
||
<tr>
|
||
<td width="349"><img src="_bann/topHome3.jpg" width="349" height="132" alt="La mejor tienda de Audio High-End y Home Cinema en España"></td>
|
||
<td width="359" valign="bottom" class="sombra" align="right">
|
||
<?php
|
||
$miBanner = new shoopBanners(1, 50);
|
||
if($miBanner->getNum()){ echo $miBanner->getNextBanner(); }
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<tr><td colspan="2" class="sombra" height="10"></td></tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
|
||
<!-- Separacion cuerpo -->
|
||
<tr>
|
||
<td><img src="_imgs/d.gif" width="348" height="1"></td>
|
||
<td><img src="_imgs/d.gif" width="12" height="1"></td>
|
||
<td><img src="_imgs/d.gif" width="348" height="1"></td>
|
||
</tr>
|
||
|
||
<!-- Cuerpo -->
|
||
<tr>
|
||
<td valign="top">
|
||
|
||
<table id="tienda" width="348" height="141" border="0" cellpadding="0" cellspacing="0">
|
||
<tr>
|
||
<td colspan="2" height="25"><img src="_imgs/tiendatit.gif" alt="tienda" width="78" height="14" style="margin-left:8px"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><?php include("buscar.php"); ?></td>
|
||
<td><img src="_imgs/tiendathumb.jpg" width="180" height="116" alt=""></td>
|
||
</tr>
|
||
</table>
|
||
|
||
<!--NUEVA ESTRUCTURA-->
|
||
<table id="zona" width="348" border="1" cellpadding="0" cellspacing="0">
|
||
<tr><td height="29"><img src="_imgs/zonatit.gif" style="margin-left:8px" /></td></tr>
|
||
</table>
|
||
|
||
<table id="ofertas" width="348" border="0" cellpadding="0" cellspacing="0">
|
||
<tr><td height="50">OFERTAS</td></tr>
|
||
<tr><td height="5" colspan="3"><div class="sepa"></div></td></tr>
|
||
|
||
<?php
|
||
$miOfertas = new shoopOfertaNueva(3, '');
|
||
for ($i=0; $i < $miOfertas->getNum(); $i++){
|
||
$arrayOfertas = $miOfertas->getNextOferta();
|
||
if(!empty($arrayOfertas)){
|
||
?>
|
||
<tr><td> <?php include('bann_oferta_home.php');?> </td></tr>
|
||
<tr><td height="5"><div class="sepa"></div></td></tr>
|
||
<?php
|
||
}
|
||
}
|
||
|
||
?>
|
||
</td></tr>
|
||
<tr><td>
|
||
<p align="right" style="margin:0;padding:0"><a href="ofertas.php" class="pielink">Ver todo el material de Oferta >></a></p>
|
||
</td></tr>
|
||
</table>
|
||
|
||
<table id="ocasion" width="348" border="0" cellpadding="0" cellspacing="0">
|
||
<tr><td height="50">OCASIÓN</td></tr>
|
||
<tr><td height="5" colspan="3"><div class="sepa"></div></td></tr>
|
||
|
||
<?php
|
||
$miOcasion = new shoopOcasion(3, '');
|
||
for ($i=0; $i < $miOcasion->getNum(); $i++){
|
||
$arrayOcasion = $miOcasion->getNextOcasion();
|
||
if(!empty($arrayOcasion)){
|
||
?>
|
||
<tr><td bgcolor="#FFFFFF"><?php include('bann_ocasion_home.php');?></td></tr>
|
||
<tr><td height="5"><div class="sepa"></div></td></tr>
|
||
<?php
|
||
}
|
||
}
|
||
|
||
?>
|
||
</td></tr>
|
||
<tr><td>
|
||
<p align="right" style="margin:0;padding:0"><a href="ocasion.php" class="pielink">Ver todo el material de Ocasión >></a></p>
|
||
</td></tr>
|
||
</table>
|
||
<!--FIN NUEVA ESTRUCTURA-->
|
||
|
||
|
||
|
||
<!--ZONA-->
|
||
<!--table id="zona" width="348" border="0" cellpadding="0" cellspacing="0">
|
||
<tr><td height="29"><img src="_imgs/zonatit.gif" style="margin-left:8px" /></td></tr>
|
||
<tr>
|
||
<td>
|
||
<table id="tabs" width="346" height="26" border="0" cellpadding="0" cellspacing="0">
|
||
<tr>
|
||
<td width="115" class="tab2a" id="tab1"><a href="#" onClick="doZona(1);">Recomendamos</a></td>
|
||
<td width="116" class="tab1b" id="tab2"><a href="#" onClick="doZona(2);">Ocasión</a></td>
|
||
<td width="115" class="tab1a" id="tab3"><a href="#" onClick="doZona(3);">Curiosidades</a></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td bgcolor="#FFFFFF">
|
||
<div id="zone1">
|
||
<div class="oferta">
|
||
<?php
|
||
// el parametro que paso es el n<>mero de ofertas de tipo 1 de cualquier categoria que quiero
|
||
$miOferta = new shoopOfertas(4);
|
||
if($miOferta->getNum()){
|
||
$arrayOferta = $miOferta->getNextOferta();
|
||
include('bann1.php');
|
||
}
|
||
?>
|
||
</div>
|
||
<div class="sepa"></div>
|
||
<div class="oferta">
|
||
<?php
|
||
if($miOferta->getNum() > 1){
|
||
$arrayOferta = $miOferta->getNextOferta();
|
||
include('bann1.php');
|
||
}
|
||
?>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="zone2" style="display:none;padding:8px">
|
||
<?php
|
||
if($conn) {
|
||
$query = 'SELECT ocasion_categoria AS CATEGORIA, ocasion_nombre AS NOMBRE, ocasion_estado AS ESTADO, ocasion_pvp AS PVP, ocasion_precio AS PRECIO, ocasion_descripcion AS TEXTO
|
||
FROM shoop_ocasion
|
||
WHERE ocasion_unidades > 0
|
||
ORDER BY RAND() LIMIT 7';
|
||
$result = mysql_query($query, $conn);
|
||
if($result && mysql_num_rows($result)) {
|
||
?>
|
||
<table border="0" cellpadding="0" cellspacing="0">
|
||
<?php
|
||
while($row = mysql_fetch_array($result)) {
|
||
?>
|
||
<tr onMouseOver="overRow(this);return false;" onMouseOut="outRow(this);return false;">
|
||
<td valign="top" class="data"><?= resume($row['NOMBRE'], 20) . (strlen($row['ESTADO']) ? ' (<i>' . $row['ESTADO'] . '</i>)': ""); ?></td>
|
||
<td width="50" valign="top" align="right" class="data"><?= miNumberFormat($row['PRECIO']); ?>€</td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
|
||
</table>
|
||
<p align="right" style="margin:0;padding:0"><a href="ocasion.php" class="pielink">Ver todo el material de Ocasión >></a></p>
|
||
|
||
|
||
<?php
|
||
}
|
||
}
|
||
?>
|
||
</div>
|
||
|
||
<div id="zone3" style="display:none;padding:8px">
|
||
|
||
|
||
|
||
<table border="0" cellpadding="0" cellspacing="0">
|
||
|
||
<tr>
|
||
<td><img src="_imgs/curio.jpg" width="140" height="175" alt=""></td>
|
||
<td><img src="_imgs/d.gif" width="13" height="1" alt=""></td>
|
||
<td valign="top" class="tit">
|
||
<?php
|
||
if($conn) {
|
||
$query = 'SELECT articulo_id, articulo_titular, articulo_entradilla FROM edito_articulos WHERE articulo_tipo=4 ORDER BY articulo_id DESC LIMIT 8';
|
||
$result = mysql_query($query, $conn);
|
||
if($result && mysql_num_rows($result)) {
|
||
$clase = 't1';
|
||
while($row = mysql_fetch_array($result)){
|
||
?>
|
||
<?= $row['articulo_titular']; ?> <a href="articulos.php?t=4&id=<?= $row['articulo_id']; ?>" class="mas">[+]</a><br />
|
||
<?php
|
||
}
|
||
}
|
||
}
|
||
?>
|
||
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
</td>
|
||
</tr>
|
||
</table-->
|
||
|
||
</td>
|
||
|
||
<!--SEPARACION-->
|
||
<td></td>
|
||
|
||
<!--LATERAL DERECHO-->
|
||
<td valign="top">
|
||
|
||
<!--NOVEDADES-->
|
||
<table id="novedades" width="348" border="0" cellpadding="0" cellspacing="0">
|
||
<tr><td colspan="3" height="25"><img src="_imgs/novetit.gif" alt="novedades" width="129" height="13"></td></tr>
|
||
<?php
|
||
if($conn) {
|
||
$query = 'SELECT articulo_id, articulo_titular, articulo_entradilla FROM edito_articulos ORDER BY articulo_id DESC LIMIT 4';
|
||
$result = mysql_query($query, $conn);
|
||
if($result && (mysql_num_rows($result)>0)) {
|
||
while ($row = mysql_fetch_array($result)){
|
||
?>
|
||
<tr>
|
||
<td width="168" valign="top">
|
||
<span class="tit azul"><?= $row['articulo_titular']; ?></span><br />
|
||
<?= $row['articulo_entradilla']; ?> <a href="articulos.php?t=1&id=<?= $row['articulo_id']; ?>" class="mas">[+]</a></td>
|
||
<td><img src="_imgs/d.gif" width="11" height="1" alt=""></td>
|
||
<td valign="top">
|
||
<?php
|
||
$query = 'SELECT galeria_imagen_name FROM edito_galeria_imagenes WHERE galeria_articulo_id = ' . $row['articulo_id'] . ' ORDER BY galeria_imagen_name';
|
||
$result2 = mysql_query($query, $conn);
|
||
if($result2){
|
||
while($row_img = mysql_fetch_array($result2)) {
|
||
$path_108 = '_pics/' . $row_img['galeria_imagen_name'] . '_348.jpg';
|
||
if(file_exists($path_108)) {
|
||
?>
|
||
<img src="<?= $path_108; ?>" width="168">
|
||
<?php
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<tr><td height="25" colspan="3"><div class="sepa"></div></td></tr>
|
||
<?php
|
||
}
|
||
}
|
||
}
|
||
?>
|
||
</table>
|
||
|
||
<!--BANNERS-->
|
||
<table id="right" width="348" border="0" cellpadding="0" cellspacing="0">
|
||
<tr>
|
||
|
||
<?php
|
||
$miBanner = new shoopBanners(2, 145);
|
||
if($miBanner->getNum()){
|
||
?>
|
||
<td height="145"><?= $miBanner->getNextBanner(); ?></td>
|
||
<td width="11"> </td>
|
||
<td><?= $miBanner->getNextBanner(); ?></td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
<tr>
|
||
<td height="13" colspan="3"> </td>
|
||
</tr>
|
||
</table>
|
||
|
||
<?php
|
||
// el par<61>metro que paso es el n<>mero de baners de tipo 1 que quiero
|
||
$miBanner = new shoopBanners(2, 348);
|
||
for ($i=0; $i < $miBanner->getNum(); $i++){
|
||
?>
|
||
<div class="banner01"><?php echo $miBanner->getNextBanner();?></div>
|
||
<?php
|
||
}
|
||
?>
|
||
|
||
|
||
</td></tr></table>
|
||
<table width="708" border="0" align="center" cellpadding="0" cellspacing="12">
|
||
<tr>
|
||
<td width="708" ><div align="center" class="pie"><?php include("pie.htm"); ?></div></td>
|
||
</tr>
|
||
</table>
|
||
</body>
|
||
</html>
|