Location: PHPKode > projects > Peardrop CMS > peardrop/inc/bin.php
<?php
// recycle bin
	// Open Content Directory in Recycle Bin
		$myDirectory2 = opendir("../recycle/content");
		//get each entry
		while($entryName2 = readdir($myDirectory2)) {
			$dirArray2[] = $entryName2;
		}
		//close directory
		closedir($myDirectory2);
		//count elements in array
		$indexCount2	= count($dirArray2);
		// sort 'em
		sort($dirArray2);

	// open hidden directory recycle bin
		$myDirectory3 = opendir("../recycle/hidden");
		//get each entry
		while($entryName3 = readdir($myDirectory3)) {
			$dirArray3[] = $entryName3;
		}
		//close directory
		closedir($myDirectory3);
		//count elements in array
		$indexCount3	= count($dirArray3);
		// sort 'em
		sort($dirArray3);

	// open images directory recycle bin

		$myDirectory5 = opendir("../recycle/images");
		//get each entry
		while($entryName5 = readdir($myDirectory5)) {
			$dirArray5[] = $entryName5;
		}
		//close directory
		closedir($myDirectory5);
		//count elements in array
		$indexCount5	= count($dirArray5);
		// sort 'em
		sort($dirArray5);
	// open docs directory recycle bin

		$myDirectory6 = opendir("../recycle/docs");
		//get each entry
		while($entryName6 = readdir($myDirectory6)) {
			$dirArray6[] = $entryName6;
		}
		//close directory
		closedir($myDirectory6);
		//count elements in array
		$indexCount6	= count($dirArray6);
		// sort 'em
		sort($dirArray6);


		// print 'em
		print("<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" >\n<tbody>\n");
		// loop through the array of files and print them all
		for($index2=0; $index2 < $indexCount2; $index2++) {
			if (substr("$dirArray2[$index2]", 0, 1) != "."){ // don't list hidden files
				print("<tr><td>$dirArray2[$index2] </td>\n<td> <a href=\"admin.php?a=undelete&f=$dirArray2[$index2]&t=content\">[Undelete]</a><a href=\"admin.php?a=permdelete&t=content&f=$dirArray2[$index2]\">[Purge]</a> </td>\n</tr>");
			}
		}
		print("</tbody>\n</table>");
		// print 'em
		print("<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" >\n<tbody>\n");
		// loop through the array of files and print them all
		for($index3=0; $index3 < $indexCount3; $index3++) {
			if (substr("$dirArray3[$index3]", 0, 1) != "."){ // don't list hidden files
				print("<tr><td>$dirArray3[$index3] </td>\n<td> <a href=\"admin.php?a=undelete&f=$dirArray3[$index3]&t=hidden\">[Undelete]</a><a href=\"admin.php?a=permdelete&t=hidden&f=$dirArray3[$index3]\">[Purge]</a></td>\n</tr>");
			}
		}
		print("</tbody>\n</table>");
		// print 'em
		print("<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" >\n<tbody>\n");
		// loop through the array of files and print them all
		for($index5=0; $index5 < $indexCount5; $index5++) {
			if (substr("$dirArray5[$index5]", 0, 1) != "."){ // don't list hidden files
				print("<tr><td>$dirArray5[$index5] </td>\n<td> <a href=\"admin.php?a=undelete&f=$dirArray5[$index5]&t=images\">[Undelete]</a><a href=\"admin.php?a=permdelete&t=images&f=$dirArray5[$index5]\">[Purge]</a></td>\n</tr>");
			}
		}
		print("</tbody>\n</table>");
		// print 'em
		print("<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" >\n<tbody>\n");
		// loop through the array of files and print them all
		for($index6=0; $index6 < $indexCount6; $index6++) {
			if (substr("$dirArray6[$index6]", 0, 1) != "."){ // don't list hidden files
				print("<tr><td>$dirArray6[$index6] </td>\n<td> <a href=\"admin.php?a=undelete&f=$dirArray6[$index6]&t=docs\">[Undelete]</a><a href=\"admin.php?a=permdelete&t=docs&f=$dirArray6[$index6]\">[Purge]</a></td>\n</tr>");
			}
		}
		print("</tbody>\n</table>");
		?>
Return current item: Peardrop CMS