First commit 10/07/2002
This commit is contained in:
70
prod/moreinfo.php
Normal file
70
prod/moreinfo.php
Normal file
@ -0,0 +1,70 @@
|
||||
<html>
|
||||
<head><title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
<?
|
||||
require ("open_db_prod.php" );
|
||||
|
||||
if ( isset( $idp ) )
|
||||
{
|
||||
$res = @mysql_query( "SELECT p.cprod, p.descr, p.precioVenta1, i.tipo AS iva, p.notas, p.fabricante, p.garantia, p.imgH, p.imgW FROM productos AS p, tipos_iva AS i WHERE p.id=$idp AND i.id=p.tipo_iva",$conexion_prod ) or die(mysql_error($conexion_prod));
|
||||
if ( @mysql_num_rows($res)>0 )
|
||||
{
|
||||
list( $db_cprod, $db_descr, $db_pv, $db_iva, $db_notas, $db_fabr, $db_gar, $db_imgH, $db_imgW ) = @mysql_fetch_array( $res );
|
||||
echo "<table>".
|
||||
"<tr><td colspan=2>".
|
||||
"<b>$db_descr</b></td></tr>".
|
||||
"<tr><td>";
|
||||
echo "<br><b>C<>digo:</b> $db_cprod".
|
||||
|
||||
"<br><b>Precio:</b> $db_pv <20>".
|
||||
"<br><b>IVA:</b> $db_iva".
|
||||
"<br><b>Garant<6E>a:</b> $db_gar meses".
|
||||
"<br><b>Fabricante:</b> <a href='$db_fabr' target=_new>$db_fabr</a>";
|
||||
echo "</td><td width=300 valign=top>";
|
||||
if ( $db_imgH > 0 )
|
||||
{
|
||||
echo '<img src="getImg.php?idf='.$idp.'" '.resize( $db_imgH, $db_imgW ).'>';
|
||||
}
|
||||
echo "</td></tr></table>";
|
||||
echo "<b>Notas:</b><br> ".nl2br($db_notas)."<br><br><br>";
|
||||
}
|
||||
}
|
||||
|
||||
mysql_free_result($res);
|
||||
mysql_close($conexion);
|
||||
|
||||
function resize($H, $W)
|
||||
{
|
||||
$nW = 200; $nH = 200;
|
||||
$image_prop = "";
|
||||
|
||||
if ( $W > 0 )
|
||||
{
|
||||
if ( !($W < $nW ||$H < $nH ) )
|
||||
{
|
||||
if ( $W > $H )
|
||||
{
|
||||
$nH = intval(($H/$W)*$nW); $image_prop = " width=\"$nW\" height=\"".$nH."\"";
|
||||
} else {
|
||||
$nW = intval(($W/$H)*$nH); $image_prop = " height=\"$nH\" width=\"".$nW."\"";
|
||||
}
|
||||
} else {
|
||||
$image_prop=" width=\"$W\" height=\"$H\"";
|
||||
}
|
||||
}
|
||||
|
||||
return $image_prop;
|
||||
}
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user