GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — projectsend/custom-download.php at develop · sitecode/projectsend Expand file tree/ Copy pathcustom-download.phpMore file actions 49 lines (40 loc) · 1.33 KB / Copy pathcustom-download.phpFile metadata and controls49 lines (40 loc) · 1.33 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 <?php require_once 'bootstrap.php'; $link = htmlentities($_GET['link']); if (!$link) { exit_with_error_code(400); } /** * @var PDO $dbh */ global $dbh; $statement = $dbh->prepare("SELECT * FROM `" . TABLE_CUSTOM_DOWNLOADS . "` WHERE link=:link"); $statement->bindParam(':link', $link); $statement->execute(); $statement->setFetchMode(PDO::FETCH_ASSOC); if ($statement->rowCount() == 0) { exit_with_error_code(404); } while ($row = $statement->fetch()) { $link = html_output($row['link']); $file_id = html_output($row['file_id']); $client_id = html_output($row['client_id']); $timestamp = html_output($row['timestamp']); $expiry_date = html_output($row['expiry_date']); $visit_count = html_output($row['visit_count']); } if (!is_null($expiry_date) && $expiry_date <= (new DateTime())->getTimestamp()) { // link expired exit_with_error_code(410); } if (!$file_id) { exit_with_error_code(404); } $file = new \ProjectSend\Classes\Files($file_id); $statement = $dbh->prepare("UPDATE " . TABLE_CUSTOM_DOWNLOADS . " SET visit_count=:visit_count WHERE link=:link"); $visit_count++; $statement->bindParam(':visit_count', $visit_count, PDO::PARAM_INT); $statement->bindParam(':link', $link); $statement->execute(); $location = BASE_URI . "download.php?id={$file->id}&token={$file->public_token}"; ps_redirect($location); |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |