<?php

(defined('BASEPATH')) OR exit('No direct script access allowed');

/**
 * Admin         Class
 * Extends       MX_Controller
 * @property     Admin $admin
 * @property     Auth $auth
 * @author       Mohamed Mahdy
 */
class Back_end extends main {

    /**
     * count num of unreaded messages
     *
     * @var integer
     *
     */
    public $unreaded_messages;

    function __construct() {
        parent::__construct();
        $this->load->model('patient/checkupinfo_model', 'checkupinfo');

//        if ($this->auth->is_logged_in()) {
//            $this->unreaded_messages = Modules::run('contactus/admin_contactus/count_unread_messages');
//        }
        $this->load->language("admin/header");
    }

    /**
     *
     * @param string $main_containt
     * @param array $data
     */
    protected function view($main_containt, $data = null) {

        $this->load->view('admin/header');
        $this->load->view($main_containt, $data);
        echo Modules::run("patient/admin_checkupinfo/notify_nextcheckupinfo");

        $this->load->view('admin/footer');
    }

    /**
     * give it the right string and it will
     *
     * @param string $right
     * @return void
     */
    protected function check_right($right, $path = '') {
        if ($path) {
            $this->auth->check($right, $path);
        } else {
            $this->auth->check($right, 'admin/dashboard');
        }
    }

}
