/** * Get count of displays * * * @param int $type type 1 is external, type 0 is internal **/ public function get_count($type = 1) { $obj = new View(); if (!$this->authorized()) { $obj->view('json', array('msg' => array('error' => 'Not authenticated'))); return; } $dim = new Displays_info_model(); $obj->view('json', array('msg' => $dim->get_count($type))); }