\n"); $sqlcommand = "SELECT * FROM items WHERE (RecordType = 'Opdrachten') ORDER BY Year,Title"; if(!($cdata = mysql_query($sqlcommand, $sock))){ mysql_close($sock); include($commonpath . "close.php"); exit; } $itemidx = 0; while($crow = mysql_fetch_array($cdata)) { $imgfn = GetThumbImage($crow); if($imgfn != "") { if(($itemidx % 4) == 0) { echo("\n"); } $imgfn = "./itemimages/thumbnails/" . $imgfn; $year = $crow["Year"]; if($year == "0") { $year = " "; } echo("
\"\"/
" . $year . "
\n"); if(($itemidx % 4) == 3) { echo("\n"); } $itemidx++; } } mysql_free_result($cdata); if(($itemidx >= 1) && (($itemidx % 4) != 0)) { while(($itemidx % 4) != 0) { //echo("
 
 
\n"); echo(" \n"); $itemidx++; } echo("\n"); } echo("\n"); include($commonpath . "close.php"); ?>