<div style="border-bottom:1px dotted #ccc; width:295px"> TOP ARTISTAS:</div>
<?php
$k1=mysql_query("select id,artista,genero,Hits from artistas order by Hits desc limit 5");                  
while($k2 = mysql_fetch_array($k1)) 
	{ 

	$art="".$k2["artista"]."";
	$art=strtolower(str_replace(" ","-",$art));
	$generos="".$k2["genero"]."";
	$generos=strtolower(str_replace(" ","-",$generos));
	$cancion="".$k2["cancion"]."";
	$cancion=strtolower(str_replace(" ","-",$cancion));

$x++;
if ($x==1){$lista = '80';}
if ($x==2){$lista = '75';}
if ($x==3){$lista = '70';}
if ($x==4){$lista = '65';}
if ($x==5){$lista = '60';}
if ($x==6){$lista ='55';}
if ($x==7){$lista = '50';}
if ($x==8){$lista = '45';}
if ($x==9){$lista = '40';}
if ($x==10){$lista = '35';}
if ($x==11){$lista = '30';}
if ($x==12){$lista = '25';}
if ($x==13){$lista = '20';}
if ($x==14){$lista = '15';}

$en++;
echo "
<div style='clear: both;margin-bottom:2px ; '>
<div style='float: left; width:45px; height:60px; color:#E2E2E2;font:normal 35px Arial; text-align:center'>$en</div>
<div style='float: left; padding:10px 0 0 5px;'>

<div style='width:235px;'><a href='$root/$art/$generos/' class=t2>".$k2["artista"]."</a></div>
<div style='width:235px;'><a href='$root/$generos/' class=t1>» ".$k2["genero"]."</a></div>
<div style=\"float:right;\">» <b>".$k2["Hits"]."</b>. Visitas</div>
<div style='background-image: url(\"./images/i-strell1.jpg\"); height:15px; width:".$lista."px'><img src='' width=1 height=1></div>
<hr size=1 color=#cccccc; />
</div>
</div>";
}
?>


<div style="height:90px"></div>

<div style="border-bottom:1px dotted #ccc; width:295px"> TOP CANCIONES:</div>
<?php
$k1=mysql_query("select id,genero,artista,cancion,Hits from canciones  order by hits desc limit 5");                  
while($k2 = mysql_fetch_array($k1)){ 

	$art="".$k2["artista"]."";
	$art=strtolower(str_replace(" ","-",$art));
	$generos="".$k2["genero"]."";
	$generos=strtolower(str_replace(" ","-",$generos));
	$cancion="".$k2["cancion"]."";
	$cancion=strtolower(str_replace(" ","-",$cancion));
	$id="".$k2["id"]."";
	$id=str_replace(" ","_",$id);

$k++;
if ($k==1){$lista = '80';}
if ($k==2){$lista = '75';}
if ($k==3){$lista = '70';}
if ($k==4){$lista = '65';}
if ($k==5){$lista = '60';}
if ($k==6){$lista ='55';}
if ($k==7){$lista = '50';}
if ($k==8){$lista = '45';}
if ($k==9){$lista = '40';}
if ($k==10){$lista = '35';}
if ($k==11){$lista = '30';}
if ($k==12){$lista = '25';}
if ($k==13){$lista = '20';}
if ($k==14){$lista = '15';}

$enumerar++;
echo "<div style=\"clear: both;margin-bottom:5px\">

<div style=\"float: left; width:45px; height:60px; color:#E2E2E2;font:normal 35px Arial; text-align:center\">$enumerar</div>
<div style=\"float: left; padding:10px 0 0 5px;\">

<div style=\"width:235px;\"><a href=\"$root/$art/$generos/$cancion/$id/\" class=t2>".$k2["cancion"]."</a></div>
<div style=\"width:235px;\"><a href=\"$root/$art/$generos/\" class=t1>".$k2["artista"]." - ".$k2["genero"]."</a></div>
<div style=\"float:right;\">» <b>".$k2["Hits"]."</b>. Visitas</div>
<div style=\"background-image: url('./images/i-strell1.jpg'); height:15px; width:".$lista."px\"><img src=\"\" width=1 height=1></div>
<hr size=1 color=#cccccc; />
</div>
</div>";
}
?>





<?php 
/*

$estiloscss = array("tag2","tag3","tag4","tag5");

if(isset($_GET['artista'])){
$lp=str_replace("-"," ",$_GET['artista']);
$art = mysql_query("SELECT id,artista,genero,cancion FROM canciones where artista = '{$lp}' ORDER BY artista LIMIT 30"); 
while($arts = mysql_fetch_array($art)){

$art_temx=str_replace($arts['artista'],"",$arts['cancion']);
$temx=str_replace(" - "," ",$art_temx);

$alazar = rand(0,count($estiloscss)-1);
echo "<a class=\"".$estiloscss[$alazar]."\" alt=\"".$arts["artista"]."\" title=\"".$arts["artista"]."\" href=\"./".strtolower(inversa($arts["artista"]))."/".strtolower(inversa($arts["genero"]))."/".strtolower(inversa($arts["cancion"]))."/".$arts["id"]."/\"> ".$temx." </a>&nbsp;";
}

}else{

if(isset($_GET['genero'])){
if(strlen($_GET['genero']) <= 1){
$art = mysql_query("SELECT genero,artista FROM artistas where genero = '$genero' or artista LIKE '$genero%' ORDER BY RAND() LIMIT 30");

}else{

$art = mysql_query("SELECT genero,artista FROM artistas where genero = '$genero' ORDER BY RAND() LIMIT 30");
}
while($arts = mysql_fetch_array($art)){
$alazar = rand(0,count($estiloscss)-1);
echo "<a class=\"".$estiloscss[$alazar]."\" alt=\"".$arts["artista"]."\" title=\"".$arts["artista"]."\" href=\"./".strtolower(inversa($arts["artista"]))."/".strtolower(inversa($arts["genero"]))."/\"> ".$arts["artista"]." </a>&nbsp;";
}

 }else{

$art = mysql_query("SELECT genero,artista FROM artistas ORDER BY Hits DESC LIMIT 30");
while($arts = mysql_fetch_array($art)){
$alazar = rand(0,count($estiloscss)-1);
echo "<a class=\"".$estiloscss[$alazar]."\" alt=\"".$arts["artista"]."\" title=\"".$arts["artista"]."\" href=\"./".strtolower(inversa($arts["artista"]))."/".strtolower(inversa($arts["genero"]))."/\"> ".$arts["artista"]." </a>&nbsp;";
}
}
} 

*/
?>