Просмотр файла script/category.php

Размер файла: 21.15Kb
<?php
/*-----------------------------------------------------------------------------------------
mcGalleryPRO
All code is © 2003 Marc Cagninacci.
No files may be redistributed in whole or significant part.
----------------- mcgalleryPRO IS NOT FREE SOFTWARE -------------------
You should have receive a file called license.txt in this package
--------------------------------------------------------------------------------------------*/


if (isset($sel)) { unset($_SESSION['cat']); }
$cat = urldecode(stripslashes($_SESSION['cat']));
$cats = str_replace("'", "%", $cat);

 if (empty($_SESSION['private_login']))
 {
 $album_level = 'level = 1';
 }
 else
 {
	if ($_SESSION['level'] == 'admin' || $_SESSION['level'] == 'all') $album_level = 'level > 0';
	else  $album_level = 'level = 1 OR level IN ('. $_SESSION['level'].')';
 }

 $query = "SELECT idalbum, thumb FROM mcgallery_albumphoto WHERE $album_level";
 $res = (mysql_query($query));
 $liste_albumsP = array();
 $liste_thumbsP = array();
 while ($rowP = mysql_fetch_array ($res))
 {
  $liste_albumsP[] = $rowP['idalbum'];
  $liste_thumbsP[$rowP['idalbum']] = $rowP['thumb'];
  }
 if (empty($liste_albumsP)) $listeP = 0;
 else $listeP = implode (',', $liste_albumsP);

$querycat = "SELECT cat FROM mcgallery_photo WHERE idalbum IN ($listeP) GROUP BY cat";
$rescat = mysql_query($querycat);
  $nbp = mysql_num_rows($rescat);
  if ($nbp > 0)
  {
  echo '<td class="td0" colspan="3"><font size="2">'.$l_Photos.'</font></td></tr>';
  }
while ($rowcat = mysql_fetch_array($rescat))
{
if ($rowcat['cat'] == $cat && $tab == 'p' && $searchalb < 3) { $fleche = 'bas.gif'; $bold = '<b>'; $Fbold = '</b>'; }
else  { $fleche = 'droit.gif'; $bold = ''; $Fbold = ''; }
echo '<tr><td class="td1" align="center" width="'.$thumb_title.'"><a href="index.php?tab=p&cat='.stripslashes(urlencode($rowcat['cat'])).'" onMouseOver="window.status=\'\';return true"><img src="images/'.$fleche.'" border="0" alt=""></a></td>';
echo '<td class="td2" width="100%" colspan="2"><font size="1">'.$bold;
echo '<a href="index.php?tab=p&cat='.urlencode(stripslashes($rowcat['cat'])).'" class="lien1" onMouseOver="window.status=\'\';return true">'.stripslashes($rowcat['cat']).'</a>'.$Fbold.'</font></td></tr>';
unset($bold);
unset($Fbold);
echo "\n";

if ($rowcat['cat'] == $cat && $tab == 'p')
{
// start photos
$query = "SELECT idalbum, album, COUNT(id) FROM mcgallery_photo WHERE idalbum IN ($listeP) AND cat LIKE '$cats' GROUP BY idalbum ORDER BY album";
$result = mysql_query($query);
 while($row = mysql_fetch_row($result))
 {
    $thumb = $liste_thumbsP[$row[0]] ;
    if ($thumb == '' || $thumb_title == 0) { $thumb = 'images/blank.gif'; }
    else { $thumb = 'photos/'.$row[0].'/small/'.$thumb; }
    echo '<tr><td class="td2" width="'.$thumb_title.'">';
    echo '<a href="index.php?album='.$row[0].'" onMouseOver="window.status=\'\';return true"><img src="'.$thumb.'" width="'.$thumb_title.'" height="'.($thumb_title /4*3).'" border="0" alt=""></a></td>';
    echo "\n";
    echo '<td class="td2" width="100%"><font size="1">';
    if ($row[0] == $album && $video == 0 && $flash == 0 && $searchalb < 2)  { echo '<b>'; }
    echo '<a href="index.php?album='.$row[0].'" class="lien1" onMouseOver="window.status=\'\';return true">'.stripslashes($row[1]).'</a>';
    if ($row[0] == $album && $video == 0 && $flash == 0 && $searchalb < 2)  { echo '</b>'; }
    echo '</font>';
    echo '</td>';
    echo '<td class="td2" align="right" nowrap><font size="1">'.$row[2].' '.$l_photos.'</font></td></tr>';
	echo "\n";
 }
}
echo "\n";
}

