<?php

/*
 * awframework from aw.inc present aw controller
 * it will help you develop easy and fast with secure tools
 * you can edit and add what you feel right
 * don't change in strucure of file
 */

require_once("imp/_imp.php");

class Controllers {

    //public vars
    public $smarty;
    public $hosturl;

    // it will run in everytime with
    // default requried
    public function __construct() {
        require_once("../public/aw_config.php");
        $this->smarty = $smarty;
        $this->hosturl = $hosturl;


        $controlname = 'about';
        $this->smarty->assign('about', 1);

        require_once("header.php");
        require_once("footer.php");
    }

    //here the frist page and
    //the frist action in this class
    public function index() {

        $page = R::findOne('page', 'order by id asc');
        $this->smarty->assign('page', $page);

        header::headershow($this->smarty, $this->hosturl);
        $this->smarty->display('templates/' . default_lang_interface . '/about-page.html');
        //$this->smarty->display('templates/' . default_lang_interface . '/client.html');
        footer::footershow($this->smarty, $this->hosturl);
    }

// at the end of class call
    public function __destruct() {
//close connection
        R::close();
    }

}
