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