///////
 if (!empty($_SESSION['private_login']))
 {
 $private_login = $_SESSION['private_login'];
  $query="SELECT COUNT(file) FROM mcgallery_select WHERE type='P' AND login='$private_login'";
  $result=mysql_query($query);
  $nbre_sel = mysql_fetch_row($result);
  if ($nbre_sel[0] > 0)
    {
    if ($nbp == 0 && $nbpp == 0)  { echo '<td class="td0" colspan="3"><font size="2">'.$l_Photos.'</font></td></tr>'; }
    echo '<tr><td class="td1" align="center"><img src="images/sel.gif" border="0"></td>';
    echo '<td class="td2" width="100%"><font size="1">';
    if ($sel == 'P' && $l == '')  { echo '<b>'; }
    echo '<a href="index.php?sel=P" class="lien1" onMouseOver="window.status=\'\';return true">'.$l_your_select.'</a>';
    if ($sel == 'P' && $l == '')  { echo '</b>'; }
    echo '</font>';
    echo '</td>';
    echo '<td class="td2" align="right" nowrap><font size="1">'.$nbre_sel[0].' '.$l_photos.'</font></td></tr>';
    }
  if ($_SESSION['level'] == 'admin')
  {
   $query="SELECT login, COUNT(file) as vid FROM mcgallery_select WHERE type='P' AND login != '$private_login' GROUP BY login ORDER BY login";
   $result=mysql_query($query);
   $nbre_sel_l = mysql_num_rows($result);
   if ($nbre_sel_l > 0)
   {
     if ($nbp == 0 && $nbpp == 0 & $nbre_sel[0] == 0) { echo '<tr><td class="td1" colspan="2"><font face="'.$rowd['fontface'].'" size="2">'.$l_Photos.'</font></td></tr>'; }
     while ($selec=mysql_fetch_array($result))
     {
    //
    echo '<tr><td class="td1" align="center"><img src="images/sel.gif" border="0"></td>';
    //
     echo '<td class="td2" width="100%"><font size="1">';
     if ($sel == 'P' && $l == $selec['login'])  { echo '<b>'; }
     echo '<a href="index.php?sel=P&l='.$selec['login'].'" class="lien1" onMouseOver="window.status=\'\';return true">'.$l_sel_add.': '.$selec['login'].'</a>';
     if ($sel == 'P' && $l == $selec['login'])  { echo '</b>'; }
     echo '</font>';
     echo '</td>';
     echo '<td class="td2" align="right" nowrap><font size="1">'.$selec['vid'].' '.$l_photos.'</font></td></tr>';
	 echo "\n";
     }
   }
  }
 }

 // All Albums Category
