diff --git a/app/modules/anpdf/anpdf.php b/app/modules/anpdf/anpdf.php index ff2188b..72f3728 100644 --- a/app/modules/anpdf/anpdf.php +++ b/app/modules/anpdf/anpdf.php @@ -20,4 +20,37 @@ function anpromo_kuri($page = 1, $scale = 2){ include ('anpdf.phtml'); +} + + +function read_kuri($hash, $page){ + + $price = db_get("SELECT `price_id`, `pricename` FROM `price` WHERE `pricehash` = '$hash' LIMIT 1"); + + if (!isset($price['price_id'])){ + header("HTTP/1.0 404 Not Found"); + echo "file not found"; + return False; + } + + $id = $price['price_id']; + $pdfile = SITE."file/$hash"; + $maxpage = 32; + $title = $price['pricename']; + $filedown = True; + + + if ($page < $maxpage){ + $nextpage = $page + 1; + $nexturl = "/anpromo/$nextpage"; + } + + if ($page > 1) { + $prevpage = $page - 1; + $prevurl = "/anpromo/$prevpage"; + } + + include ('anpdf.phtml'); + + } \ No newline at end of file