yeah sry, kinda new to php [code]<?php ob_start(); include("config.php"); if ($logged[username]) { echo ("<center><b>$logged[username]</b></center>"); } else { echo("You are not logged in"); } $totalsize=0; $user = "$logged[username]"; function doFilesize($size, $base=2) { $size = $size/(1024^$base); $out = round($size, 2); switch( $base ) { case 1: $out .= "bytes"; break; case 2: $out .= "KB"; break; case 3: $out .= "MB"; break; case 4: $out .= "GB"; break; } return $out; } function show_dir($dir, $pos=2) { global $totalsize; if($pos == 2) echo "<table border=\"1\">\n <tr>\n <th>File</th>\n <th>Size</th><th>upload date</th>\n </tr>\n"; $handle = @opendir($dir); while ($file = @readdir ($handle)) { if (eregi("^\.{1,2}$",$file)) continue; if(is_dir($dir.$file)) { echo " "; show_dir("$dir.$file/", $pos+3); }else{ $size=doFilesize(filesize($dir.$file)); { } echo "<tr>\n <td><img src=\"/images/jpg.gif\" /> <a href=\"$file/$file\"> $file </a></td>\n <td> $size </td><td> Date</td>\n </tr>\n"; $totalsize=$totalsize+$size; } } @closedir($handle); if($pos == 2) echo "</pre><hr>"; return($totalsize); } $totalsize = show_dir("up/$user/"); echo "Total space used by images: "; echo doFilesize($totalsize, 3); ?> <br><br> <?php $directory = opendir("up/$user/"); while($item = readdir()){ if(($item != ".") && ($item != "..")){ $files[] = $item; echo ""; } } $sizeofarray = count($files); echo "The total amount of files is: <b>" . $sizeofarray . "</b>"; ?>[/code]