$url = explode('.',$_SERVER['HTTP_HOST']);
//pn
//if ($url[0] = 'www'){
if ($url[1] != 'ship2yard'){
//header('location:http://www.'.$_SERVER['HTTP_HOST']);
header('location:https://www.ship2yard.com/prestige/index.php?www='.$url[1]);
exit();
}
require_once('config_settings.php');
require_once('function_subdomena_new.php');
if ($url[1] == 'aa')//url testowy
$www = 'cnwuzhou';
else
$www = $url[1];
//pn
if(isset($_GET['www'])) $www=$_GET['www'];
$logo = 'logo_'.$www.'.jpg';
$q = "SELECT c.id as id, country_google, map_google, yard, description_full,template
FROM $shipyard_subdomena_tab AS c
LEFT JOIN $shipyard_tab as a ON a.id_shipyard=c.id
WHERE sub='".$www."' and visible=1;";
$query = mysql_query($q);
$a = mysql_fetch_array($query);
//pn
if(!isset($a['template'])) {
header('location:https://www.ship2yard.com');
exit();
}
if ($www != 'example') {
$wyswietl.='
';
$wyswietl .= sub_company_new($www,$a['id'],$logo);
$s_f = sub_facilities_new($a['id']);
if (strlen($s_f)> 819)//wyswietlaj tylko jezeli nei puste
$wyswietl .= $s_f;
#id_shipyard, link do duzej mapy google, link do malej mapy google, szerokosc okna, wysokosc okna popup - nieuzywane
$wyswietl .= sub_maps2_new($a['id'],$a['country_google'],$a['map_google'],"800","892","687","674");
$wyswietl .= sub_description_full_new($a['description_full']);
$wyswietl .= sub_lery_img_new($www);
$wyswietl .= '
';
}
else {
require_once("config_class.inc.php");
require_once("mail.php");
require_once('function_billing.php');
include_once("manager_remarks.inc.php");
$mr = new manager_remarks();
include_once('function_example.php');
$wyswietl .= view_intro();
$wyswietl .= represents_access_view($a['id'],2);
}
$site_title = $a['yard'];
include_once("index_sub".$a['template'].".php");
?>