isMobile() ? ($detect->isTablet() ? 'tablet' : 'mobile') : 'desktop'); $request_url = $_SERVER['REQUEST_URI']; if($_GET['versao_layout'] != ''){ $_SESSION['ss_versao_layout'] = $_GET['versao_layout']; } if($layout == "mobile" && $_SESSION['ss_versao_layout'] == "desktop"){ $layout = "desktop"; } if($_SESSION['desktop'] == 'true'){ }elseif(strpos($_SERVER['HTTP_HOST'], 'loja.ecompleto') !== false && $layout == 'mobile'){ $arrPast = explode("/", $_SERVER["REQUEST_URI"]); header('Location: http://' . $_SERVER['HTTP_HOST']."/".$arrPast[1]."/mobile".str_replace($arrPast[1]."/", "", $request_url)); exit(); }elseif(strpos($_SERVER['HTTP_HOST'], 'dev.ecompleto') !== false && $layout == 'mobile'){ $arrPast = explode("/", $_SERVER["REQUEST_URI"]); header('Location: http://' . $_SERVER['HTTP_HOST']."/".$arrPast[1]."/mobile".str_replace($arrPast[1]."/", "", $request_url)); exit(); }elseif(strpos($_SERVER['HTTP_HOST'], 'www.', 0) !== false && $layout == 'mobile'){ header('Location: http://' . str_replace("com.br", "com.br/mobile", $_SERVER['HTTP_HOST']).$request_url); exit(); }elseif(strpos($_SERVER['HTTP_HOST'], '/mobile/') !== false && $layout == 'desktop'){ header('Location: http://www.' . str_replace("mobile/", "", $_SERVER['HTTP_HOST']).$request_url); exit(); }elseif($layout == 'mobile'){ header('Location: http://' . str_replace("com.br", "com.br/mobile", $_SERVER['HTTP_HOST']).$request_url); exit(); } ?> getHead("exibirdepartamento", $_GET['id']);?>