First commit 10/07/2002
This commit is contained in:
75
prod/cesta.php
Normal file
75
prod/cesta.php
Normal file
@ -0,0 +1,75 @@
|
||||
<style>
|
||||
td.menu
|
||||
{
|
||||
background-color:#800000;
|
||||
font-size: 12pt;
|
||||
border-style : solid;
|
||||
border-left-width : 0;
|
||||
border-top-width : 0;
|
||||
border-bottom-width : 0;
|
||||
border-right-width : 0;
|
||||
}
|
||||
td.menut
|
||||
{
|
||||
border-style:solid;
|
||||
border-left-width : 0;
|
||||
border-top-width : 1;
|
||||
border-bottom-width : 0;
|
||||
border-right-width : 0;
|
||||
border-color:#800000;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>Cesta de la compra</h1>
|
||||
|
||||
<br>
|
||||
<?
|
||||
// $error_prod = true;
|
||||
|
||||
if ( isset($error_prod) && $error_prod )
|
||||
{
|
||||
echo ' <br><br>
|
||||
<p class=remark>En estos momento la cesta de la compra esta desactivada.</p>
|
||||
|
||||
<ul>
|
||||
<li>Puede que la base de datos de productos este desconectada</li>
|
||||
<li>El servicio de cesta este desconectado</li>
|
||||
<li>Incluso que distintas partes de este servidor esten "apagadas" por mantenimiento</li>
|
||||
</ul>
|
||||
|
||||
<br><br>Intentelo mas tarde.';
|
||||
} else {
|
||||
|
||||
if (isset($itemsEnCesta)){
|
||||
echo '<script src="prod/moreinfo.js"></script>';
|
||||
|
||||
require ("open_db_prod.php" );
|
||||
|
||||
echo'<p class=remark>Contenido cesta:</p><br>';
|
||||
|
||||
$total=0.0;
|
||||
echo '<table width=100% cellspacing=0><tr><td class=menu>Descripci<63>n</td><td width=70 class=menu>PV</td><td width=10 class=menu> </td><td width=80 class=menu>unds</td></tr>';
|
||||
foreach($itemsEnCesta as $k => $v){
|
||||
$res=@mysql_query("SELECT descr,precioVenta1 FROM productos WHERE id=".$k,$conexion_prod);
|
||||
$datos=@mysql_fetch_array($res);
|
||||
$total+=$datos[1]*$v;
|
||||
echo '<tr><td><a href="#" onclick="javascript:moreInfo('.$k.');">'.$datos[0].'</a></td>';
|
||||
echo '<td style="text-align:right">'.number_format($datos[1],2,"'",".").'</td>';
|
||||
echo '<td></td>';
|
||||
echo '<td><input type=text value='.$v.' name=unds_'.$k.' size=5></td></tr>';
|
||||
}
|
||||
echo '<tr>';
|
||||
|
||||
echo '<td class=menut style="text-align:right">Base Imponible:<br>IVA 16%:<br>Total:</td>';
|
||||
echo '<td class=menut style="text-align:right">'.number_format($total,2,"'",".").'<br>'.number_format(($total*0.16),2,"'",".").'<br>'.number_format(($total*1.16),2,"'",".").'</td>';
|
||||
|
||||
echo '<td class=menut> </td>';
|
||||
echo '<td class=menut> </td>';
|
||||
echo '</tr></table>';
|
||||
|
||||
mysql_free_result($res);
|
||||
mysql_close($conexion_prod);
|
||||
}
|
||||
|
||||
} // fin cesta desconectada
|
||||
?>
|
Reference in New Issue
Block a user