File: D:/HostingSpaces/SBogers13/rie-jeanne.nl/wwwroot/app/controllers/c_photography.class.php
<?php
/**
* Created by PhpStorm.
* User: joepvanhunsel
* Date: 18-03-14
* Time: 11:41
*/
class Photography extends Controller
{
public function __construct()
{
parent::__construct();
}
/*
* Index of the home page
*/
public function index()
{
$this->Model->set('_name', 'photography');
$this->Model->set('_pageId', 1);
$photos = $this->Model->getTableData();
$js = '<script type="text/javascript">var items ='. json_encode($photos) . '</script>';
$this->View->setData('js_output', $js);
//fn::pre_print($photos);
$select = '<select class="foto_select">';
$i=1;
foreach ($photos as $item)
{
$select .= '<option value="' . $i . '">Foto ' . $i . '</option>';
$i++;
}
$select.='</select>';
$this->View->setData('select', $select);
//list met achtergrond foto's
$reader = new Image_Reader('photography');
$list = $reader->createList();
$this->View->setData('list', $list);
// Title
$this->View->setData('page_title', SITE_NAME);
// Load template view
$this->View->render('v_photography');
}
}