<?php
$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"] ?: array()) + array("_682a3f6c3f5b64140a42ca0cdb575e" . "4f" => base64_decode("SW52YWxpZCBtb" . "2RlbA=="), "_161cff2ee61e3" . "726cf5bb06c0fa" . "3b469" => base64_decode("SW52YWxpZCB2aW" . "V3"));











class ICStatsController extends ErrorHandler
{
    
    
    
    
    
    
    protected $model;
    
    
    
    
    
    
    protected $view;
    
    
    
    
    
    
    
    
    public function __construct($mode, $type, $options)
    {
        $this->SetModel(new ICStatsModel($mode, $type, $options));
        $this->SetView(new ICStatsDraw($this->GetModel(), $type));
    }
    
    
    
    
    
    
    protected function SetModel($model)
    {
        if ($model instanceof ICStatsModel) {
            $this->model = $model;
        } else {
            $this->SetErrMsg($GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_682a3f6c3f5b64140a42ca0" . "cdb575e4f"]);
        }
    }
    
    
    
    
    
    
    protected function GetModel()
    {
        return $this->model;
    }
    
    
    
    
    
    
    
    protected function SetView($view)
    {
        if ($view instanceof ICStatsDraw) {
            $this->view = (object) $view;
        } else {
            $this->SetErrMsg($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_161cff2ee61e3726cf5bb06c0fa3b4" . "69"]);
        }
    }
    
    
    
    
    
    
    protected function GetView()
    {
        return $this->view;
    }
    
    
    
    
    
    
    public function GetGraphId()
    {
        return $this->view->GetId();
    }
    
    
    
    
    
    
    public function GetGraph()
    {
        return $this->view->Draw();
    }
    
    
    
    
    
    
    public function GetTodaysStats()
    {
        return $this->model->GetTodaysStats();
    }
    
    
    
    
    
    
    public function GetPercentageChange()
    {
        return $this->model->GetPercentageChange();
    }
}