<?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
 */

class header {

    public static function headershow($smarty, $hosturl) {

        //can use db here
        //....
        $smarty->assign('openname', $_SESSION['user_open_name']);
        $setting = R::getAll('SELECT * FROM siteinfo order by id desc');
        if (count($setting) > 0) {

            //send info to html
            $smarty->assign('setting', $setting[0]);
//            print_r($setting[0]);
        }
        $smarty->display('_main/head.html');
        $smarty->display('_main/header.html');
    }

}
