All pastes #617285 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-07-13 04:16 UTC
rendered paste body
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Statistics</title>
<style type="text/css">
body {
	font-family: "Trebuchet MS";
	font-size: 12px;
}
</style>
</head>

<body>
<?
$lines = 0;
function print_dir($dir = "", $indent = 0){
	global $lines;
	foreach (glob("$dir*") as $file){
		if (is_dir($file)){ $dir = true; }else{ $dir = false; }
		if (substr_count($file, ".php") >= 1 || $dir){
			for ($i = 0; $i < $indent; $i++){	
				echo "&nbsp;&nbsp;";
			}
			echo $file;
			echo "<br />";
			if ($dir){
				if ($file != "include2"){
					print_dir($file."/", $indent+1);
				}
			}else{
				$lines += count(file($file));
			}
		}
	}
}

print_dir();
echo "<br />";
echo "Lines: $lines";
?>


</body>
</html>