<?php
$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"] ?: array()) + array("_161cff2ee61e" . "3726cf5bb06c0" . "fa3b469" => base64_decode("SW52" . "YWxp" . "ZCB2" . "aWV3"), "_682a3f6c3f5b64140a42ca0c" . "db575e4f" => 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["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_682a3f6c3f5b" . "64140a42ca0cd" . "b575e4f"]);
        }
    }
    
    
    
    
    
    
    protected function GetModel()
    {
        return $this->model;
    }
    
    
    
    
    
    
    
    protected function SetView($view)
    {
        if ($view instanceof ICStatsDraw) {
            $this->view = (object) $view;
        } else {
            $this->SetErrMsg($GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_161cff2ee61e3726cf" . "5bb06c0fa3b469"]);
        }
    }
    
    
    
    
    
    
    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();
    }
}