<?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 footer {

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

        #select table
        $setting = R::findOne('siteinfo', 'order by id desc');
        if (count($setting) > 0) {
            //send info to html
            $smarty->assign('setting', $setting);
        }

        $allPage = R::findAll('page', 'hide= 0 limit 5');
        $smarty->assign('allPage', $allPage);


        if (isset($_SESSION['msgSub'])) {
            $smarty->assign('msgSub', $_SESSION['msgSub']);
            unset($_SESSION['msgSub']);
        } else {
            $smarty->assign('msgSub', "");
        }


        $smarty->display('templates/' . default_lang_interface . '/footer.html');
        $smarty->display('templates/' . default_lang_interface . '/foot.html');
    }

}
