public function CategoryAction($id) { $experts = new Consult($this->context); $exp_id = $experts->getCatId($id); $exp_user = $experts->getCatUsers($id); $experts->getPOST(); $questions = $this->db->query('select id, title, body, answer from consult_questions where isActive = 1 ORDER BY id DESC ')->fetchall(); $category = $this->db->query('select id, name, alt_name, small_img from consult_category')->fetchall(); $expert = $this->db->query(' SELECT cc.id, cc.name, cc.alt_name, ud.FirstName, ud.LastName, ud.UserID FROM UserData as ud, consult_category as cc, consult_user_category as cu WHERE ud.UserID=cu.uid and cc.id=cu.cid limit 5 ')->fetchall(); $this->view->breadcrumbs = array(array('url' => '/', 'title' => 'Главная'), array('url' => '/consult/', 'title' => 'Консультации'), array('url' => '../consult/cn-' . $id, 'title' => $exp_id['name'])); $this->view->setVars(array('category' => $category, 'experts' => $exp_id, 'expert' => $expert, 'category' => $category, 'expertsuser' => $exp_user, 'questions' => $questions)); $this->view->generate(); }