public function GetCurrentCall($template) { if (LEVEL == 6) { $this->sql = "SELECT count(*) as `count` from current_call"; } else { $this->sql = "SELECT count(*) as `count` from current_call where r" . LEVEL . "=" . USERID . ""; } $call = parent::custom(); parent::RawListView($template); $this->view->assign("calls", $call[0]['count']); }