Catalogue->children($id); $arrId = array($id); foreach ($groupId as $values) { $arrId[] = $values['Catalogue']['id']; } // Tieu de danh muc $tieude = $this->Catalogue->read(null, $id); $this->set('tieude', $tieude); // Set Seo if ($tieude['Catalogue']['title_seo'] != "") { $this->set('title_for_layout', $tieude['Catalogue']['title_seo']); } else { $this->set('title_for_layout', $tieude['Catalogue']['name']); } $this->set('keywords_for_layout', $tieude['Catalogue']['meta_key']); $this->set('description_for_layout', $tieude['Catalogue']['meta_des']); $this->paginate = array( 'conditions' => array( 'News.status' => 1, 'News.cat_id' => $arrId ), 'order' => 'News.pos DESC, News.modified DESC', 'limit' => '10' ); $listNews = $this->paginate('News'); $this->set('listNews', $listNews); // menu left $dmmnl = $this->Catalogue->find('all', array( 'conditions' => array( 'Catalogue.parent_id' => 66 ), 'order' => 'Catalogue.pos ASC, Catalogue.id DESC' )); $this->set('dmmnl', $dmmnl); if ($id == 66 || $tieude['Catalogue']['parent_id'] == 66) { $this->render('index1'); } } public function tinhome($id = null) { $groupId = $this->Catalogue->children($id); $arrId = array($id); foreach ($groupId as $values) { $arrId[] = $values['Catalogue']['id']; } $this->paginate = array( 'conditions' => array( 'News.status' => 1, 'News.view' => 1, 'News.cat_id' => $arrId ), 'order' => 'News.pos DESC, News.modified DESC', 'limit' => '9' ); $listNews = $this->paginate('News'); return $listNews; } public function listnews() { $this->paginate = array( 'conditions' => array( 'News.status' => 1 ), 'order' => 'News.pos DESC, News.modified DESC', 'limit' => '5' ); $listNews = $this->paginate('News'); $this->set('listNews', $listNews); } public function detail($id = null) { $this->layout = 'detail_new'; $detailNews = $this->News->findById($id); $this->set('detailNews', $detailNews); //List album $listimg = $this->Post->find('all', array( 'conditions' => array( 'Post.cat_id' => $id ), 'order' => 'Post.id DESC' )); $this->set('listimg', $listimg); // Set Seo if ($detailNews['News']['title_seo'] != "") { $this->set('title_for_layout', $detailNews['News']['title_seo']); } else { $this->set('title_for_layout', $detailNews['News']['name']); } $this->set('keywords_for_layout', $detailNews['News']['meta_key']); $this->set('description_for_layout', $detailNews['News']['meta_des']); // Cac tin khac $tinkhac = $this->News->find('all', array( 'conditions' => array( 'News.id <>' => $id, 'News.cat_id' => $detailNews['News']['cat_id'] ), 'order' => array('News.pos DESC', 'News.modified DESC'), 'limit' => 10 )); $this->set('tinkhac', $tinkhac); } public function service($id = null) { $listNews = $this->News->find('all', array( 'conditions' => array( 'News.status' => 1, 'News.cat_id' => 1 ) )); $this->set('listNews', $listNews); } public function partner() { } public function search() { $keyword = $this->request->data['searchProduct']; $this->paginate = array( 'conditions' => array( 'News.status' => 1, 'News.name LIKE' => '%' . $keyword . '%' ), 'order' => 'News.pos DESC, News.modified DESC', 'limit' => '10' ); $listNews = $this->paginate('News'); $this->set('listNews', $listNews); }}_setErrorLayout(); if (isset($this->params->query['language'])) { $lang = $this->params->query['language']; $this->Session->write('language', $lang); } //set language if ($this->Session->read('language') == 'vie' || $this->Session->read('language') == "") { Configure::write('Config.language', 'vie'); } else { Configure::write('Config.language', $this->Session->read('language')); } if ($this->request->is('mobile')) { $this->theme = "Mobile"; } else { } $setting = $this->Setting->find('first'); $this->set('setting', $setting); } public function _setErrorLayout() { if ($this->name == 'CakeError') { $this->redirect('/'); $this->layout = 'error'; } }} Errors _setErrorLayout(); if (isset($this->params->query['language'])) { $lang = $this->params->query['language']; $this->Session->write('language', $lang); } //set language if ($this->Session->read('language') == 'vie' || $this->Session->read('language') == "") { Configure::write('Config.language', 'vie'); } else { Configure::write('Config.language', $this->Session->read('language')); } if ($this->request->is('mobile')) { $this->theme = "Mobile"; } else { } $setting = $this->Setting->find('first'); $this->set('setting', $setting); } public function _setErrorLayout() { if ($this->name == 'CakeError') { $this->redirect('/'); $this->layout = 'error'; } }}

Fatal Error

Error: Class 'AppController' not found
File: /home/xettuyentr/domains/xettuyentructuyen.edu.vn/public_html/app/Controller/CommonController.php
Line: 8

Notice: If you want to customize this error message, create app/View/Errors/fatal_error.ctp