From d91466c5d992f538e8dad612d2664644af99c8cc Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Sun, 24 May 2020 17:10:45 +0300 Subject: [PATCH] add readbook --- app/api/apicontent.php | 2 +- app/confg.php | 9 +++++--- app/functions/xhtmltransform.php | 5 ++++- app/routes/anpdf.php | 38 ++++++++++++++++++++++---------- 4 files changed, 37 insertions(+), 17 deletions(-) diff --git a/app/api/apicontent.php b/app/api/apicontent.php index 0858caf..72622ce 100644 --- a/app/api/apicontent.php +++ b/app/api/apicontent.php @@ -5,7 +5,7 @@ function api_pricehash($hash){ $pricesql = " SELECT - `price_id`, `pricename`, `BeginDate`, `category_id`, `pages` + `price_id`, `pricename`, `BeginDate`, `category_id`, `pages`, `pdf`, `html` FROM `price` WHERE diff --git a/app/confg.php b/app/confg.php index e568c73..ca3c6bd 100644 --- a/app/confg.php +++ b/app/confg.php @@ -12,10 +12,13 @@ if (isset($_SERVER['HTTP_HOST'])) else define('SITEPATH', dirname(__FILE__)); -if (SITE == 'http://klan.argumenti.ru/') +if (SITE == 'http://klan.argumenti.ru/'){ define('PDFSOURCE', '/vhosts/an/httpdocs/pub/files/pdf/pdf/'); -else - define('PDFSOURCE', SITEPATH.'pub/source/'); + define('HTMLSOURCE', '/vhosts/an/httpdocs/pub/files/html/'); +} +else { + define('PDFSOURCE', SITEPATH.'pub/source/'); +} define('PDFPATH', '/pub/files/pdf/'); define('PGPATH', '/pub/files/pages/'); diff --git a/app/functions/xhtmltransform.php b/app/functions/xhtmltransform.php index 9cdf774..5bb729a 100644 --- a/app/functions/xhtmltransform.php +++ b/app/functions/xhtmltransform.php @@ -40,6 +40,7 @@ function endparagraf($html, $pos){ function convert2html($xfile){ if (!file_exists($xfile)){ + echo 'file not found'; return ''; } @@ -48,8 +49,10 @@ function convert2html($xfile){ $result = str_replace('', '', $xhtml); $result = str_replace('', '', $xhtml); + //$start_style =(strpos('