Location: PHPKode > scripts > picKLE > PNpicKLE-1.0beta/pnblocks/recent_pics.php
<?php
$blocks_modules['recent_pics'] = array(
    'func_display' => 'blocks_recentpics',
    'text_type' => 'RecentPics',
    'text_type_long' => 'RecentPics',
    'allow_multiple' => true,
    'form_content' => false,
    'form_refresh' => false,
//  'xhtml_support' => false,
    'show_preview' => true
);

// Security
pnSecAddSchema('PNpicKLE:RecentPics::', '::');


// Default is 5 recent pics
// I should make this an option in module settings
//
function blocks_recentpics($row) {

    $r2=mysql_query("select pid, file from PNpicKLE_pics order by timestamp desc limit 5");
	$countit=1;
    	while($row2=mysql_fetch_array($r2)){
		$file=$row2[file];
		$pid=$row2[pid];
		
		// Removes br
		if($countit=='5'){
			$blockcontent .= "<center><a href=\"/modules.php?op=modload&name=PNpicKLE&file=index&go=4&p=$pid\"><img src=\"/modules/PNpicKLE/uploads/thumbs/$file\" border=1></a><br><br><a href=\"/modules.php?op=modload&name=PNpicKLE&file=index\"><b>[See more pics]</b></a></center>";
		}else{
			$blockcontent .= "<center><a href=\"/modules.php?op=modload&name=PNpicKLE&file=index&go=4&p=$pid\"><img src=\"/modules/PNpicKLE/uploads/thumbs/$file\" border=1></a></center><br>";
		}
		
		$countit++;
	}
	
//	$blockcontent .= "testing";
	$row['content'] = $blockcontent;
	return themesideblock($row);  
}
?>
Return current item: picKLE