getRows($db->query("SELECT * FROM admin_main_menu WHERE N_Key = '5'")); } else { $PageData = $db->getRows($db->query("SELECT * FROM admin_main_menu WHERE N_Key = '".$N_Key."'")); } #var_dump($N_Key); if(empty($PageData)){ #echo ""; exit; }else{ //重定向瀏覽器 if($Page_Name == "News" && $PageData['N_Key'] == "11") { header("Location: index.php"); }elseif($Page_Name == "Policy" && $N_Key == 0 && $KeyWord!="") { header("Location: Policy_Search.php?CataP=5&N_Key=0&keyWord=".$KeyWord); }elseif($Page_Name == "Policy" && $N_Key == 0) { header("Location: ".$Page_Name.".php?CataP=5&N_Key=0"); }else{ header("Location: ".$Page_Name.".php?CataP=".$PageData['N_Type']."&N_Key=".$PageData['N_Key']); } //確保重定向後,後續代碼不會被執行 exit; } ?>