if ($use_cat == 2 && ($nbp + $nbpp) > 1)
{
if ($cat == 'a' && $tab == 'p') { $fleche = 'bas.gif'; $bold = '<b>'; $Fbold = '</b>'; }
else  { $fleche = 'droit.gif'; $bold = ''; $Fbold = ''; }
echo '<tr><td class="td1" align="center"><a href="index.php?tab=p&cat=a" onMouseOver="window.status=\'\';return true"><img src="images/'.$fleche.'" border="0" alt=""></a></td>';
echo '<td class="td2" width="100%" colspan="2"><font size="1">'.$bold;
echo '<a href="index.php?tab=p&cat=a" class="lien1" onMouseOver="window.status=\'\';return true">'.stripslashes($l_allcat).'</a>'.$Fbold.'</font></td></tr>';
unset($bold);
unset($Fbold);

//if ($l_allcat == $cat && $tab == 'p')
if ($cat == 'a' && $tab == 'p')
{
$query="SELECT idalbum, album, COUNT(id) FROM mcgallery_photo WHERE idalbum IN ($listeP) GROUP BY idalbum ORDER BY album";
$result=mysql_query($query);
 while($row=mysql_fetch_row($result))
 {
    $thumb = $liste_thumbsP[$row[0]] ;
    if ($thumb == '' || $thumb_title == 0) { $thumb = 'images/blank.gif'; }
    else { $thumb = 'photos/'.$row[0].'/small/'.$thumb; }
    echo '<tr><td class="td2" width="'.$thumb_title.'">';
    echo '<a href="index.php?album='.$row[0].'" onMouseOver="window.status=\'\';return true"><img src="'.$thumb.'" width="'.$thumb_title.'" height="'.($thumb_title /4*3).'" border="0" alt=""></a></td>';
    //
    echo '<td class="td2" width="100%"><font size="1">';
    if ($row[0] == $album && $video == 0 && $flash == 0 && $searchalb < 2)  { echo '<b>'; }
    echo '<a href="index.php?album='.$row[0].'" class="lien1" onMouseOver="window.status=\'\';return true">'.stripslashes($row[1]).'</a>';
    if ($row[0] == $album && $video == 0 && $flash == 0 && $searchalb < 2)  { echo '</b>'; }
    echo '</font>';
    echo '</td>';
    echo '<td class="td2" align="right" nowrap><font size="1">'.$row[2].' '.$l_photos.'</font></td></tr>';
	echo "\n";
 }
}
}
// Top Ten
if (($nbp + $nbpp + $nbre_sel_l > 0) && ($use_topten{0} == 2 || ($use_topten{0} == 1 && !empty($_SESSION['private_login']))))
{
include 'topten_p.php';
}
 // end photos

 $query = "SELECT idalbum, thumb FROM mcgallery_albumvideo WHERE $album_level";
 $res = (mysql_query($query));
 $liste_thumbsV = array();
 $liste_albumsV = array();
 while ($rowV = mysql_fetch_array ($res))
 {
 $liste_albumsV[] = $rowV['idalbum'];
 $liste_thumbsV[$rowV['idalbum']] = $rowV['thumb'];
  }
 if (empty($liste_albumsV)) $listeV = 0;
 else $listeV = implode (',', $liste_albumsV);

$querycat = "SELECT cat FROM mcgallery_video WHERE idalbum IN ($listeV) GROUP BY cat";
$rescat = mysql_query($querycat);
  $nbv = mysql_num_rows($rescat);
  if ($nbv > 0)
  {
  echo '<td class="td0" colspan="3"><font size="2">'.$l_Videos.'</font></td></tr>';
  }
