function bh_add_log($message, $type) { global $bhlogvars; bh_log(bh_parse_logvars($message), $type); }
# Email it ## if (bh_filelink_get_notify($filecode) == 1) { $username = bh_filelink_get($filecode, "username"); $userobj = new bhuser($username); $emailobj = new bhemail($userobj->userinfo['email']); $emailobj->subject = str_replace($replarray1, $replarray2, $bhlang['emailsubject:filemail_link_accessed']); $emailobj->message = str_replace($replarray1, $replarray2, $bhlang['email:filemail_link_accessed']); $emailobj->send(); } ############# header("Content-type: " . $fileobj->mimetype()); header("Content-Disposition: attachment; filename=" . $filename); header("Content-length: " . $fileobj->fileinfo['filesize']); # IE SSL fix header("Pragma: "); header("Cache-Control: "); $fileobj->readfile(); die; } else { bh_add_logvars(array("filename" => $filename, "filepath" => $filepath)); if (empty($fullname)) { $dstr = $emailfrom; } else { $dstr = $fullname . " [" . $emailfrom . "]"; } # Display a page with information $str = "<head><title>" . $bhlang['title:file_download'] . "</title><meta http-equiv='refresh' content='5;url=" . bh_filelink_uri($filecode) . "&download=1'><style>body {font-family: sans-serif;}</style></head>\n\t<body><b>" . $bhlang['title:file_download'] . "</b><br><br><table><tr><td>" . $bhlang['label:from'] . "</td><td>" . $dstr . "</td></tr><tr><td>" . $bhlang['label:filename'] . "</td><td>" . $filename . "</td></tr><tr><td>" . $bhlang['label:filesize'] . "</td><td>" . bh_humanise_filesize($fileobj->fileinfo['filesize']) . "</td></tr><tr><td>" . $bhlang['label:md5'] . "</td><td>" . $fileobj->md5() . "</td></tr></table><br>" . $bhlang['explain:filelink_download'] . "<br><br><a href='" . bh_filelink_uri($filecode) . "&download=1'>" . bh_parse_logvars($bhlang['button:download_file']) . "</a></body></html>"; die($str); } ?>