for($a=0;$a<27;$a++)
{
if (hasArtistesByAlpha($alp[$a]))
{
?>
- echo strtoupper($alp[$a]); ?>
}
else
{
?>
- echo strtoupper($alp[$a]); ?>
}
} // for a
?>
if ($page!="" && is_numeric($page))
$seek = ($page-1)*16;
else $seek = 0;
if ($alpha!="" && strlen($alpha)==1)
$myquery = "SELECT albums.vignette,albums.nom,albums.id,albums.artiste,albums.tarif,albums.medium FROM albums INNER JOIN artistes ON albums.artiste=artistes.id WHERE LOWER(LEFT(artistes.nom,1))='$alpha' ORDER BY artistes.nom,albums.nom LIMIT $seek,16";
else $myquery = "SELECT albums.vignette,albums.nom,albums.id,albums.artiste,albums.tarif,albums.medium FROM albums INNER JOIN artistes ON albums.artiste=artistes.id ORDER BY artistes.nom,albums.nom LIMIT $seek,16";
$result = mysql_query($myquery,$mycon);
$nba = mysql_num_rows($result);
if ($nba>0)
{
for ($a=0;$a<$nba;$a++)
{
$q_id = mysql_result($result,$a,"albums.id");
$q_artiste = mysql_result($result,$a,"albums.artiste");
$q_nom = mysql_result($result,$a,"albums.nom");
$q_vignette = mysql_result($result,$a,"albums.vignette");
$q_tarif = mysql_result($result,$a,"albums.tarif");
$q_medium = mysql_result($result,$a,"albums.medium");
?>
} // for a
} // if nba
if ($alpha!="" && strlen($alpha)==1)
$myquery = "SELECT albums.id FROM albums INNER JOIN artistes ON albums.artiste=artistes.id WHERE LOWER(LEFT(artistes.nom,1))='$alpha' ORDER BY artistes.nom,albums.nom";
else $myquery = "SELECT albums.id FROM albums INNER JOIN artistes ON albums.artiste=artistes.id ORDER BY artistes.nom,albums.nom";
$result = mysql_query($myquery,$mycon);
$totala = mysql_num_rows($result);
if ($totala>0)
{
$nbpages = ceil($totala/16);
?>
Page:
if ($page<=1)
{
?>
- Précédante
}
else
{
?>
- &p= echo $page-1; ?>">Précédante
}
for ($p=0;$p<$nbpages;$p++)
{
if ($page==($p+1))
{
?>
- echo $p+1; ?>
} // if page
else
{
?>
- &p= echo $p+1; ?>"> echo $p+1; ?>
} // else (if page)
} // for p
if ($page>=$nbpages)
{
?>
- Suivante
}
else
{
?>
- &p= echo $page+1; ?>">Suivante
}
?>
} // if totala
?>