while ($rowcat = mysql_fetch_array($rescat))
{
if ($rowcat['cat'] == $cat && $tab == 'v' && $searchalb < 3) { $fleche = 'bas.gif';  $bold = '<b>'; $Fbold = '</b>'; }
else  { $fleche = 'droit.gif'; $bold = ''; $Fbold = ''; }
echo '<tr><td class="td1" align="center"><a href="index.php?tab=v&cat='.stripslashes(urlencode($rowcat['cat'])).'" onMouseOver="window.status=\'\';return true"><img src="images/'.$fleche.'" border="0" alt=""></a></td>';
echo '<td class="td2" width="100%" colspan="2"><font size="1">'.$bold;
echo '<a href="index.php?tab=v&cat='.stripslashes(urlencode($rowcat['cat'])).'" class="lien1" onMouseOver="window.status=\'\';return true">'.stripslashes($rowcat['cat']).'</a>'.$Fbold.'</font></td></tr>';
unset($bold);
unset($Fbold);

if ($rowcat['cat'] == $cat && $tab == 'v')
{

$query="SELECT idalbum, album, COUNT(id) FROM mcgallery_video WHERE idalbum IN ($listeV) AND cat LIKE '$cats' GROUP BY idalbum ORDER BY album";
$result=mysql_query($query);
   while($row=mysql_fetch_row($result))
   {
    $thumb = $liste_thumbsV[$row[0]] ;
    if ($thumb == '' || $thumb_title == 0) { $thumb = 'images/blank.gif'; }
    else { $thumb = 'videos/'.$row[0].'/small/'.$thumb; }
    echo '<tr><td class="td2" width="'.$thumb_title.'">';
    echo '<a href="index.php?video=1&album='.$row[0].'" onMouseOver="window.status=\'\';return true"><img src="'.$thumb.'" width="'.$thumb_title.'" height="'.($thumb_title /4*3).'" border="0" alt=""></a></td>';
    //
    echo '<td class="td2" width="100%"><font size="1">';
    if ($row[0]==$album && $video==1 && $searchalb < 2)  { echo '<b>'; }
    echo '<a href="index.php?video=1&album='.$row[0].'" class="lien1" onMouseOver="window.status=\'\';return true">'.stripslashes($row[1]).'</a>';
    if ($row[0]==$album && $video==1 && $searchalb < 2)  { echo '</b>'; }
    echo '</font>';
    echo '</td>';
    echo '<td class="td2" align="right" nowrap><font size="1">'.$row[2].' '.$l_videos.'</font></td></tr>';
	echo "\n";
   }
  }
  echo "\n";
}

 if (!empty($_SESSION['private_login']))
 {
 $private_login = $_SESSION['private_login'];
  $query="SELECT COUNT(file) FROM mcgallery_select WHERE type='V' AND login='$private_login'";
  $result=mysql_query($query);
  $nbre_sel = mysql_fetch_row($result);
  if ($nbre_sel[0] > 0)
  {
     if ($nbv == 0 && $nbvp == 0) { echo '<tr><td class="td0" colspan="3"><font size="2">'.$l_Videos.'</font></td></tr>'; }
    echo '<tr><td class="td1" align="center"><img src="images/sel.gif" border="0"></td>';
    echo '<td class="td2" width="100%"><font size="1">';
    if ($sel == 'V' && $l == '')  { echo '<b>'; }
    echo '<a href="index.php?sel=V" class="lien1" onMouseOver="window.status=\'\';return true">'.$l_your_select.'</a>';
    if ($sel == 'V' && $l == '')  { echo '</b>'; }
    echo '</font>';
    echo '</td>';
    echo '<td class="td2" align="right" nowrap><font size="1">'.$nbre_sel[0].' '.$l_videos.'</font></td></tr>';
  }
  if ($_SESSION['level'] == 'admin')
  {
   $query="SELECT login, COUNT(file) as vid FROM mcgallery_select WHERE type='V' AND login != '$private_login' GROUP BY login ORDER BY login";
   $result=mysql_query($query);
   $nbre_sel_l = mysql_num_rows($result);
   if ($nbre_sel_l > 0)
   {
     if ($nbv == 0 && $nbvp == 0 & $nbre_sel[0] == 0) { echo '<tr><td class="td0" colspan="3"><font size="2">'.$l_Videos.'</font></td></tr>'; }
     while ($selec=mysql_fetch_array($result))
     {
    //
    echo '<tr><td class="td1" align="center"><img src="images/sel.gif" border="0"></td>';
    //
     echo '<td class="td2" width="100%"><font face="'.$rowd['fontface'].'" size="1">';
     if ($sel == 'V' && $l == $selec['login'])  { echo '<b>'; }
     echo '<a href="index.php?sel=V&l='.$selec['login'].'" class="lien1" onMouseOver="window.status=\'\';return true">'.$l_sel_add.': '.$selec['login'].'</a>';
     if ($sel == 'V' && $l == $selec['login'])  { echo '</b>'; }
     echo '</font>';
     echo '</td>';
     echo '<td class="td2" align="right" nowrap><font size="1">'.$selec['vid'].' '.$l_videos.'</font></td></tr>';
	 echo "\n";
     }
   }
  }
  echo "\n";
 }  

