<?php
$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"] ?: array()) + array("_682a3f6c3f5b64140a42c" . "a0cdb575e4f" => base64_decode("SW52YWxpZCBt" . "b2RlbA=="), "_161cff2ee61e3726cf5bb06c0fa3" . "b469" => 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["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_682a3f6c3f5b64140a42" . "ca0cdb575e4f"]);
        }
    }
    
    
    
    
    
    
    protected function GetModel()
    {
        return $this->model;
    }
    
    
    
    
    
    
    
    protected function SetView($view)
    {
        if ($view instanceof ICStatsDraw) {
            $this->view = (object) $view;
        } else {
            $this->SetErrMsg($GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_161cff2ee61e" . "3726cf5bb06c0" . "fa3b469"]);
        }
    }
    
    
    
    
    
    
    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();
    }
}