From 232aa1924c8c0f10d87b210b46c9f061af5c844c Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Sun, 17 Oct 2010 13:29:57 +0000 Subject: added files --- .../Application/Controllers/HomeController.php | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 h-source/Application/Controllers/HomeController.php (limited to 'h-source/Application/Controllers/HomeController.php') diff --git a/h-source/Application/Controllers/HomeController.php b/h-source/Application/Controllers/HomeController.php new file mode 100644 index 0000000..593d7b0 --- /dev/null +++ b/h-source/Application/Controllers/HomeController.php @@ -0,0 +1,58 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +class HomeController extends BaseController +{ + + public function __construct($model, $controller, $queryString) + { + + $this->_topMenuClasses['home'] = " class='currentitem'"; + + parent::__construct($model, $controller, $queryString); + + $data['title'] = 'home - '.Website::$generalName; + $this->append($data); + } + + public function index($lang = 'en') + { +// get the news container + $this->m['BoxesModel']->setWhereQueryClause(array('title'=>'home_news')); + $boxes = $this->m['BoxesModel']->getAll('boxes'); + + if (count($boxes) > 0) + { + $xml = htmlspecialchars_decode($boxes[0]['boxes']['message'],ENT_QUOTES); + + $box_news = new BoxParser($xml); + $data['htmlNewsBox'] = $box_news->render(); + } + else + { + $data['htmlNewsBox'] = null; + } + + $this->append($data); + $this->cleverLoad('left'); + $this->right($lang); + } + +} \ No newline at end of file -- cgit v1.2.3