HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers68/resortouddorpduin.nl/wwwroot/app/controllers/c_nieuws.class.php
<?php
/**
 * c_home.class.php
 * Created by Komma Mediadesign.
 * Author: mike
 * Date: 11/02/14
 */


class Nieuws extends Controller
{
    public function __construct()
    {
        parent::__construct();
    }

    /*
     * Index of the home page
     */
    public function index()
    {
        // Title
        $this->View->setData('page_title', SITE_NAME);

        // Load template view
        $this->View->render('v_nieuws');
    }

    public function newsItem()
    {
        // url..
        if ( ! defined('URL_SUB') || ! defined('URL_SUB2') || ! defined('URL_SUB3'))
        {
            Fn::notFound();
        }
        if (LANG_ROOT == '/de/'){
            $nieuws = 'nachrichten/';
        }else{
            $nieuws = 'nieuws/';
        }

        $newsUrl = URL_SUB . '/' . URL_SUB2 . '/' . URL_SUB3;

        if (URL_SUB3 != 'inloopmiddagen'){
            $page = str_replace('-', '_', URL_SUB3);
            $this->View->render($nieuws. '/v_' . $page);
        }else{
            switch($newsUrl)
            {
                case '2015/01/inloopmiddagen':
                    // Load template view
                    $this->View->render($nieuws. '/v_inloopmiddag_2015');
                    break;
                case '2014/11/inloopmiddagen':
                    // Load template view
                    $this->View->render($nieuws. '/v_inloopmiddag_2014');
                    break;
                default:
                   // Fn::notFound();
            }
        }
    }
}