addParameters("&c=".$_REQUEST['c']."&sc=".$_REQUEST['sc']."&o=".$_REQUEST['o']); $pagelist = $p->execute(); $images = $p->getRecords(); if (mysql_num_rows($images) == 0){ echo "
Non ci sono immagini
"; return; } $rowCount = 1; $cellCount = 0; while ($row = mysql_fetch_array ($images)) { __drawImagePreview($row); $cellCount ++; if ($cellCount==3){ echo "
 
\n"; $rowCount += 1; $cellCount = 0; } } //fill nel caso la pagina non sia piena for ($i=$rowCount;$i<=2;$i++){ for ($x=$cellCount;$x<3;$x++){ echo "
\n"; echo "
 
\n"; echo "
 
\n"; echo "
 


\n"; echo "
\n"; echo "
\n"; } echo "
 
\n"; $cellCount = 0; } return $pagelist; } function __drawImagePreview($row){ GLOBAL $__OFFICE; if (isset($__OFFICE)){ $size[0] = 30; $size[1] = 30; } else $size = defineImageSize( IMAGE_ROOT.$row['filepath'].$row['filename'], "THUMB"); if ($row['pictures.title'] == "") $title = $row['filename']; else $title = $row['pictures.title']; echo "
\n"; echo "
".$title."
\n"; echo "
\n"; echo "
\n"; echo "".$row['hits']." Donwnload
\n"; echo "\"\"
\n"; echo "Inviata da: ".$row['owner_name']."\n"; echo "
\n"; echo "
\n"; } ?>