";
echo "
";
$database->setQuery(
"SELECT * FROM #__ponygallery as a " . "\n left join #__ponygallery_catg as c on c.cid=a.catid"
. "\n WHERE a.published = '1' AND a.catid = '" . $catid . "'" . " AND a.approved = 1"
. "\n AND c.access<='$gid'" . "\n ORDER BY a.id DESC LIMIT " . $start . "," . $ag_perpage );
//$database->setQuery($query1);
$rows=$database->loadObjectList();
echo "";
$rowcounter=0;
foreach ( $rows as $row1 )
{
if ( ($rowcounter % 3 == 0) AND ($rowcounter <> 0) )
echo "
";
echo "";
echo " ";
echo "$row1->imgtitle";
if ( $ag_showdetail )
echo " "._PONYGALLERY_HITS.": $row1->imgcounter";
if ( $ag_showrating )
{
if ( $row1->imgvotes > 0 )
{
$fimgvotesum=number_format( $row1->imgvotesum / $row1->imgvotes, 2, ",", "." );
$frating="$fimgvotesum ($row1->imgvotes Votes)";
}
else {
$frating=_PONYGALLERY_NO_VOTES;
}
echo " "._PONYGALLERY_RATING.": $frating";
}
if ( $ag_showcomment )
{
# Check how many comments exist
$database->setQuery( "SELECT cmtid FROM #__ponygallery_comments WHERE cmtpic='$row1->id'" );
$comments_result=$database->query();
$comments=mysql_num_rows( $comments_result );
echo " "._PONYGALLERY_COMMENT.": $comments";
}
echo " | ";
$rowcounter++;
}
if ( $rowcounter % 3 <> 0 )
{
for ( $i=1; $i <= (3 - ($rowcounter % 3)); $i++ ) {
echo " | ";
}
}
echo "
";
break;
#########################################################################################
case "showupload":
if ( !$my->username )
{
mosRedirect( "index.php?option=com_ponygallery", _PONYGALLERY_YOU_NOT_LOGED );
die();
}
GalleryHeader();
showUpload( $option, $batchul );
break;
case "uploadhandler":
if ( !$my->username )
{
mosRedirect( "index.php?option=com_ponygallery", _PONYGALLERY_YOU_NOT_LOGED );
die();
}
require_once( $mosConfig_absolute_path . "/administrator/components/com_ponygallery/config.ponygallery.php" );
echo "";
if ( $row1->image <> "" )
{
echo
"cid>";
echo
" ("
. GetNumberOfLinks( $row1->cid ) . " "._PONYGALLERY_PICTURES.")";
}
echo "cid>$row1->name ("
. GetNumberOfLinks( $row1->cid ) . " "._PONYGALLERY_PICTURES.")";
if ( $row1->access > 1 ) {
echo ' '._PONYGALLERY_SM.'';
}
else if ( $row1->access > 0 ) {
echo ' '._PONYGALLERY_RM.'';
}
echo " ";
echo "$row1->description";
$database->setQuery(
"SELECT count(id) FROM #__ponygallery WHERE published = '1' AND catid = '" . $row1->cid . "'"
. " AND approved = 1" );
$count=$database->loadResult();
echo " |
";
$line++;
}
echo "