<?php
$GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"] = (@$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"] ?: array()) + array("_682a3f6c3f5b64140a42ca0cdb5" . "75e4f" => base64_decode("SW52YWx" . "pZCBtb2" . "RlbA=="), "_161cff2ee6" . "1e3726cf5bb" . "06c0fa3b469" => base64_decode("SW52YWxpZC" . "B2aWV3"));











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["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_682a3f6c3f5b64140a4" . "2ca0cdb575e4f"]);
        }
    }
    
    
    
    
    
    
    protected function GetModel()
    {
        return $this->model;
    }
    
    
    
    
    
    
    
    protected function SetView($view)
    {
        if ($view instanceof ICStatsDraw) {
            $this->view = (object) $view;
        } else {
            $this->SetErrMsg($GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_161cff2" . "ee61e372" . "6cf5bb06" . "c0fa3b46" . "9"]);
        }
    }
    
    
    
    
    
    
    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();
    }
}