if ($use_cat == 2 && ($nbv + $nbvp) > 1)
{
//////
if ($cat == 'a' && $tab =='v') { $fleche = 'bas.gif'; $bold = '<b>'; $Fbold = '</b>'; }
else  { $fleche = 'droit.gif'; $bold = ''; $Fbold = ''; }
echo '<tr><td class="td1" align="center"><a href="index.php?tab=v&cat=a" onMouseOver="window.status=\'\';return true"><img src="images/'.$fleche.'" border="0" alt=""></a></td>';
echo '<td class="td2" width="100%" colspan="2"><font size="1">'.$bold;
echo '<a href="index.php?tab=v&cat=a" class="lien1" onMouseOver="window.status=\'\';return true">'.stripslashes($l_allcat).'</a>'.$Fbold.'</font></td></tr>';
unset($bold);
unset($Fbold);

if ($cat == 'a' && $tab =='v')
{
$query="SELECT idalbum, album, COUNT(id) FROM mcgallery_video WHERE idalbum IN ($listeV) GROUP BY idalbum ORDER BY album";
$result=mysql_query($query);
 while($row=mysql_fetch_row($result))
 {
    $thumb = $liste_thumbsP[$row[0]] ;
    if ($thumb == '' || $thumb_title == 0) { $thumb = 'images/blank.gif'; }
    else { $thumb = 'videos/'.$row[0].'/small/'.$thumb; }
    echo '<tr><td class="td2" width="'.$thumb_title.'">';
    echo '<a href="index.php?video=1&album='.$row[0].'" onMouseOver="window.status=\'\';return true"><img src="'.$thumb.'" width="'.$thumb_title.'" height="'.($thumb_title /4*3).'" border="0" alt=""></a></td>';
    //
    echo '<td class="td2" width="100%"><font size="1">';
    if ($row[0]==$album && $video==1&& $searchalb < 2)  { echo '<b>'; }
    echo '<a href="index.php?video=1&album='.$row[0].'" class="lien1" onMouseOver="window.status=\'\';return true">'.stripslashes($row[1]).'</a>';
    if ($row[0]==$album && $video==1 && $searchalb < 2)  { echo '</b>'; }
    echo '</font>';
    echo '</td>';
    echo '<td class="td2" align="right" nowrap><font size="1">'.$row[2].' '.$l_videos.'</font></td></tr>';
	echo "\n";
 }
}
}
// Top Ten
if (($nbv + $nbvp + $nbre_sel_l > 0) && ($use_topten{0} == 2 || ($use_topten{0} == 1 && !empty($_SESSION['private_login']))))
{
include 'topten_v.php';
}

// end video

 $query = "SELECT idalbum, thumb FROM mcgallery_albumflash WHERE $album_level";
 $res = (mysql_query($query));
 $liste_thumbsF = array();
 $liste_albumsF = array();
 while ($rowF = mysql_fetch_array ($res))
 {
 $liste_albumsF[] = $rowF['idalbum'];
 $liste_thumbsF[$rowF['idalbum']] = $rowF['thumb'];
  }
 if (empty($liste_albumsF)) $listeF = 0;
 else $listeF = implode (',', $liste_albumsF);

$querycat = "SELECT cat FROM mcgallery_flash WHERE idalbum IN ($listeF) GROUP BY cat";
$rescat = mysql_query($querycat);
  $nbf = mysql_num_rows($rescat);
  if ($nbf > 0)
  {
  echo '<td class="td0" colspan="3"><font size="2">'.$l_Flash.'</font></td></tr>';
  }
