0) ? $product->productCat($productId) : (int) getRequest("catId",0); $category_name = ($catId > 0) ? $category->catName($catId) : ""; $category_path = ($catId > 0) ? $category->catPath($catId) : ""; $product_name = ($productId > 0) ? $product->productName($productId) : ""; $brandId = (int) getRequest("brand"); $brandName = ($brandId > 0) ? $product->brandName($brandId) : ""; $page = (int) getRequest("page"); $feature = (int) getRequest("feature"); $feature_name = ($feature > 0) ? $category->get_special_name($feature) : ""; $v_keyword = getRequest("keyword"); $option = getRequest("option"); $currentURL = $_SERVER['REQUEST_URI']; if($lang == 1){ $currentURL = str_replace("lang=1","", $currentURL); } if($lang == 2){ $currentURL = str_replace("lang=2","", $currentURL); } //Thông tin cho header //File CSS cho riêng trang này $header_css = ""; if($productId){ $header_title = $product_name . " - " . $category_name ; $header_keyword = $product_name .", ".$category_name; $header_description = "Xem và mua sản phẩm ".$product_name." trong mục ".$category_name; //modify header by views $view = getRequest("view"); switch($view){ case "spec"; $header_title = $product_name." - Chi tiết"; $header_keyword = $product_name.", chi tiết"; $header_description = "Thông số ".$product_name.""; break; case "writereview"; $header_title = $product_name." - Gửi ý kiến"; $header_keyword = $product_name.", gửi ý kiến"; $header_description = "Gửi ý kiến của bạn về ".$product_name.""; break; default; } }else if($option == "product-list" && $catId > 0){ $header_title = ""; if($option == "shop") $header_title .= "Danh sách cửa hàng bán "; $header_title .= $category_name; //tu danh muc dac biet $special_product_category = (int) getRequest("special"); if($special_product_category > 0) { $header_title .= " , " .$category-> $category->get_special_name($special_product_category); } //THEO TU KHOA if($v_keyword) $header_title .= " " . $v_keyword; if($brandName) $header_title .= " " . $brandName; if($page > 1) $header_title .= " | Trang " . $page; $header_title = $header_title; $header_keyword = $header_title; $header_description = "Mua sản phẩm ".$header_title . " tại "; } else if($feature_name !=""){ $category_name = $feature_name; //hien thi tieu de trang danh sach product_list_common, h1 $header_title = $feature_name; $header_keyword = $feature_name; $header_description = "Mua sản phẩm ".$header_title . " tại "; } //$product_db->disconnect(); $includeEditor = false; if(!isset($_SESSION["cv"])){ $v_visit_num = (int)get_site_seting("truycap"); $v_visit_num++; update_site_seting("truycap",$v_visit_num); $_SESSION["cv"] = 1; } $url = 'includes/language/lang_' . $lang . '.php'; if ($lang == '') { $url = 'includes/language/lang_1.php'; } require_once $url; if ($lang == '') { $lang = 1; $url2 = 'includes/language/lang_' . $lang . '.php'; require_once $url2; } if(!isset($_SESSION['user_id'])){ $iphone = strpos($_SERVER['HTTP_USER_AGENT'], "iPhone"); $android = strpos($_SERVER['HTTP_USER_AGENT'], "Android"); $palmpre = strpos($_SERVER['HTTP_USER_AGENT'], "webOS"); $berry = strpos($_SERVER['HTTP_USER_AGENT'], "BlackBerry"); $ipod = strpos($_SERVER['HTTP_USER_AGENT'], "iPod"); $ipad = strpos($_SERVER['HTTP_USER_AGENT'], "iPad"); if ($iphone || $android || $palmpre || $ipod || $berry || $ipad == true) { include "modules/share/header_smartphone.php"; } else{ include "modules/share/header.php"; } }else{ include "modules/share/header_login.php"; } switch($option){ case "product-list"; include "modules/products/product_list.php"; break; case "product-list-spec"; include "modules/products/product_list_spec.php"; break; case "product"; include "modules/products/product_detail.php"; break; case "product-review-write"; include "modules/products/product_detail_review_write.php"; break; case "product-review"; include "modules/products/product_detail_review.php"; break; case "search"; include "modules/products/product_search.php"; break; case "compare"; include "modules/products/product_compare.php"; break; case "cart"; include "modules/cart/gio_hang.php"; break; case "send-order"; include "modules/cart/don_dat_hang.php"; break; case "about"; include "modules/about/about.php"; break; case "contact"; include "modules/about/contact.php"; break; case "service"; include "modules/about/service.php"; break; case "policy"; include "modules/about/policy.php"; break; case "price-list"; include "modules/price/price_list.php"; break; case "news-list"; include "modules/news/news_list.php"; break; case "news-detail"; include "modules/news/news_detail.php"; break; case "jobs"; include "modules/about/jobs_list.php"; break; case "newsletter"; include "modules/about/newsletter.php"; break; case "vipNews"; include "modules/about/vipNews.php"; break; case "jobs-detail"; include "modules/about/jobs_detail.php"; break; case "brand-intro"; include "modules/brand/brand_intro.php"; break; //register case "register"; include "modules/users/register.php"; break; case "account"; include "modules/users/index.php"; break; case "login"; include "modules/users/login.php"; break; //others case "clip"; include "modules/other/clip.php"; break; case "library"; include "modules/other/thuvienanh.php"; break; case "forgot-pass"; include "modules/other/forgot_password.php"; break; case "trogiup"; include "modules/trogiup/trogiup.php"; break; case "trogiup-detail"; include "modules/trogiup/trogiup_detail.php"; break; case "home-special-product"; include "modules/products/home_special_product.php"; break; case "send-email-address"; include "modules/other/send_email_address.php"; break; case "login-action"; include "modules/users/login_action.php"; break; default; include "modules/products/product_home.php"; break; } include "modules/share/footer.php"; //disconnect DB $product_db->disconnect(); ?>