add cache pages
This commit is contained in:
@@ -181,7 +181,7 @@ function promo_kuri($hash, $page = 0, $promo = true){
|
||||
|
||||
$pricesql = "
|
||||
SELECT
|
||||
`price_id`, `pricename`, `BeginDate`, `category_id`
|
||||
`price_id`, `pricename`, `BeginDate`, `category_id`, `pages`
|
||||
FROM
|
||||
`price`
|
||||
WHERE
|
||||
@@ -213,9 +213,22 @@ function promo_kuri($hash, $page = 0, $promo = true){
|
||||
$file = PDFSOURCE."${price['price_id']}.pdf";
|
||||
$data = pdfs_init($file, $page);
|
||||
|
||||
if ($price['pages'] == 0){
|
||||
$data['pages'] = pdfs_count($file);
|
||||
$pages_sql = "
|
||||
UPDATE
|
||||
price
|
||||
SET
|
||||
pages = ${data['count']}
|
||||
WHERE
|
||||
price_id = ${price['price_id']}
|
||||
";
|
||||
db_get($pages_sql, 'chitatel');
|
||||
}
|
||||
|
||||
$pdfile = $data['pdfpgurl'];
|
||||
$fullpdf = $data['pdfurl'];
|
||||
$count = $data['count'];
|
||||
$count = $data['pages'];
|
||||
$pagenum = 1;
|
||||
$newcurr = strtotime($price['BeginDate']);
|
||||
$category = $price['category_id'];
|
||||
|
||||
Reference in New Issue
Block a user