$c = new details($aliasMenu); $currentMenu = $c->currentMenu(); if ($currentMenu['id'] == '') { $sql = "SELECT * FROM `web_article` WHERE `status`=1 AND `name_alias` LIKE '%{$aliasDetail}%' LIMIT 1"; if (!($result = $c->_model->db->query($sql))) { die($c->_model->db->error); } $row = $result->fetch_assoc(); header("HTTP/1.1 301 Moved Permanently"); header("Location: " . CONS_BASE_URL . '/' . $row['url']); //$error = ERROR_NOT_FOUND_PAGE; //header('location: '.CONS_BASE_URL); //include_once('view/web_error.php'); return false; } $lang = $currentMenu['lang']; $config = $c->config($lang); $table = $currentMenu['tableData']; $urlImg = $c->_model->_listWebMenuType(); /*view*/ $controlType = 'control' . $currentMenu['typeMenuName']; $cD = new $controlType($aliasDetail); $rowDetail = $cD->_model->_viewDetail($aliasDetail); if ($rowDetail['id'] == '') { $error = ERROR_NOT_FOUND_PAGE; header('location: ' . CONS_BASE_URL); //include_once('view/web_error.php'); return false; } if ($rowDetail['img'] != '') { $img = CONS_BASE_URL . '/' . $currentMenu['typeMenuImg'] . $rowDetail['img']; } else {