add app folder
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,2 @@
|
||||
vendor
|
||||
*.pdf
|
||||
start.sh
|
||||
|
||||
|
||||
7
app/confg.php
Normal file
7
app/confg.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
ini_set('display_errors','off');
|
||||
error_reporting(E_ALL);
|
||||
|
||||
define('SITE', 'http://'.$_SERVER['HTTP_HOST'].'/');
|
||||
define('SITEPATH', $_SERVER['DOCUMENT_ROOT'].'/');
|
||||
@@ -1,8 +1,5 @@
|
||||
<?php
|
||||
|
||||
ini_set('display_errors','off');
|
||||
error_reporting(E_ALL);
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
require 'modules/anpdf/anpdf.php';
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
function anpromo_kuri($page = 1, $scale = 1.5){
|
||||
|
||||
// $pdfile = 'https://argumenti.ru/templinks/md5files/f9598f88e667146d50d106eeedbd74c1.pdf';
|
||||
$pdfile = '/pub/798.pdf';
|
||||
$pdfile = '/pub/files/promo.pdf';
|
||||
$maxpage = 32;
|
||||
$title = 'Аргументы Недели 12(706)';
|
||||
|
||||
if ($page < $maxpage){
|
||||
$nextpage = $page + 1;
|
||||
35
app/modules/anpdf/anpdf.phtml
Normal file
35
app/modules/anpdf/anpdf.phtml
Normal file
@@ -0,0 +1,35 @@
|
||||
<html>
|
||||
<head>
|
||||
<title><?=$title?></title>
|
||||
<script src="//mozilla.github.io/pdf.js/build/pdf.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1><?=$title?></h1>
|
||||
|
||||
<canvas id="the-canvas"></canvas>
|
||||
|
||||
<div id="pdf-nav">
|
||||
|
||||
<?if (isset($prevurl)):?>
|
||||
<a href="<?=$prevurl?>"><=Предыдущая страница<a/>
|
||||
<?endif?>
|
||||
|
||||
<?if (isset($nexturl)):?>
|
||||
<a href="<?=$nexturl?>">Следующая страница=><a/>
|
||||
<?endif?>
|
||||
|
||||
<a href="https://argumenti.ru/robomail/486">Получайте газету на email</a>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var url = '<?=$pdfile?>';
|
||||
var scale = <?=$scale?>;
|
||||
var pageNumber = <?=$page?>;
|
||||
</script>
|
||||
|
||||
<script src="/pub/scripts/anpdf.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
BIN
app/pub/files/promo.pdf
Normal file
BIN
app/pub/files/promo.pdf
Normal file
Binary file not shown.
@@ -1,31 +1,5 @@
|
||||
<script src="//mozilla.github.io/pdf.js/build/pdf.js"></script>
|
||||
|
||||
<h1>Аргументы Недели 12(706)</h1>
|
||||
|
||||
|
||||
<canvas id="the-canvas"></canvas>
|
||||
|
||||
<div id="pdf-nav">
|
||||
|
||||
<?if (isset($prevurl)):?>
|
||||
<a href="<?=$prevurl?>"><=Предыдущая страница<a/>
|
||||
<?endif?>
|
||||
|
||||
<?if (isset($nexturl)):?>
|
||||
<a href="<?=$nexturl?>">Следующая страница=><a/>
|
||||
<?endif?>
|
||||
|
||||
<a href="https://argumenti.ru/robomail/486">Получайте газету на email</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
// If absolute URL from the remote server is provided, configure the CORS
|
||||
// header on that server.
|
||||
var url = '<?=$pdfile?>';
|
||||
|
||||
// Loaded via <script> tag, create shortcut to access PDF.js exports.
|
||||
var pdfjsLib = window['pdfjs-dist/build/pdf'];
|
||||
@@ -39,11 +13,11 @@ loadingTask.promise.then(function(pdf) {
|
||||
console.log('PDF loaded');
|
||||
|
||||
// Fetch the first page
|
||||
var pageNumber = <?=$page?>;
|
||||
|
||||
pdf.getPage(pageNumber).then(function(page) {
|
||||
console.log('Page loaded');
|
||||
|
||||
var scale = <?=$scale?>;
|
||||
|
||||
var viewport = page.getViewport({scale: scale});
|
||||
|
||||
// Prepare canvas using PDF page dimensions
|
||||
@@ -66,4 +40,3 @@ loadingTask.promise.then(function(pdf) {
|
||||
// PDF loading error
|
||||
console.error(reason);
|
||||
});
|
||||
</script>
|
||||
95
composer.lock
generated
95
composer.lock
generated
@@ -1,95 +0,0 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "f8e91e3555b5f9a7b5759e621a278b9f",
|
||||
"packages": [
|
||||
{
|
||||
"name": "masterforweb/db_lite",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/masterforweb/db_lite",
|
||||
"reference": "d1f7ddb5b426bc976b4fe637f5b58e9144657167"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"db_lite.php"
|
||||
]
|
||||
},
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "AK Delfin",
|
||||
"email": "masterforweb@hotmail.com"
|
||||
}
|
||||
],
|
||||
"description": "lite pdo sql",
|
||||
"homepage": "https://github.com/masterforweb/db_lite",
|
||||
"keywords": [
|
||||
"microframework",
|
||||
"php quick start",
|
||||
"rest",
|
||||
"router"
|
||||
],
|
||||
"time": "2020-02-27T06:41:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "masterforweb/kuri",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/masterforweb/kuri",
|
||||
"reference": "444b212605e177bd846e10790e15768e305545e1"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"_kuri.php"
|
||||
]
|
||||
},
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "AK Delfin",
|
||||
"email": "masterforweb@hotmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Autorouting without regular. MVC standart role: controller/action/params. Quick start",
|
||||
"homepage": "https://github.com/masterforweb/_kuri",
|
||||
"keywords": [
|
||||
"microframework",
|
||||
"php quick start",
|
||||
"rest",
|
||||
"router"
|
||||
],
|
||||
"time": "2020-03-02T20:15:07+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {
|
||||
"masterforweb/kuri": 20,
|
||||
"masterforweb/db_lite": 20
|
||||
},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"platform-dev": []
|
||||
}
|
||||
Reference in New Issue
Block a user