query("SELECT folder FROM files WHERE id=".$file_id.";"); $check_if_file_ar = $check_if_file_db->fetchArray(SQLITE3_NUM); //TODO: Instead of exit; let the browser start_download or print folder content if($check_if_file_ar[0] == "FILE"){ if(start_file_download($username, $folder_path)){ exit; return true; } else { exit; return false; } } else { $content = get_content($db, $file_id, $owner); } /*if(!$content){ failure("This folder is empty."); }*/ return $content; } /*function print_browser($content){ var_dump($content); }*/ function print_invite($var){ include("invite.php"); }