PortalMusica.com/ver_artista.php
2021-09-12 22:43:41 +02:00

53 lines
1.4 KiB
PHP

<?
echo '<a href="./?dgo=default.php">Listado de temas</a> -> Artistas';
if ( isset( $ida ) )
{
muestraArtista( $conexion, $ida );
}
function resize($H, $W, $nW=100, $nH=100)
{
// $nW = 100; $nH = 100;
$image_prop = "";
if ( $W > 0 )
{
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."\"";
}
return $image_prop;
}
}
function muestraArtista( $cnx, $ida )
{
$res = @mysql_query( "SELECT id, Instrumento, comentario, CONCAT(nombre, ' ', apellido), Foto_mime, Foto_w, Foto_h FROM artistas WHERE id = $ida", $cnx );
$datos=@mysql_fetch_array($res);
list ( $db_ida, $db_instrumento, $db_notas, $db_nomb, $db_foto, $db_FW, $db_FH ) = $datos;
echo "<br><br><br>";
$img = "db/artistas/$db_ida"."_i001@$db_foto";
if ( !file_exists( $img ) ) $img="images/no_person.gif";
echo "<img align=right src=\"$img\"".resize($db_FH, $db_FW,100,150)." border=0>";
echo "<p class=eBIG>$db_nomb</p><br><br>Instrumento &oacute; Funci&oacute;n en el grupo:<br>&nbsp;&nbsp;&nbsp;$db_instrumento";
echo "<p><br><br><br></p>";
echo "<table width=100% cellpadding=0 cellspacing=0 class=\"td_lista\"><tr>";
echo "<td class=menuL>Datos de interes...</td>";
echo "</tr></table><br>";
echo nl2br(urldecode( $db_notas ));
}
?>