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 --------------------*/ /* -------------------------------------------*/