strtotime hash pdf
This commit is contained in:
@@ -97,10 +97,10 @@ function newpdfzoom(czoom){
|
||||
|
||||
var status = czoom+"%";
|
||||
|
||||
document.getElementById("pdfcanvas").style.width = status;
|
||||
document.getElementById("zoomstatus").innerHTML = status;
|
||||
document.getElementById(pdfcanvas).style.width = status;
|
||||
document.getElementById('zoomstatus').innerHTML = status;
|
||||
|
||||
setzoom("pdfscale", czoom);
|
||||
setzoom('pdfscale', czoom);
|
||||
|
||||
}
|
||||
|
||||
@@ -135,20 +135,18 @@ function setzoom( cname, cvalue, exdays = 30 ) {
|
||||
|
||||
|
||||
|
||||
function startpdfviewer(newpdf){
|
||||
function startpdfviewer(newcurr){
|
||||
|
||||
currpdf = getzoom("currpdf");
|
||||
pdcurr = getzoom('pdcurr');
|
||||
|
||||
if (currpdf == newpdf){
|
||||
|
||||
czoom = getzoom("pdfscale");
|
||||
if (pdcurr == newcurr){
|
||||
czoom = getzoom('pdfscale');
|
||||
if (czoom > 10) {
|
||||
newpdfzoom(czoom);
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
setzoom("currpdf", newpdf);
|
||||
setzoom('pdcurr', newcurr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ function anpromo_kuri($page = 1, $scale = 1){
|
||||
$pdfile = '/pub/files/pdf/promo.pdf';
|
||||
$title = 'Номер 12(706)';
|
||||
$baseurl = '/';
|
||||
$newcurr = strtotime('2006-05-12');
|
||||
|
||||
$nextpage = $page + 1;
|
||||
if (file_exists(SITEPATH.$pdfile)){
|
||||
@@ -36,7 +37,7 @@ function anpromo_kuri($page = 1, $scale = 1){
|
||||
|
||||
function read_kuri($hash, $page = 1, $scale = 1, $promo = false){
|
||||
|
||||
$price = db_get("SELECT `price_id`, `pricename` FROM `price` WHERE `pricehash` = '$hash' LIMIT 1");
|
||||
$price = db_get("SELECT `price_id`, `pricename`, `BeginDate` FROM `price` WHERE `pricehash` = '$hash' LIMIT 1");
|
||||
|
||||
if (!isset($price['price_id'])){
|
||||
header("HTTP/1.0 404 Not Found");
|
||||
@@ -48,6 +49,10 @@ function read_kuri($hash, $page = 1, $scale = 1, $promo = false){
|
||||
$basepg = PGDIR.$hash.'/'.$hash.'-';
|
||||
$pgfile = $basepg.$page.'.pdf';
|
||||
$cachefile = PDFDIR.$namefile;
|
||||
$newcurr = strtotime($price['BeginDate']);
|
||||
|
||||
|
||||
|
||||
|
||||
if (file_exists($cachefile)){
|
||||
$fullpdf = '/pdf/'.$namefile;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
pageRendering = false,
|
||||
pageNumPending = null,
|
||||
nexturl = '<?=$nexturl?>',
|
||||
hash = '<?=$hash?>',
|
||||
newcurr ='<?=$newcurr?>',
|
||||
prevurl = '<?=$prevurl?>';
|
||||
</script>
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
<div id="pdfprogress">Идет обращение к серверу...</div>
|
||||
|
||||
<canvas id="the-canvas" style="width:100%"></canvas>
|
||||
<script>startpdfviewer(hash);</script>
|
||||
<script>startpdfviewer(newcurr);</script>
|
||||
<div id="stuff-bar">
|
||||
<div id="zoomnav">
|
||||
<div id="title_minus" onclick="resize_minus()">
|
||||
<div id="title_minus" onclick="resize_minus()">
|
||||
<span><i class="fa fa-search-minus" aria-hidden="true"></i></span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>Еженедельник Аргументы Недели - <?=$title?></title>
|
||||
<script src="/pub/scripts/pdf.min.js"></script>
|
||||
<script src="/pub/scripts/anviewer.js?ver=27"></script>
|
||||
<script src="/pub/scripts/anviewer.js?ver=34"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/pub/css/an.css?ver=29">
|
||||
<link rel="icon" type="image/ico" href="https://argumenti.ru/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
Reference in New Issue
Block a user