<html>
<head>
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<title>Catálogo</title>
<style type="text/css">
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#bg {position:fixed;top:0;left:0;width:100%;height:100 %;}
#content {position:relative;z-index:1;}
</style>
<!--[if IE 6]>
<style type="text/css">
/* some css fixes for IE browsers */
html {overflow-y:hidden;}
body {overflow-y:auto;}
#bg {position:absolute; z-index:-1;}
#content {position:static;}
</style>
<![endif]-->
</head>
<body>
<div id="content">
<body bgcolor="#000000">
<div align="center">
<table border="1" width="80%" cellspacing="0" cellpadding="0" bordercolor="#000000" height="104" bgcolor="#FFFFFF">
<tr>
<?php
$hostname = "mysql.kai-muay.com";
$database = "kaimuay";
$username = "kaimuay";
$password = "***";
$euro = "€";
$cnx = mysql_pconnect($hostname, $username, $password);
// Consultar todos los datos de Tabla.
mysql_select_db($database, $cnx);
$sql = "SELECT * FROM ropaurbana";
$datos = mysql_query($sql, $cnx) or die(mysql_error());
$row = mysql_fetch_assoc($datos);
$tallas = explode(",", $row['tallas']);
$color = explode(",", $row['colores']);
$result = count($tallas);
foreach( $tallas as $value )
{
$tallaje .= '<option value="'.$value.'">'.$value.'</option>';
}
foreach( $color as $value )
{
$colores .= '<option value="'.$value.'">'.$value.'</option>';
}
// A continuación se imprimen por pantalla todos los resultados
do{
echo "<td height='118' width='115' rowspan='2' bordercolorlight='grey' bordercolordark='grey' align='center'><p align='center'><a href=".$row['imagen']." TARGET='_new'><IMG style='border:0' SRC=".$row['imagen']." style='noBigImages()' class='centrarimagen' align='center' ></td>";
echo "<td height='29' width='935' align='left' bordercolorlight='grey' bordercolordark='grey'><b>".$row['articulo']."</b> | ".$row['precio'].$euro." | <b>Talla</b><select size='1' name='tallas'>".$tallaje."</select> | <b>Color</b><select size='1' name='color'>".$colores."</select></td>";
echo "<tr><td height='87' align='left' width='935' bordercolorlight='grey' bordercolordark='grey'>".$row['descripcion']."<form target='paypal' action='https://www.paypal.com/cgi-bin/webscr' method='post'>
<input type='hidden' name='business' value='
[email protected]'>
<input type='hidden' name='cmd' value='_cart'>
<input type='hidden' name='add' value='1'>
<input type='hidden' name='item_name' value="."'".$_POST['tallas']."'".">
<input type='hidden' name='amount' value=".$row['precio'].">
<input type='hidden' name='currency_code' value='EUR'>
<input type='image' name='submit' border='0'
src='https://www.paypal.com/es_ES/ES/i/btn/btn_cart_SM.gif'
alt='PayPal - The safer, easier way to pay online'>
<img alt='' border='0' width='1' height='1'
src='https://www.paypal.com/es_ES/ES/i/scr/pixel.gif' >
</form><form target='paypal' action='https://www.paypal.com/cgi-bin/webscr'
method='post'>
<!-- Identify your business so that you can collect the payments. -->
<input type='hidden' name='business' value='
[email protected]'>
<!-- Specify a PayPal Shopping Cart View Cart button. -->
<input type='hidden' name='cmd' value='_cart'>
<input type='hidden' name='display' value='1'>
<!-- Display the View Cart button. -->
<input type='image' name='submit' border='0'
src='https://www.paypal.com/es_ES/ES/i/btn/btn_viewcart_SM.gif'
alt='PayPal - The safer, easier way to pay online' align='center'>
<img alt='' border='0' width='1' height='1'
src='https://www.paypal.com/es_ES/ES/i/scr/pixel.gif' >
</form></td></tr>";
}while($row = mysql_fetch_assoc($datos));
?>
</tr>
</table>
</div>
</body>
</html>