<?php
	if ( !defined('IN_MFA') )
		die("Hacking attempt");
	
	$directories = get_subdirectories($user->user_root_dir.$_GET['dir']);
	$numfiles = 0;
	$fsize = 0;
	$numdirectories = count($directories);
	foreach($directories as $directory)
	{
		$dh = @opendir( ROOT_DIR."/".$directory);
		while ( gettype($file = readdir( $dh )) != "boolean")
		{
			if($file != ".." && $file != ".")
			{
				if(is_file(ROOT_DIR."/".$directory."/".$file))
				{
					$fsize = $fsize + filesize(ROOT_DIR."/".$directory."/".$file);
					$numfiles++;
				}
			}
		}
		closedir($dh);
	}
	
	$show_after_header .= "<div><a href='index.php?dir=".$_GET['dir']."'>".$lang['back']."</a></div>";
	$show_after_header .= "<table border='0'>";
	$show_after_header .= "<tr><td><b>".$lang['totalsize'].":</b></td><td>".sprintf("%.2f",$fsize / 1024)." KB</td></tr>";
	$show_after_header .= "<tr><td><b>".$lang['numdir'].":</b></td><td>".$numdirectories."</td></tr>";
	$show_after_header .= "<tr><td><b>".$lang['numfiles'].":</b></td><td>".$numfiles."</td></tr>";
	$show_after_header .= "</table>";
?>