mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
31 lines
467 B
PHP
31 lines
467 B
PHP
<?php
|
|
|
|
//
|
|
// page is accessible only to logged in users.
|
|
//
|
|
if (!$users->isLoggedIn())
|
|
$page->show403();
|
|
|
|
if (!isset($_GET["type"]) || !isset($_GET["id"]) || !ctype_digit($_GET["id"]))
|
|
$page->show404();
|
|
|
|
//
|
|
// user requested a tvrage image.
|
|
//
|
|
if ($_GET["type"] == "tvrage")
|
|
{
|
|
$rage = new TvRage;
|
|
$r = $rage->getByID($_GET["id"]);
|
|
if (!$r)
|
|
$page->show404();
|
|
|
|
header("Content-type: image/jpeg");
|
|
print $r["imgdata"];
|
|
die();
|
|
}
|
|
else
|
|
{
|
|
$page->show404();
|
|
}
|
|
|