0){ $_SESSION["ind_tours"] = $_SESSION["ind_tours"].$post["ind_tour"].';'; setcookie("individualTours", $_SESSION["ind_tours"], strtotime( '+30 days' )); if(isset($post["add_act"]) && $post["add_act"] == 'single') $page = 'tourinfo'; else $page = 'individual_tours'; } if((isset($get["act"]) && $get["act"] != '') || (isset($post["act"]) && $post["act"] != '')){ if($get["act"] == 'tour_search') $page = 'tours'; elseif($get["act"] == 'hotel_search') $page = 'hotels'; elseif($get["act"] == 'cars_search') $page = 'cars'; elseif($get["act"] == 'rentals_search') $page = 'rentals'; elseif($get["act"] == 'individual_tour_search' && $get["ind_cat_filtr"] == '') $page = 'individual_tours'; elseif($get["act"] == 'individual_tour_search' && $get["ind_cat_filtr"] != '') $page = 'tourinfo'; elseif($get["act"] == 'guide_search') $page = 'guides'; elseif($post["act"] == 'book') $page = 'payment'; } if(isset($get["ind_cat_filtr"]) && $get["ind_cat_filtr"] != '') $page = 'tourinfo'; if($post["redirect"] != ''){ if($post["redirect"] == 'individuals') echo''; } if($lang == 'RU'){ echo ''; } $title = $global["title_".$_SESSION["lang"]]; $meta_title = $global["title_".$_SESSION["lang"]]; $meta_desc = $global["desc_".$_SESSION["lang"]]; $meta_keys = $global["keywords_".$_SESSION["lang"]]; $url = $_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI]; $url = explode("/",$url); $count = count($url)-1; if(is_numeric($url[$count])){ $response = getPostById($url[$count]); if($response["POST_ID"] > 0){ $title_image= $response["POST_TITLE_".$lang]; $title_og = $title_image; if($title_image == ''){ if($response["POST_TITLE_EN"] != ''){ $title_image= $response["POST_TITLE_EN"]; $title_og = $title_image; }elseif($response["POST_TITLE_RU"] != ''){ $title_image= $response["POST_TITLE_RU"]; $title_og = $title_image; }elseif($response["POST_TITLE_AM"] != ''){ $title_image= $response["POST_TITLE_AM"]; $title_og = $title_image; } } } }else{ $title_image = 'Visit Armenia'; //$response = getPageByUid($p2); $title_og = $response[PAGE_TITLE_.$lang]; //$title_og = ''; } $url_og = $_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI]; if(($page == 'tour' || $page == 'tourinfo') && $p2>0){ if(isset($post["ind_cat_filtr"]) && $post["ind_cat_filtr"] != ''){ $tourId = $post["ind_cat_filtr"]; }else{ $tourId = $p2; } $tour = getTourById($tourId); if($tour["TOUR_ID"] > 0){ if($tour["TOUR_META_TITLE_".$lang] != '') $title_og = $title = $tour["TOUR_META_TITLE_".$lang]; else $title_og = $title = $tour["TOUR_TITLE_".$lang]; $meta_title = trim(preg_replace('/\s\s+/', ' ', $tour["TOUR_META_TITLE_".$lang])); $meta_desc = trim(preg_replace('/\s\s+/', ' ', $tour["TOUR_META_DESC_".$lang])); $meta_keys = trim(preg_replace('/\s\s+/', ' ', $tour["TOUR_META_KEYS_".$lang])); } }elseif($page == 'blog'){ if($p3>0){ $res = getPostById($p3); if($res["POST_ID"] > 0){ if($tour["POST_META_TITLE_".$lang] != '') $title = $tour["POST_META_TITLE_".$lang]; else $title_og = $title = $tour["POST_TITLE_".$lang]; $meta_title = trim(preg_replace('/\s\s+/', ' ', $res["POST_META_TITLE_".$lang])); $meta_desc = trim(preg_replace('/\s\s+/', ' ', $res["POST_META_DESC_".$lang])); $meta_keys = trim(preg_replace('/\s\s+/', ' ', $res["POST_META_KEYS_".$lang])); } }else{ $res = getBlogTypeBySlug($p2); //var_dump($res["BT_META_TITLE_".$lang]); $meta_title = trim(preg_replace('/\s\s+/', ' ', $res["BT_META_TITLE_".$lang])); $meta_desc = trim(preg_replace('/\s\s+/', ' ', $res["BT_META_DESC_".$lang])); $meta_keys = trim(preg_replace('/\s\s+/', ' ', $res["BT_META_KEYS_".$lang])); $title_og = $title = $tour["BT_META_TITLE_".$lang]; } } if(!$res['POST_THUMB']){ $og_img = 'http://visitarmenia.travel/style/img/logo.png'; }else{ $og_img = 'http://visitarmenia.travel/res/src/'.$res['POST_THUMB']; } if($title_og != '' && $title == ''){ $title = $title_og; } if($title == '' && $title == ''){ $title = $meta_title; } include('header.php'); ?>