<?php
$disco = $_GET['disco'];
if (!isset($disco)){
$queryA = mysql_query('SELECT `openClose`, `dnombre`, `url` FROM `listas` ORDER BY `mGusta` DESC;');
$queryB = mysql_query('SELECT `openClose`, `dnombre`, `url` FROM `listas` ORDER BY `mGusta` DESC;');
$queryC = mysql_query('SELECT * FROM `listas` ORDER BY `mGusta` DESC LIMIT 10;');
$queryD = mysql_query('SELECT * FROM `listas`;');
//$queryD = mysql_query('SELECT * `url`, `dnombre`, `id`, `eventoV`, `eventoS`, `eventoD`, `dia`, `mes`, `descripcion`, `acompa`, `precio`, `mGusta`, `nGusta`, `openClose` FROM `listas`');
echo '<p><font size="4">Las listas de NightStyleBcn.<strong>com</strong></font></p><hr /><br>
<p><div id="mostrarDiv"><a href="javascript:mostrardiv();"><font size="3"><strong>Seleccionar Discoteca/Club</font></strong></a></div></font></a></p>
<hr/><div id="flotante" style="display:none;">
<p align="center"><caption><strong><font color="seagreen" size="3"><em>Discotecas abiertas</em></font></strong></caption></p>
<table>';
while($lista = mysql_fetch_array($queryA)) {
if($lista['openClose'] == 'open'){
echo '<tr>
<td><a href="?disco='.$lista['url'].'"><img src="http://otland.net/f16/images/'.$lista['dnombre'].'.png" alt="'.$lista['dnombre'].'"></img></a></td>
</tr>';
}else{
echo 'No hay ninguna <strong>Discoteca o Club</strong> abierto.';
}}
echo '</table>
<p align="center"><caption><strong><font color="red" size="3"><em>Discotecas cerradas</em></font></strong></caption></p>';
echo '<table>';
while($lista = mysql_fetch_array($queryB)){
if($lista['openClose'] == 'close'){
echo '<tr>
<td><img src="http://otland.net/f16/images/'.$lista['dnombre'].'.png" alt="'.$lista['dnombre'].'"></img></td>
</tr>';
}else{
echo 'No hay ninguna <strong>Discoteca o Club</strong> cerrado.';
}}
echo '</table>
<p align="right"><a href="javascript:cerrar();"><font size="2"><strong>Cerrar Ventana</strong></font></a></p><hr /></div>
<table><p align="center"><font size="3"><strong>Top 10 Mejores Discotecas/Clubs</strong></font></p><hr />';
while($lista = mysql_fetch_array($queryC)){
echo '
<tr align="center">
<th></th>
<th>Resumen</th>
<th></th>
<th><img src="http://otland.net/f16/images/Y.png"></img></th>
<th><img src="http://otland.net/f16/images/N.gif"></img></th>
</tr>
<tr align="center">
<td><img src="http://otland.net/f16/images/'.$lista['dnombre'].'.png" alt="'.$lista['dnombre'].'"></img></td>
<td><strong><center>'.$lista['dnombre'].'</strong> es un club de música electrónica completamente nuevo, en el que los espacios interiores y el exteriores se funden para crear una nueva experiencia de clubbing de calidad en Barcelona</center></td>
<td><a href="listas.php?disco='.$lista['url'].'"><strong>Mas...</strong></a></td>
<td><a href=""><strong>'.number_format($lista['mGusta'], 0, '', '.').'</strong></a></td>
<td><a href=""><strong>'.number_format($lista['nGusta'], 0, '', '.').'</strong></a></td>
</tr>';
}
echo '</table>';
}while($info = mysql_fetch_array($queryD)){
elseif($disco == $info['url']){
echo '<p>Working? '.$info['dname'].'</p>';
}}
?>