diff --git a/app/api/apicontent.php b/app/api/apicontent.php index 307e4d6..a027743 100644 --- a/app/api/apicontent.php +++ b/app/api/apicontent.php @@ -16,7 +16,7 @@ function api_pricehash($hash){ $price = db_get($pricesql); if (!isset($price['price_id'])) - return false; + return ['error' => 'not found hash']; else 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; } \ No newline at end of file diff --git a/app/pub/css/an.css b/app/pub/css/an.css index 468f080..0e7facd 100644 --- a/app/pub/css/an.css +++ b/app/pub/css/an.css @@ -365,6 +365,36 @@ input[type="email"],input[type="password"]{ 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) { .book_skeleton{ margin-top: 15px; diff --git a/app/routes/anpdf.php b/app/routes/anpdf.php index d2d2ab4..5bfeb6c 100644 --- a/app/routes/anpdf.php +++ b/app/routes/anpdf.php @@ -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'; //центральный шаблон + } diff --git a/app/views/antext.phtml b/app/views/antext.phtml new file mode 100644 index 0000000..fb112a2 --- /dev/null +++ b/app/views/antext.phtml @@ -0,0 +1,12 @@ +
+
+ +

+ +
+ +
+ +
+ +
\ No newline at end of file