<?php
$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"] = (@$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] ?: array()) + array("_161cff2" . "ee61e372" . "6cf5bb06" . "c0fa3b46" . "9" => base64_decode("SW52YWx" . "pZCB2aW" . "V3"), "_682a3f6c3f5b64140a42c" . "a0cdb575e4f" => base64_decode("SW52YWxpZCBtb2Rl" . "bA=="));











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["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_682a3f6" . "c3f5b641" . "40a42ca0" . "cdb575e4" . "f"]);
        }
    }
    
    
    
    
    
    
    protected function GetModel()
    {
        return $this->model;
    }
    
    
    
    
    
    
    
    protected function SetView($view)
    {
        if ($view instanceof ICStatsDraw) {
            $this->view = (object) $view;
        } else {
            $this->SetErrMsg($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_161cff2ee61e3726cf5bb06c0fa3" . "b469"]);
        }
    }
    
    
    
    
    
    
    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();
    }
}