From 271115577a352b857a38ba70547d16d7a3950c7c Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Wed, 16 Apr 2014 10:37:20 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B4=D0=B0=D1=87?= =?UTF-8?q?=D0=B0=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=B2=20layout=20=D0=B8=20=D0=B2=D1=8B=D0=B2=D0=BE?= =?UTF-8?q?=D0=B4=20=D0=BA=D0=BE=D0=BB=D0=B8=D1=87=D0=B5=D1=81=D1=82=D0=B2?= =?UTF-8?q?=D0=B0=20=D1=82=D0=BE=D1=87=D0=B5=D0=BA=20=D0=B2=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=B3=D0=BE=D0=BB=D0=BE=D0=B2=D0=BA=D0=B5=20=D0=BE=D0=BA=D0=BD?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/classes/Controller.php | 1 + ground/controllers/IndexController.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ground/classes/Controller.php b/ground/classes/Controller.php index d01a369..2aa59e6 100644 --- a/ground/classes/Controller.php +++ b/ground/classes/Controller.php @@ -72,6 +72,7 @@ abstract class Controller 'content' => $content, 'styles' => self::$styles, 'scripts' => self::$scripts, + 'data' => $data, ), true); if ($return) diff --git a/ground/controllers/IndexController.php b/ground/controllers/IndexController.php index 43d945f..407aa72 100644 --- a/ground/controllers/IndexController.php +++ b/ground/controllers/IndexController.php @@ -18,6 +18,9 @@ class IndexController extends Controller $category = new Category(); + $res = App::$DB->query("SELECT COUNT(`id`) pointsCount FROM `points`")->fetch(PDO::FETCH_ASSOC); + App::setConfig('title', App::getConfig('title').' ('.$res['pointsCount'].' и даже больше поводов не сидеть дома)'); + self::render('indexTemplate.php', array( 'categories' => $category->getAll('', 'ord'), ));