heads($file); break; } } /* * Request a user head (user image) * Requester must be currently logged in */ function heads($file) { if (!$this->getCurrentUser()) return; if (!file_exists("assets/img/heads/" . $file)) $file = "null.jpg"; $file = "assets/img/heads/" . $file; $f = fopen($file, "rb"); if (!$f) return; header("Content-type: " . mime_content_type($file)); header("Content-length: " . filesize($file)); fpassthru($f); fclose($f); } } $res = new Resource(); $res->handle($_REQUEST['d'], $_REQUEST['f']); ?>