<?php

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

class Bakery extends Epos_Template {

    function __construct() {
        parent::__construct();
        $this->load->model('Bakery_Model');
        if ($this->Bakery_Model->isThisUserAnEposLogger() && (($this->cookies && !empty($this->cookies)) || ($this->session->userdata('group') == 2))) {
            return true;
        } else {
            redirect('user/login/index/' . $this->session->userdata('branch') . '/' . $this->session->userdata('team'));
        }
    }

    public function index() {
        
        $data['refresh'] = base_url(uri_string());
        $this->render('index', $data);
    }

}
