//// INCLUIR EM TODAS AS PÁGINAS ////
include ("ligacao_bd.php");
?>
include_once '../languageSelector.php';?>
include ("comum.php");?>
include ("../header_level1.php"); ?>
include ("menu_seccao.php"); ?>
/>
$result = mysql_query("SELECT * FROM musica_tipo WHERE 1",$connection);
while($row = mysql_fetch_array($result)){
extract($row);
?>
$result2 = mysql_query("SELECT * FROM musicas WHERE id_tipo='".$id_tipo."' ORDER BY `nome` ASC",$connection);
while($row2 = mysql_fetch_array($result2)){
extract($row2);
?>
}
?>
}
?>
if (isset($_GET["musica_id"])){
$result = mysql_query("SELECT * FROM musicas WHERE id='".$_GET["musica_id"]."'",$connection);
$row = mysql_fetch_array($result);
extract($row);
}
else{
$result = mysql_query("SELECT * FROM musicas WHERE 1",$connection);
$num = mysql_num_rows($result);
$registo = rand(0, $num);
for($i = 0; $i <= $registo; $i++){
$row = mysql_fetch_array($result);
extract($row);
}
}
?>