while ($rowcat = mysql_fetch_array($rescat))
{
if ($rowcat['cat'] == $cat && $tab == 'f' && $searchalb < 3) { $fleche = 'bas.gif';  $bold = '<b>'; $Fbold = '</b>'; }
else  { $fleche = 'droit.gif'; $bold = ''; $Fbold = ''; }
echo '<tr><td class="td1" align="center"><a href="index.php?tab=f&cat='.stripslashes(urlencode($rowcat['cat'])).'" onMouseOver="window.status=\'\';return true"><img src="images/'.$fleche.'" border="0" alt=""></a></td>';
echo '<td class="td2" width="100%" colspan="2"><font size="1">'.$bold;
echo '<a href="index.php?tab=f&cat='.stripslashes(urlencode($rowcat['cat'])).'" class="lien1" onMouseOver="window.status=\'\';return true">'.stripslashes($rowcat['cat']).'</a>'.$Fbold.'</font></td></tr>';

if ($rowcat['cat'] == $cat && $tab == 'f')
{

$query="SELECT idalbum, album, COUNT(id) FROM mcgallery_flash WHERE idalbum IN ($listeF) AND cat LIKE '$cats' GROUP BY idalbum ORDER BY album";
$result=mysql_query($query);
   while($row=mysql_fetch_row($result))
   {
    $thumb = $liste_thumbsF[$row[0]] ;
    if ($thumb == '' || $thumb_title == 0) { $thumb = 'images/blank.gif'; }
    else { $thumb = 'flash/'.$row[0].'/small/'.$thumb; }
    echo '<tr><td class="td2" width="'.$thumb_title.'">';
    echo '<a href="index.php?flash=1&album='.$row[0].'" onMouseOver="window.status=\'\';return true"><img src="'.$thumb.'" width="'.$thumb_title.'" height="'.($thumb_title /4*3).'" border="0" alt=""></a></td>';
    //
    echo '<td class="td2" width="100%"><font size="1">';
    if ($row[0]==$album && $flash==1 && $searchalb < 2)  { echo '<b>'; }
    echo '<a href="index.php?flash=1&album='.$row[0].'" class="lien1" onMouseOver="window.status=\'\';return true">'.stripslashes($row[1]).'</a>';
    if ($row[0]==$album && $flash==1 && $searchalb < 2)  { echo '</b>'; }
    echo '</font>';
    echo '</td>';
    echo '<td class="td2" align="right" nowrap><font size="1">'.$row[2].' '.$l_flash_anims.'</font></td></tr>';
	echo "\n";
   }
  }
  echo "\n";
}

 if (!empty($_SESSION['private_login']))
 {
 $private_login = $_SESSION['private_login'];
  $query="SELECT COUNT(file) FROM mcgallery_select WHERE type='F' AND login='$private_login'";
  $result=mysql_query($query);
  $nbre_sel = mysql_fetch_row($result);
  if ($nbre_sel[0] > 0)
  {
     if ($nbf == 0 && $nbfp == 0) { echo '<tr><td class="td0" colspan="3"><font size="2">'.$l_Flash.'</font></td></tr>'; }
    echo '<tr><td class="td1" align="center"><img src="images/sel.gif" border="0"></td>';
    echo '<td class="td2" width="100%"><font face="'.$rowd['fontface'].'" size="1">';
    if ($sel == 'F' && $l =='')  { echo '<b>'; }
    echo '<a href="index.php?sel=F" class="lien1" onMouseOver="window.status=\'\';return true">'.$l_your_select.'</a>';
    if ($sel == 'F' && $l =='')  { echo '</b>'; }
    echo '</font>';
    echo '</td>';
    echo '<td class="td2" align="right" nowrap><font size="1">'.$nbre_sel[0].' '.$l_flash_anims.'</font></td></tr>';
  }
  if ($_SESSION['level'] == 'admin')
  {
   $query="SELECT login, COUNT(file) as vid FROM mcgallery_select WHERE type='F' AND login != '$private_login' GROUP BY login ORDER BY login";
   $result=mysql_query($query);
   $nbre_sel_l = mysql_num_rows($result);
   if ($nbre_sel_l > 0)
   {
     if ($nbf == 0 && $nbfp == 0 & $nbre_sel[0] == 0) { echo '<tr><td class="td0" colspan="3"><font size="2">'.$l_Flash.'</font></td></tr>'; }
     while ($selec=mysql_fetch_array($result))
     {
    //
    echo '<tr><td class="td1" align="center"><img src="images/sel.gif" border="0"></td>';
    //
     echo '<td class="td2" width="100%"><font size="1">';
     if ($sel == 'F' && $l == $selec['login'])  { echo '<b>'; }
     echo '<a href="index.php?sel=F&l='.$selec['login'].'" class="lien1" onMouseOver="window.status=\'\';return true">'.$l_sel_add.': '.$selec['login'].'</a>';
     if ($sel == 'F' && $l == $selec['login'])  { echo '</b>'; }
     echo '</font>';
     echo '</td>';
     echo '<td class="td2" align="right" nowrap><font size="1">'.$selec['vid'].' '.$l_flash_anims.'</font></td></tr>';
	 echo "\n";
     }
   }
  }
  echo "\n";
 }

