<?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
        //....
        $patientId = filter_input(INPUT_GET, "patientid");
        $patient = R::load("patients",$patientId);
        $patientName = $patient->wifename;
        $smarty->assign("patientName",$patientName);
        $userData = R::getRow('select * from awusers where user_id = ' . $_SESSION['user_id']);
        $smarty->assign('openname',$userData['name']);
        
        $programesetting = R::findOne('programesetting');
        $smarty->assign('programesetting', $programesetting);

        $smarty->display('_main/head.html');
        $smarty->display('_main/header.html');
    }

}
