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'), ));