if ($use_cat == 2 && ($nbf + $nbfp) > 1)
{
if ($cat == 'a' && $tab =='f') { $fleche = 'bas.gif'; $bold = '<b>'; $Fbold = '</b>'; }
else  { $fleche = 'droit.gif'; $bold = ''; $Fbold = ''; }
echo '<tr><td class="td1" align="center"><a href="index.php?tab=f&cat=a" onMouseOver="window.status=\'\';return true"><img src="images/'.$fleche.'" border="0" alt=""></a></td>';
echo '<td class="td2" width="100%" colspan="2"><font size="1">'.$bold;
echo '<a href="index.php?tab=f&cat=a" class="lien1" onMouseOver="window.status=\'\';return true">'.stripslashes($l_allcat).'</a>'.$Fbold.'</font></td></tr>';
unset($bold);
unset($Fbold);

if ($cat == 'a' && $tab =='f')

{
$query="SELECT idalbum, album, COUNT(id) FROM mcgallery_flash WHERE idalbum IN ($listeF) GROUP BY idalbum ORDER BY album";
$result=mysql_query($query);
 while($row=mysql_fetch_row($result))
 {
    $thumb = $liste_thumbsP[$row[0]] ;
    if ($thumb == '' || $thumb_title == 0) { $thumb = 'images/blank.gif'; }
    else { $thumb = 'flash/'.$row[0].'/small/'.$thumb; }
    echo '<tr><td class="td2" width="'.$thumb_title.'">';
    echo '<a href="index.php?flash=1&album='.$row[0].'" onMouseOver="window.status=\'\';return true"><img src="'.$thumb.'" width="'.$thumb_title.'" height="'.($thumb_title /4*3).'" border="0" alt=""></a></td>';
    //
    echo '<td class="td2" width="100%"><font size="1">';
    if ($row[0]==$album && $flash==1&& $searchalb < 2)  { echo '<b>'; }
    echo '<a href="index.php?flash=1&album='.$row[0].'" class="lien1" onMouseOver="window.status=\'\';return true">'.stripslashes($row[1]).'</a>';
    if ($row[0]==$album && $flash==1 && $searchalb < 2)  { echo '</b>'; }
    echo '</font>';
    echo '</td>';
    echo '<td class="td2" align="right" nowrap><font size="1">'.$row[2].' '.$l_videos.'</font></td></tr>';
	echo "\n";
 }
}
}
// Top Ten
if (($nbf + $nbfp + $nbre_sel_l > 0) && ($use_topten{0} == 2 || ($use_topten{0} == 1 && !empty($_SESSION['private_login']))))
{
include 'topten_f.php';
}

// end flash
?>