ClaveAudio_Web/index.php

286 lines
9.3 KiB
PHP
Raw Blame History

<!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">
<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&ntilde;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>
<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>
<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>
<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&oacute;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']); ?>&euro;</td>
</tr>
<?php
}
?>
</table>
<p align="right" style="margin:0;padding:0"><a href="ocasion.php" class="pielink">Ver todo el material de Ocasi&oacute;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>
<td></td>
<td valign="top">
<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 1';
$result = mysql_query($query, $conn);
if($result && mysql_num_rows($result)) {
$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';
$result = mysql_query($query, $conn);
if($result){
while($row_img = mysql_fetch_array($result)) {
$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>
<?php
}
}
?>
</table>
<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">&nbsp;</td>
<td><?= $miBanner->getNextBanner(); ?></td>
</tr>
<?php
}
?>
<tr>
<td height="13" colspan="3">&nbsp;</td>
</tr>
</table>
<div class="banner01">
<?php
// el par<61>metro que paso es el n<>mero de baners de tipo 1 que quiero
$miBanner = new shoopBanners(1, 348);
if($miBanner->getNum())
echo $miBanner->getNextBanner();
?>
</div>
</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>