add readbook
This commit is contained in:
@@ -225,6 +225,11 @@ function read_kuri($hash, $page = 0, $promo = false, $version = null){
|
||||
}
|
||||
|
||||
|
||||
if ($price['html'] = '.html'){
|
||||
return readbook_kuri($hash, $page = 1);
|
||||
}
|
||||
|
||||
|
||||
if ($version == null){
|
||||
|
||||
$detect = new Mobile_Detect;
|
||||
@@ -312,11 +317,6 @@ function readtext_kuri($hash, $page = 1, $promo = 'no'){
|
||||
$baseurl = '/readtext/'.$hash.'/';
|
||||
$endurl = "$baseurl$count";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$title = $price['pricename'];
|
||||
$newcurr = strtotime($price['BeginDate']);
|
||||
$full_ver_url = SITE."read/$hash/$page/$promo/pdf";
|
||||
@@ -389,20 +389,35 @@ function initpageurls($page, $count, $baseurl){
|
||||
|
||||
|
||||
|
||||
function epub_kuri($page = 1){
|
||||
function readbook_kuri($hash, $page = 1){
|
||||
|
||||
require (APPPATH.'functions/xhtmltransform.php');
|
||||
$dir = APPPATH.'pub/ops/';
|
||||
|
||||
$price = api_pricehash($hash);
|
||||
|
||||
if (!isset($price['price_id'])){
|
||||
return 'page not found';
|
||||
}
|
||||
|
||||
$file = HTMLSOURCE.$price['price_id'].'.'.$price['html'];
|
||||
|
||||
|
||||
$limit = 4000;
|
||||
$count = 20;
|
||||
|
||||
|
||||
$htmlfile = APPPATH.'pub/html/furer.html';
|
||||
|
||||
|
||||
$html = convert2html($dir.'toc.xhtml');
|
||||
$html .= convert2html($dir.'chapter-1.xhtml');
|
||||
$html = convert2html($htmlfile);
|
||||
$razmer = strlen($html);
|
||||
|
||||
$count = $razmer / $limit;
|
||||
|
||||
// $html .= convert2html($dir.'chapter-1.xhtml');
|
||||
$pagehtml = pagehtml($html, $page, $limit);
|
||||
|
||||
$baseurl = SITE.'/epub/';
|
||||
$baseurl = SITE.'/readbook/'.$hash.'/';
|
||||
$endurl = $baseurl.$count;
|
||||
|
||||
$nextpage = $page + 1;
|
||||
@@ -411,8 +426,7 @@ function epub_kuri($page = 1){
|
||||
$prevpage = $page - 1;
|
||||
$prevurl = $baseurl.$prevpage;
|
||||
|
||||
$title = 'Млечин - Тайна фюрера';
|
||||
|
||||
$title = $price['pricename'];
|
||||
|
||||
$tempcontent = VIEWPATH.'epub.phtml'; //подшаблон
|
||||
include VIEWPATH.'layout.phtml'; //центральный шаблон
|
||||
|
||||
Reference in New Issue
Block a user