File: D:/HostingSpaces/SBogers64/klimroosbudel.nl/wwwroot/app/controllers/c_agenda.class.php
<?php
/**
* c_home.class.php
* Created by Komma Mediadesign.
* Author: mike
* Date: 11/02/14
*/
class Agenda extends Site_Controller
{
public function __construct()
{
parent::__construct();
}
/*
* Index of the home page
*/
public function index()
{
// Title
$this->View->setData('page_title', SITE_NAME);
// Get Dynamic images
$Db = new DatabaseHandler();
$Db->setTableName(TABLE_PREFIX.'photo_sliders_images');
// Get images
$Db->clearRule();
$Db->addRule('itemId', 5);
$image = $Db->select();
$path = UPLOADS_ROOT.$image['filename'];
$this->View->setData('image_1', $path);
// Get agenda data
$list = $this->Model->create();
$this->View->setData('agenda_output', $list);
// Get agenda data for next year
// manually
$list = $this->Model->create(intval(date('Y')) + 1);
$this->View->setData('agenda_output_next', $list);
// Set header photos
$photos = 'agenda/header_agenda.jpg';
$this->View->setData('header_photos', $photos);
// Load template view
$this->View->render('v_agenda');
}
}