add mobile version pdf
This commit is contained in:
@@ -16,7 +16,7 @@ function api_pricehash($hash){
|
|||||||
$price = db_get($pricesql);
|
$price = db_get($pricesql);
|
||||||
|
|
||||||
if (!isset($price['price_id']))
|
if (!isset($price['price_id']))
|
||||||
return false;
|
return ['error' => 'not found hash'];
|
||||||
else
|
else
|
||||||
return $price;
|
return $price;
|
||||||
|
|
||||||
@@ -24,10 +24,23 @@ function api_pricehash($hash){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function api_pagenews($number_id, $page){
|
function apipage_kuri($price_id, $page = 1){
|
||||||
|
|
||||||
|
|
||||||
|
$newsql = "
|
||||||
|
SELECT
|
||||||
|
news_id, title, text, img
|
||||||
|
FROM
|
||||||
|
`news`
|
||||||
|
WHERE
|
||||||
|
`price_id` = '$price_id'
|
||||||
|
AND
|
||||||
|
`page` = '$page'
|
||||||
|
|
||||||
|
";
|
||||||
|
|
||||||
|
$news = db_get($newsql);
|
||||||
|
|
||||||
|
return $news;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -365,6 +365,36 @@ input[type="email"],input[type="password"]{
|
|||||||
font-size: .9em;
|
font-size: .9em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#an_text_block{
|
||||||
|
padding: 10px;
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.antitle{
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.antext{
|
||||||
|
margin-bottom: 8px;
|
||||||
|
border-bottom: 4px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.anphoto{
|
||||||
|
width: 99.5%;
|
||||||
|
margin: 0px auto;
|
||||||
|
margin-top: 7px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.anphoto IMG {
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width: 1100px) {
|
@media screen and (max-width: 1100px) {
|
||||||
.book_skeleton{
|
.book_skeleton{
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
|
|||||||
@@ -277,7 +277,21 @@ function promo_kuri($hash, $page = 0, $promo = true){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function text($hash, $page){
|
function textpdf_kuri($hash, $page = 1){
|
||||||
|
|
||||||
|
$price = api_pricehash($hash);
|
||||||
|
|
||||||
|
if (!isset($price['price_id'])){
|
||||||
|
return 'page not found';
|
||||||
|
}
|
||||||
|
|
||||||
|
$title = $price['pricename'];
|
||||||
|
$content = apipage_kuri($price['price_id'], $page);
|
||||||
|
|
||||||
|
|
||||||
|
$tempcontent = VIEWPATH.'antext.phtml'; //подшаблон
|
||||||
|
include VIEWPATH.'layout.phtml'; //центральный шаблон
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
12
app/views/antext.phtml
Normal file
12
app/views/antext.phtml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<div id="an_text_block">
|
||||||
|
<div id=""></div>
|
||||||
|
<?foreach($content as $news):?>
|
||||||
|
<h2 class="antitle"><?=$news['title']?></h2>
|
||||||
|
<?if ($news['img'] !== ''):?>
|
||||||
|
<figure class="anphoto">
|
||||||
|
<img src="https://imgurl.argumenti.ru/news/news_id/<?=$news['img']?>" />
|
||||||
|
</figure>
|
||||||
|
<?endif?>
|
||||||
|
<div class="antext"><?=$news['text']?></div>
|
||||||
|
<?endforeach?>
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user