0 order by counter DESC, rate DESC"); $result1 = mysql_query("select pid, name, counter, rate, votes, visible from $prefix"._gallery_pictures." p, $prefix"._gallery_categories." c WHERE p.gid=c.gallid AND c.visible>0 order by rate DESC, votes ASC, counter DESC"); $nav = navigationGall(); if ($galleryvar['allowrate']) $col = 4; else $col = 3; OpenTable(); echo "
$nav
  "; echo '
'; if ($allowrate) echo ''; echo ''; $pos = 1; while((list($pid, $name, $counter, $rate, $votes, $visible) = mysql_fetch_array($result)) && $pos<=10) { echo ' '; if ($allowrate) echo ''; if ($visible==1) { if (is_user($user)) echo ""; else echo ""; echo ""; $pos += 1; } // While echo "
'._GALTOP10.'
'._GALTOP10HITS.'

'._GALTOPPOS.' '._GALTOPHITS.''._GALTOPRATING.''._GALTOPMEDIA.'
'.$pos.' '.$counter.''.$rate.'$name $name (*)$name
"; echo "

"; if ($galleryvar['allowrate']) { // pk echo '
'; $pos = 1; while((list($pid, $name, $counter, $rate, $votes, $visible) = mysql_fetch_array($result1)) && $pos<=10) { if ($visible==1) { if (is_user($user)) echo ' '; else echo ' '; } else echo ' '; $pos += 1; } // While echo "
'._GALTOP10.'
'._GALTOP10RATING.'

'._GALTOPPOS.' '._GALTOPRATING.' '._GALTOPVOTES.' '._GALTOPMEDIA.'
'.$pos.' '.$rate.' '.$votes.' '.$name.'
'.$pos.' '.$rate.' '.$votes.' '.$name.' (*)
'.$pos.' '.$rate.' '.$votes.' '.$name.'
"; if (!is_user($user)) print '
'._GALCATMEMBERS.'
'; } echo "
 
"; CloseTable(); galleryFooter(); } ?>