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/SBogers60/vandeurzenheftrucks.nl/wwwroot/app/controllers/c_products.class.php
<?php
/**
 * c_home.class.php
 * Created by Komma Mediadesign.
 * Author: mike
 * Date: 11/02/14
 */


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

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

        $Bc = new Breadcrumb();
        $this->View->setData('breadcrumb', $Bc->create('products') );

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

    public function product()
    {
        if(defined('URL_SUB'))
        {
            $sub = str_replace('?rel=ajax','',URL_SUB);


            // Title
            $title = str_replace('-',' ',$sub);
            $title = ucfirst($title);
            $this->View->setData('page_title', $title . ' | ' . SITE_NAME );


            $Bc = new Breadcrumb();
            $this->View->setData('breadcrumb', $Bc->create('products',$title) );


            // View file
            $fileName = str_replace('-','_',$sub);
            $file = DOCUMENT_ROOT . 'app/views/products/v_' . $fileName . '.php';

            if(is_file($file))
            {
                // Load template view
                $this->View->render('products/v_' . $fileName);
            }
            else
            {
                Fn::notFound();
            }
        }
    }
}