Location: PHPKode > projects > Peardrop CMS > peardrop/inc/docs.php
<?php
// Docs
	$myDirectoryd = opendir("../docs/");
	//get each entry
	while($entryNamed = readdir($myDirectoryd)) {
		$dirArrayd[] = $entryNamed;
	}
	//close directory
	closedir($myDirectoryd);
	//count elements in array
	$indexCountd	= count($dirArrayd);
	// sort 'em
	sort($dirArrayd);

		// print 'em
		print("<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" >\n<tbody>\n");
		// loop through the array of files and print them all
		for($indexd=0; $indexd < $indexCountd; $indexd++) {
			if (substr("$dirArrayd[$indexd]", 0, 1) != "."){ // don't list hidden files
				print("<tr><td>$dirArrayd[$indexd] </td>\n<td>  <a href=\"docs/$dirArrayd[$indexd]\" target=\"_blank\">[Link/View]</a> <a href=\"admin.php?a=delete&f=$dirArrayd[$indexd]&t=docs\">[Delete]</a></td>\n</tr>");
			}
		}
		print("</tbody>\n</table>");

		?>
Return current item: Peardrop CMS