Location: PHPKode > projects > Peardrop CMS > peardrop/inc/images.php
<?php

// Images
	$myDirectory4 = opendir("../images/");
	//get each entry
	while($entryName4 = readdir($myDirectory4)) {
		$dirArray4[] = $entryName4;
	}
	//close directory
	closedir($myDirectory4);
	//count elements in array
	$indexCount4	= count($dirArray4);
	// sort 'em
	sort($dirArray4);


			//images
			// print 'em
			print("<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" >\n<tbody>\n");
			// loop through the array of files and print them all
			for($index4=0; $index4 < $indexCount4; $index4++) {
				if (substr("$dirArray4[$index4]", 0, 1) != "."){ // don't list hidden files
					print("<tr><td>$dirArray4[$index4] </td>\n<td> <a href=\"images/$dirArray4[$index4]\" target=\"_blank\">[View]</a> <a href=\"admin.php?a=delete&f=$dirArray4[$index4]&t=images\">[Delete]</a></td>\n</tr>");
				}
			}
			print("</tbody>\n</table>");
?>
Return current item: Peardrop CMS