From 8eb430121a881d12bafa02e8ec17dbca17d4e90a Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Sun, 8 Nov 2015 22:38:03 +0300 Subject: [PATCH] =?UTF-8?q?ADD=20-=20=D1=83=D1=87=D1=91=D1=82=20=D0=B2?= =?UTF-8?q?=D0=BD=D0=B5=D1=88=D0=BD=D0=B8=D1=85=20=D0=BF=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D1=85=D0=BE=D0=B4=D0=BE=D0=B2=20+=20=D0=BD=D0=B5=D1=81=D0=BA?= =?UTF-8?q?=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE=20=D1=82=D0=BE=D0=B2=D0=B0=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=20=D1=81=20=D1=8E=D0=BB=D0=BC=D0=B0=D1=80=D1=82?= =?UTF-8?q?=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D1=82=D0=B5=D1=81=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/controllers/GoController.php | 28 ++++++++++++++++++++++++++ ground/controllers/PointController.php | 1 + ground/models/GoAway.php | 17 ++++++++++++++++ ground/models/Goods.php | 24 ++++++++++++++++++++++ ground/views/point.php | 24 ++++++++++------------ public/css/pageStyle.css | 4 ++++ 6 files changed, 85 insertions(+), 13 deletions(-) create mode 100644 ground/controllers/GoController.php create mode 100644 ground/models/GoAway.php create mode 100644 ground/models/Goods.php diff --git a/ground/controllers/GoController.php b/ground/controllers/GoController.php new file mode 100644 index 0000000..a280674 --- /dev/null +++ b/ground/controllers/GoController.php @@ -0,0 +1,28 @@ + date('c'), + 'url' => $url, + 'ref' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '', + )); + $go->save(); + App::redirect($url, 302); + } else { + App::log('goAwayErrors', $url); + App::error404(); + } + } +} diff --git a/ground/controllers/PointController.php b/ground/controllers/PointController.php index 93c6a6a..8ed92f6 100644 --- a/ground/controllers/PointController.php +++ b/ground/controllers/PointController.php @@ -101,6 +101,7 @@ class PointController extends Controller 'photoLinks' => $photoLinksRes, 'articles' => $articles, 'extraParams' => $point->getExtraParams(), + 'goods' => Goods::model()->getRandom(6), )); } else { App::error404(); diff --git a/ground/models/GoAway.php b/ground/models/GoAway.php new file mode 100644 index 0000000..c27ea7b --- /dev/null +++ b/ground/models/GoAway.php @@ -0,0 +1,17 @@ +_tableName_ = 'goAway'; + parent::__construct($fromArray); + } + + static function model() + { + return new self(); + } + +} diff --git a/ground/models/Goods.php b/ground/models/Goods.php new file mode 100644 index 0000000..50d309b --- /dev/null +++ b/ground/models/Goods.php @@ -0,0 +1,24 @@ +_tableName_ = 'goods'; + parent::__construct($fromArray); + } + + static function model() + { + return new self(); + } + + function getRandom($count = 6) + { + return $this->getAll(array( + 'order' => 'RAND()', + 'limit' => (int) $count, + )); + } +} diff --git a/ground/views/point.php b/ground/views/point.php index 201ef8f..7cc4600 100644 --- a/ground/views/point.php +++ b/ground/views/point.php @@ -90,19 +90,7 @@ $index = 0; Использованы фотоматериалы с сайтов: -
- - - - -
-

+

id): ?> [ ] [ ] @@ -150,6 +138,16 @@ $index = 0;


+ +
+
+

В путешествии обязательно пригодится:

+
name ?>
price ?> руб.
+
+
+
+ +
diff --git a/public/css/pageStyle.css b/public/css/pageStyle.css index 17d04df..f15708f 100644 --- a/public/css/pageStyle.css +++ b/public/css/pageStyle.css @@ -5,6 +5,10 @@ div.pointsWall .point span.header {font-size: 22px; color: white; font-weight: b .mainTextBlock {font-size: 16px; text-align: justify;} +.test-ulm-row {background-color: #fff;margin-top: -19px;margin-bottom: -19px;padding-top: 10px;padding-bottom: 10px;} +.test-ulm-row .test-ulm {text-align: center;width: 16.5%;float: right;display: inline-block;} +.test-ulm-row .test-ulm nobr {font-size: 1.2em;} + /* -------------------------------------------*/ /* ------------- ADAPTIVE --------------------*/ /* -------------------------------------------*/