echo $page_title; ?>
|
$connect= mysql_connect($host,$login,$pass);
mysql_select_db($base, $connect);
$query="SELECT idalbum, COUNT(idalbum) FROM mcgallery GROUP BY idalbum";
$result=mysql_query($query);
$nbre_album= mysql_num_rows($result);
if ($nbre_album==1)
{
$album_unique=mysql_fetch_row($result);
$album=$album_unique[0];
echo ' | ';
}
elseif ($nbre_album>1)
{
?>
echo $l_Albums; ?>
: |
$query="SELECT idalbum, album, COUNT(id) FROM mcgallery GROUP BY idalbum";
$result=mysql_query($query);
while($row=mysql_fetch_row($result))
{
echo '';
if ($row[0]==$album) { echo ''; }
echo ''.stripslashes($row[1]).'';
if ($row[0]==$album) { echo ''; }
echo ' | ';
echo ''.$row[2].' '.$l_photos.' | ';
}
echo 'powered by mcGallery | ';
}
?>
|
if ($album=='')
{
echo 'mcGallery ';
echo ''.$l_Select.'';
}
else
{
$query="SELECT id, album FROM mcgallery WHERE idalbum='$album'";
$result=mysql_query($query);
$nbre=mysql_num_rows($result);
$row2=mysql_fetch_array($result);
echo '';
echo '';
echo ''.stripslashes($row2['album']).' | ';
echo '';
if ($start=='') { $start=0; }
$query="SELECT file, title FROM mcgallery WHERE idalbum=$album ORDER BY file LIMIT $start, 9";
$result=mysql_query($query);
echo '('.$nbre.' '.$l_photos.') | ';
$j=0;
$k=0;
while ($row2=mysql_fetch_array($result))
{
$len= strlen($album);
$image= substr($row2['file'], ($len + 1));
echo ''.shadow($album, $image, $start);
echo '';
if ($row2['title']!='') { echo stripslashes($row2['title']); }
else { echo ' '; }
echo ' | ';
$j++;
if ($j%3==0)
{
echo ' ';
$k++;
}
}
if ($j%3==2) { echo ' | '; }
if ($j%3==1) { echo ' | | '; }
$k++;
if ($k==1)
{
echo ' | | | ';
echo ' | | | ';
}
if ($k==2)
{
echo ' | | | ';
}
echo '';
echo ''.$l_page.': ';
// navigation
$i=1;
while ($i<(($start + 9)/9))
{
echo ''.$i.' ';
$i++;
}
echo ' '.$i.' ';
$i++;
while ($i<=ceil($nbre/ 9))
{
echo ''.$i.' ';
$i++;
}
// fin navigation
$query= "SELECT descr FROM mcgallery_album WHERE idalbum=$album";
$res= mysql_query($query);
$alb_descr= mysql_fetch_row($res);
if ($alb_descr[0]!='')
{
echo ' | ';
echo '';
echo nl2br(stripslashes($alb_descr[0])).$width;
echo ' | ';
echo '';
}
echo ' | ';
}
?>
|