6 if (!is_dir(FILE_DIR.$_SESSION['user_id'])) {
7 mkdir(FILE_DIR.$_SESSION['user_id']);
9 copy($_FILES['data_file']['tmp_name'],FILE_DIR.$_SESSION['user_id'].'/'.$_FILES['data_file']['name']);
10 return $_SESSION['user_id'].'/'.$_FILES['data_file']['name'];
16 * Returns disk usage in bytes of directory $d. Limit depth level with $depth.
17 * Updates, documentation and examples: http://daniel.lorch.cc/projects/disk_usage/
22 function disk_usage($d, $depth = NULL) {
26 if(isset($depth) && $depth < 0)
29 if($d[strlen($d)-1] != '\\' || $d[strlen($d)-1] != '/')
36 while($e = readdir($dh))
37 if($e != '.' && $e != '..')
38 $usage += disk_usage($d.$e, isset($depth) ? $depth - 1 : NULL);