Fountaine Pajot Lucia 40 (2018)
?>
// options for ssl in php 5.6.5
$opts = array(
'ssl' => array(
'ciphers' => 'RC4-SHA',
'verify_peer' => false,
'verify_peer_name' => false
)
);
// SOAP 1.2 client
$soap_params = array(
'encoding' => 'UTF-8',
'verifypeer' => false,
'verifyhost' => false,
'soap_version' => SOAP_1_2,
'trace' => 1,
'exceptions' => 1,
'connection_timeout' => 180,
'stream_context' => stream_context_create($opts)
);
$client = new SoapClient("http://api.digibusiness.it/navis2ws/navis2ws.asmx?WSDL", $soap_params);
if ($params[1] == "B") {
$boatInfo = array(
"groupID" => $config->GroupGuid,
"boatID" => $params[0],
"visibilityLevel" => $config->VisibilityLevel,
"culture" => $config->CultureWS
);
$soap_result = $client->GetBoatInfo($boatInfo);
$boatInfo = ($soap_result->GetBoatInfoResult->any);
$boatInfo = new SimpleXMLElement($boatInfo);
}
else if ($params[1] == "T") {
$trailerinfo = array(
"groupID" => $config->GroupGuid,
"trailerID" => $params[0],
"visibilityLevel" => $config->VisibilityLevel,
"culture" => $config->CultureWS
);
$soap_result = $client->GetTrailerInfo($trailerinfo);
$trailerinfo = ($soap_result->GetTrailerInfoResult->any);
$trailerinfo = new SimpleXMLElement($trailerinfo);
}
else if ($params[1] == "E") {
$engineinfo = array(
"groupID" => $config->GroupGuid,
"engineID" => $params[0],
"visibilityLevel" => $config->VisibilityLevel,
"culture" => $config->CultureWS
);
$soap_result = $client->GetEngineInfo($engineinfo);
$engineinfo = ($soap_result->GetEngineInfoResult->any);
$engineinfo = new SimpleXMLElement($engineinfo);
}
global $mainTbl;
global $boatFamiliesTbl;
global $enginesTbl;
global $generatorsTbl;
global $imagesTbl;
global $videosTbl;
global $accessoriesTbl;
global $levelsTbl;
global $componentsTbl;
global $subElementsTbl;
global $attachmentsTbl;
global $imagesTblCount;
global $videosTblCount;
$mainTbl = $boatInfo->BoatInfo->GeneralData; //Dati generici
$boatFamiliesTbl = $boatInfo->BoatInfo->BoatFamilies; //Tipologia
$enginesTbl = $boatInfo->BoatInfo->Engines; //Generatori
$generatorsTbl = $boatInfo->BoatInfo->Generators; //Motori
$imagesTbl = $boatInfo->BoatInfo->Images; //Immagini
$videosTbl = $boatInfo->BoatInfo->Videos; //Video
$accessoriesTbl = $boatInfo->BoatInfo->Accessories; //Accessori
$levelsTbl = $boatInfo->BoatInfo->Levels; //Livelli
$componentsTbl = $boatInfo->BoatInfo->Components; //Componenti
$subElementsTbl = $boatInfo->BoatInfo->SubElements; //Subelements
$attachmentsTbl = $boatInfo->BoatInfo->Attachments; //Attachments
$imagesTblCount = count($imagesTbl); //Count delle immagini
$videosTblCount = count($videosTbl); //Count dei video
$boatInfoPrintType1 = $config->BoatInfoSalePrintType1;
$boatInfoPrintText1 = $config->BoatInfoSalePrintText1;
$boatInfoPrintMultiLang1 = $config->BoatInfoSalePrintMultiLang1;
$boatInfoPrintType2 = $config->BoatInfoSalePrintType2;
$boatInfoPrintText2 = $config->BoatInfoSalePrintText2;
$boatInfoPrintMultiLang2 = $config->BoatInfoSalePrintMultiLang2;
//Titolo della pagina
$builder_model = getBoatDescription(getMainField("Builder"), getMainField("Model"));
$builder = trim(getMainField("Builder"));
$model = trim(getMainField("Model"));
$year = getMainField("YearBuilt");
if (strpos($model, $builder) === 0) {
$model = trim(substr($model, strlen($builder)));
}
$builder_model_year = $builder_model;
if (!isParamEmpty($year)) {
$builder_model_year .= " (" . $year . ")";
}
//Print link
$printUrl1 =
"http://app2.digibusiness.it/naviswebprint/print.aspx?" .
"group_id=" . ($config->BoatInfoPrintUseBoatIDGroup ? $mainTbl->IDGroup : $config->GroupID) . "&" .
"user_id=" . $config->BoatInfoPrintUserID . "&" .
"obj_id=" . $mainTbl->BoatID . "&" .
"obj_type=" . $mainTbl->BoatType . "&" .
"boat_code=" . $mainTbl->Code . "&" .
"print_type=" . $boatInfoPrintType1 . "&" .
"num_header=" . $config->BoatInfoPrintHeader . "&" .
"id_sede=" . $config->BoatInfoPrintSede . "&" .
"download=" . $config->BoatInfoPrintDownload . "&" .
"culture=";
$printUrl2 =
"http://app2.digibusiness.it/naviswebprint/print.aspx?" .
"group_id=" . ($config->BoatInfoPrintUseBoatIDGroup ? $mainTbl->IDGroup : $config->GroupID) . "&" .
"user_id=" . $config->BoatInfoPrintUserID . "&" .
"obj_id=" . $mainTbl->BoatID . "&" .
"obj_type=" . $mainTbl->BoatType . "&" .
"boat_code=" . $mainTbl->Code . "&" .
"print_type=" . $boatInfoPrintType2 . "&" .
"num_header=" . $config->BoatInfoPrintHeader . "&" .
"id_sede=" . $config->BoatInfoPrintSede . "&" .
"download=" . $config->BoatInfoPrintDownload . "&" .
"culture=";
//Componenti
global $componentsTblCategs;
global $componentsTblTypesCount;
global $componentsTblTypesNames;
//$componentsTblCategs[0..3] -> elenco di tutti i componenti presenti nella categoria
$componentsTblCategs = array(
array(), //ComponentsCategs[0] -> elemento che non può avere posti letto
array(), //ComponentsCategs[1] -> elemento che può avere posti letto
array(), //ComponentsCategs[2] -> vela
array(), //ComponentsCategs[3] -> albero
);
$componentsTblTypesCount = array(); //$componentsTblTypesCount[id_component] -> conteggio componenti
$componentsTblTypesNames = array(); //$componentsTblTypesNames[id_component] -> nome componente
foreach($componentsTbl as $component) {
//id del tipo di componente
$el_type = (int)$component->ElementType;
$el_categ = (int)$component->Category;
//Salvo il conteggio dei componenti
$value = array_key_exists($el_type, $componentsTblTypesCount) ? (int)$componentsTblTypesCount[$el_type] : 0;
$value += 1;
$componentsTblTypesCount[$el_type] = $value;
//suddivido per categorie
if (!in_array($el_type, $componentsTblCategs[$el_categ])) {
array_push($componentsTblCategs[$el_categ], $el_type);
}
//Salvo il nome
if (!array_key_exists($el_type, $componentsTblTypesNames)) {
$componentsTblTypesNames[$el_type] = $component->Text;
}
}
sort($componentsTblCategs[0]);
sort($componentsTblCategs[1]);
sort($componentsTblCategs[2]);
sort($componentsTblCategs[3]);
$componentsCabins = array_merge($componentsTblCategs[1], $componentsTblCategs[0]);
$componentsSails = array_merge($componentsTblCategs[3], $componentsTblCategs[2]);
//Livelli
$levelsTblGuids = array();
//salvo una lista di id dei livelli
foreach ($levelsTbl as $level) {
array_push($levelsTblGuids, (string)$level->ID);
}
// Array titoli sezione ACCESSORI
$accessoriesTblTitles = array (
1 => __("Eletronic tools for navigation", "navis-wp", "navis-wp"),
2 => __("Staging and technical", "navis-wp"),
3 => __("Domestic facilities onboard", "navis-wp"),
4 => __("Security equipment", "navis-wp"),
5 => __("Entertainment", "navis-wp"),
6 => __("Sails accessories", "navis-wp"),
7 => __("Fishing accessories", "navis-wp"),
8 => __("Kitchen and appliances", "navis-wp"),
9 => __("Upholstery", "navis-wp"),
);
/////////////////////////////////
// GET ENGINES FAMILIES
$path = ini_get("soap.wsdl_cache_dir")."/GetEnginesFamilies.itIT.cache.xml";
$cache_time = 24 * 60 * 60; //1 giorno di cache
global $enginesTblFamilies;
if (file_exists($path) && ((time() - filemtime($path)) < $cache_time)) {
//prendo il file dalla cache
$enginesTblFamilies = simplexml_load_file($path);
}
else {
//chiamo il webservice e salvo il file
$enginesTblFamilies = $client->GetEnginesFamiliesString(array("culture" => $config->CultureWS));
$enginesTblFamilies = new SimpleXMLElement($enginesTblFamilies->GetEnginesFamiliesStringResult);
$enginesTblFamilies->asXML($path);
}
// FINE GET ENGINES FAMILIES
/// differenza field tra charter e usato
//MODIFICA SHARING
if (get("sharing") == "1") {
$PriceFormatted= "RequestedAssignmentPriceFormatted";
$PriceVAT="";
}
else {
if ($mainTbl->Sale == "true") {
// usato
$PriceFormatted="SellPriceFormatted";
$PriceVAT="SellPriceVAT";
$ReducedPrice="OldSellPriceFormatted";
$SellPriceReduced="SellPriceReduced";
}
else {
// charter
$PriceFormatted="CharterPriceFormatted";
$PriceVAT="CharterPriceVAT";
}
}
// FUNZIONI //
function generateTableRow($field, $label, $unit = "", $content_bold = false, $td_style = "") {
return (generateTableRowFromValue(getMainField($field), $field, $label, $unit, $content_bold, $td_style));
}
function generateTableRowFromValue($value, $field, $label, $unit = "", $content_bold = false, $td_style = "") {
if (!isParamEmpty($value)) {
if ($unit != "") {
$value = normalizeNum($value) . " " . $unit;
}
return (
"
" . $label . "
" . $value . "
"
);
}
return ("");
}
function generateBlock($field, $label, $unit = "", $content_bold = false, $td_style = "") {
return (generateBlockFromValue(getMainField($field), $field, $label, $unit, $content_bold, $td_style));
}
function generateBlockFromValue($value, $field, $label, $unit = "", $content_bold = false, $td_style = "") {
if (!isParamEmpty($value)) {
if ($unit != "") {
$value = normalizeNum($value) . " " . $unit;
}
return (
"
"
);
}
return ("");
}
function generateBlockHabitability($field, $label, $unit = "", $content_bold = false, $td_style = "") {
return (generateBlockHabitabilityFromValue(getMainField($field), $field, $label, $unit, $content_bold, $td_style));
}
function generateBlockHabitabilityFromValue($value, $field, $label, $unit = "", $content_bold = false, $td_style = "") {
if (!isParamEmpty($value)) {
if ($unit != "") {
$value = normalizeNum($value) . " " . $unit;
}
return (
"
"
);
}
return ("");
}
function generateMaterialDiv($level, $component) {
//
ElementType . ".gif\" alt=\"\" width=\"64\" />
$content = (!isParamEmpty($component->Text) ? $component->Text : $level->Text) . "
"; if (!isParamEmpty($component->Material)) { $content .= $component->Material; if (!isParamEmpty($component->Colour)) { $content .= " (" . $component->Colour . ")"; } } else if (!isParamEmpty($component->Colour)) { $content .= $component->Colour; } return ( //"
";
return ($table);
}
function getEngineFamilyFromId($id) {
global $enginesTblFamilies;
$elements = $enginesTblFamilies->children();
foreach ($elements as $item) {
if ($item->ID == $id) {
return ($item->Text);
}
}
return ("ND");
}
function getAccessories($id_type) {
global $accessoriesTbl;
$accs = "";
foreach ($accessoriesTbl as $acc) {
if ($acc->Type == $id_type) {
if ($accs !== "") {
$accs .= ", ";
}
if ($acc->Qty > 1) {
$accs .= $acc->Qty . " x ";
}
$accs .= $acc->Text;
if (!isParamEmpty($acc->Comment)) {
$accs .= " (" . $acc->Comment . ")";
}
}
}
if (!isParamEmpty($accs)) {
$accs .= ".";
}
return ($accs);
}
function getAccessoriesUL($id_type, $class = "") {
global $accessoriesTbl;
$accs = "";
foreach ($accessoriesTbl as $acc) {
if ($acc->Type == $id_type) {
$accs .= "";
if ($acc->Qty > 1) {
$accs .= $acc->Qty . " x ";
}
$accs .= $acc->Text;
if (!isParamEmpty($acc->Comment)) {
$accs .= " (" . $acc->Comment . ")";
}
$accs .= " ";
}
}
if (!isParamEmpty($accs)) {
$accs = "
" . $label ."
". $value . "
" . $label ."
". $value . "
"; if (!isParamEmpty($component->Material)) { $content .= $component->Material; if (!isParamEmpty($component->Colour)) { $content .= " (" . $component->Colour . ")"; } } else if (!isParamEmpty($component->Colour)) { $content .= $component->Colour; } return ( //"
//
//
//
"
"" . $content . " | //
" . $content . "
"
);
}
function generateComponentsTable($types_array) {
global $componentsTblTypesCount;
global $componentsTblTypesNames;
$types_array_count = count($types_array);
if ($types_array_count == 0) return ("");
$table = "
| ";
if (($i % 2 == 1) && (($i + 1) < $types_array_count)) {
$table .= "||
- " . $accs . "
";
$html .= "
";
?>
";
$html .= "
";
$html .= "";
$html .= "
';
}
$html .= "
";
$html .= "";
$html .= "
";
if ($imagesTblCount > 1) {
//CAROUSEL
$html .= "";
$html .= "
";
$html .= "";
if ($videosTblCount > 0) {
$html .= "
";
$html .= "";
$html .= "";
$html .= "
";
}
else if ($imagesTblCount > 0) {
$html .= "";
$html .= " ";
$html .= " ImageUrl) .".2048.jpg\">";
$html .= "
ImageUrl) .".512.jpg\" itemprop=\"image\" />";
$html .= " ";
$html .= " ";
$html .= "
";
}
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . $builder_model_year . "
"; $html .= "(" . __("Code", "navis-wp") . " " . getMainField("Code") . ")"; $html .= "
";
$html .= ""; $html .= "(" . __("Code", "navis-wp") . " " . getMainField("Code") . ")"; $html .= "
";
if (getMainField("Sold") == "true") {
$html .= "" . getMainField("OldSellPriceFormatted") . "";
}
}
$html .= "
";
$html .= "" . __("Sold", "navis-wp") . "
";
}
else if (getMainField("PendingSale") == "true") {
$html .= "" . __("Pending sale", "navis-wp") . "
";
}
else {
$html .= "";
if (getMainField("ReservedPrice") == "true") {
$html .= __("Reserved price", "navis-wp");
} else {
$html .= getMainField($PriceFormatted);
}
$html .= "
";
if (($config->BoatInfoShowReducedPrice) && (getMainField("SellPriceReduced") == "true")) {
$html .= "";
//tel
if (($config->VisiblePhoneButton == true) && ($config->PBrokerPhoneNumber != null)) {
$html .= "
";
$html .= "" . __("Phone", "navis-wp") . ": " . $config->PBrokerPhoneNumber . "
"; } $html .= "";
if (!$config->BoatInfoRequestInfoJS) {
$html .= "GroupEmail . "?subject=Richiesta informazioni su " . $builder_model . " (" . $mainTbl->Code . ")" . "\">" . __("Request info", "navis-wp") . "";
} else {
$html .= "" . __("Request info", "navis-wp") . "";
}
$html .= "
";
$html .= "";
$html .= "Culture . "\" target=\"_blank\">" . $boatInfoPrintText1 . "";
$html .= "
";
$html .= "";
$html .= "Culture . "\" target=\"_blank\">" . $boatInfoPrintText2 . "";
$html .= "
";
$html .= "";
$html .= "" . __("Back", "navis-wp") . "";
$html .= "
";
$html .= "";
$html .= "
";
}
//Telefono
if (($config->VisiblePhoneButton == true) && ($config->PBrokerPhoneNumber != null)) {
$html .= " ";
$html .= "";
$html .= "PBrokerPhoneNumber . "\" class=\"btn btn-default\">";
$html .= "Chiama " . $config->CustomerName . "";
$html .= "";
$html .= "
";
}
$html .= "";
$html .= "
";
if (!isParamEmpty($enginesTbl)) {
$html .= "";
$html .= "
" : ""), "Vintage", "" . __("Vintage", "navis-wp") . "");
$html .= generateBlock("Condition", __("Condition", "navis-wp"));
$html .= generateBlock("Length", __("Length", "navis-wp"), "Mt");
$html .= generateBlock("LengthOv", __("Overall Length", "navis-wp"), "Mt");
$html .= generateBlock("LengthWa", __("Length (waterline)", "navis-wp"), "Mt");
$html .= generateBlock("Beam", __("Beam", "navis-wp"), "Mt");
$html .= generateBlock("Draft", __("Draft", "navis-wp"), "Mt");
$html .= generateBlock("Displacement", __("Displacement", "navis-wp"), "Kg");
$html .= generateBlock("SellPriceAvailability", __("Availability", "navis-wp"));
$html .= (getMainField("ReservedPrice") == "true") ? "" : generateBlock($PriceVAT, __("VAT", "navis-wp"));
$html .= generateBlock("Designer", __("Designer", "navis-wp"));
$html .= generateBlock("Location", __("Zone", "navis-wp"));
$html .= generateBlock("MaxPeople", __("Max onboard people", "navis-wp"));
$html .= generateBlock("Compartments", __("Compartments", "navis-wp"));
$html .= generateBlock("Bags", __("Bags", "navis-wp"));
$html .= generateBlock("Consumption", __("Consumption", "navis-wp"));
$value = "";
if (getMainField("V12") == "true") $value .= "12V ";
if (getMainField("V24") == "true") $value .= " 24V ";
if (getMainField("V110") == "true") $value .= " 110V ";
if (getMainField("V220") == "true") $value .= " 220V ";
if (getMainField("V380") == "true") $value .= " 380V ";
$html .= generateBlockFromValue($value, "Impiantoel", __("Electrical installation", "navis-wp"));
$html .= generateBlock("HullShape", __("Hull shape", "navis-wp"));
$html .= generateBlock("Rudder", __("Rudder", "navis-wp"));
$html .= generateBlock("SpeedEngine", __("Engine speed", "navis-wp"), "Kt");
$html .= generateBlock("SpeedSail", __("Sail speed", "navis-wp"), "Kt");
$html .= generateBlock("SpeedCruise", __("Cruise speed", "navis-wp"), "Kt");
$html .= generateBlock("SpeedMax", __("Max speed", "navis-wp"), "Kt");
$html .= generateBlock("Fuel", __("Fuel tank", "navis-wp"), "Lt");
$html .= generateBlock("Water", __("Water tank", "navis-wp"), "Lt");
$html .= generateBlock("TubularSize", __("Tubular size", "navis-wp")) ;
$html .= generateBlock("RecommendedHP", __("Recommended power", "navis-wp"), "Hp");
$html .= generateBlock("MaxHP", __("Max power", "navis-wp"), "Hp");
$html .= generateBlock("Ballast", __("Ballast", "navis-wp"));
$html .= generateBlock("Keel", __("Keel", "navis-wp"));
$html .= generateBlock("HullColour", __("Hull colour", "navis-wp"));
$html .= "
";
$html .= "";
$html .= "" . __("Technical details", "navis-wp") ."";
$html .= "
";
$html .= generateBlock("Flag", __("Flag", "navis-wp"));
$html .= generateBlock("Omologation", __("Navigation category", "navis-wp"));
$html .= generateBlock("YearReg", __("First registration", "navis-wp"));
$html .= generateBlockFromValue(((getMainField("Vintage") == "true") ? "";
$html .= "
";
}
if (!isParamEmpty($generatorsTbl)) {
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . __("Engines", "navis-wp") . "";
$html .= "
";
foreach ($enginesTbl as $engine) {
$engine_text = htmlEncode($engine->Text, "-");
if (!isParamEmpty($engine->YearBuilt)) {
$engine_text .= " (" . $engine->YearBuilt . ")";
}
$engine_families;
$types = $engine->EngineTypes;
if (!isParamEmpty($types)) {
$types_explode = explode(",", $types);
$types_str = "";
$count = count($types_explode);
for ($t = 0; $t < $count; $t++) {
if ($types_str !== "") $types_str .= ", ";
$types_str .= getEngineFamilyFromId($types_explode[$t]);
}
$engine_families = htmlEncode($types_str, "-");
}
else {
$engine_families = "-";
}
$html .= "";
$html .= "" . $engine_text . "";
$html .= "
";
$html .= "";
$html .= "
";
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . __("Typologies", "navis-wp") . "";
$html .= "
";
$html .= "";
$html .= "" . $engine_families . "";
$html .= "
";
$html .= "";
$html .= "
";
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . __("Transmission", "navis-wp") . "";
$html .= "
";
$html .= "";
$html .= "" . htmlEncode($engine->Transmission, "-") . "";
$html .= "
";
$html .= "";
$html .= "
";
}
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . __("Hours", "navis-wp") . "";
$html .= "
";
$html .= "";
$html .= "" . normalizeNum($engine->Hours) . "";
$html .= "
";
$html .= "";
$html .= "
";
}
if (!isParamEmpty(getMainField("Notes"))) {
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . __("Generators", "navis-wp") . "";
$html .= "
";
foreach ($generatorsTbl as $generator) {
$qty = $generator->Qty;
$kw = trim(str_ireplace("kw", "", $generator->Kw));
$generator_text = "";
if (!isParamEmpty($qty) && !isParamEmpty($kw)) {
$generator_text = $qty . " x " . $kw . " Kw";
}
else if (!isParamEmpty($qty)) {
$generator_text = $qty;
}
else if (!isParamEmpty($kw)) {
$generator_text = $kw . " Kw";
}
$html .= "";
$html .= "" . htmlEncode($generator_text, "-") . "";
$html .= "
";
$html .= "";
$html .= "
";
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . __("Brand", "navis-wp") . "";
$html .= "
";
$html .= "";
$html .= "" . htmlEncode($generator->Brand, "-") . "";
$html .= "
";
$html .= "";
$html .= "
";
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . __("Model", "navis-wp") . "";
$html .= "
";
$html .= "";
$html .= "" . htmlEncode($generator->Model, "-") . "";
$html .= "
";
$html .= "";
$html .= "
";
}
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . __("Description", "navis-wp") . "";
$html .= "
";
$html .= "";
$html .= "" . htmlEncode($generator->Comment, "-") . "";
$html .= "
";
$html .= "";
$html .= "
";
}
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . __("Notes", "navis-wp") . "";
$html .= "
";
$html .= "";
$html .= "" . convertEndLineToBr(getMainField("Notes")) . "";
$html .= "
";
$html .= "";
$html .= "
";
$habitability_first_block =
generateBlockHabitability("Cabins", __("Number of cabins", "navis-wp"), "", true) .
generateBlockHabitability("Baths", __("Number of baths", "navis-wp"), "", true) .
generateBlockHabitability("CabinHeight", __("Cabin height", "navis-wp"), "cm", true);
$habitability_second_block =
generateBlockHabitability("AccommodationsCabins", __("Cabins beds", "navis-wp"), "", true) .
generateBlockHabitability("AccommodationsTotal",__("Total beds", "navis-wp"), "", true) .
generateBlockHabitability("AccommodationsCrew", __("Crew beds", "navis-wp"), "", true);
$components = generateComponentsTable($componentsCabins);
//$habitability = ($habitability_first_table_rows !== "" || $habitability_second_table_rows !== "" || $components !== "");
$materials = "";
foreach ($levelsTbl as $level) {
foreach ($subElementsTbl as $sub_element) {
if ((string)$level->ID == (string)$sub_element->ID) {
$materials .= generateMaterialDiv($level, $sub_element);
}
}
}
$sails = generateComponentsTable($componentsSails);
$sails_visibility = (getMainField("BoatType") == "V" && ((!isParamEmpty(getMainField("SailsArea"))) || ($sails != "")));
$materials_sails = (($materials != "") || $sails_visibility);
$attachments = false;
if ($attachmentsTbl->count() > 0) {
$attachments = true;
}
if (($habitability_first_block != "") || ($habitability_second_block != "")) {
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . __("Accessories", "navis-wp") . "";
$html .= "
";
for ($i = 1; $i <= 9; $i++) {
$accessories = getAccessories($i);
if (!isParamEmpty($accessories)) {
$html .= "";
$html .= "" . $accessoriesTblTitles[$i] . "
"; $html .= "" . $accessories . ""; $html .= "
";
}
}
$html .= ""; $html .= "" . $accessories . ""; $html .= "
";
$html .= "
";
}
if ($materials != "") {
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . __("Habitability", "navis-wp") . "";
$html .= "
";
$html .= "";
$html .= "
";
}
if ($components != "") {
$html .= "";
$html .= "
";
$html .= "";
$html .= $habitability_first_block;
$html .= "
";
$html .= "";
$html .= $habitability_second_block;
$html .= "
";
$html .= "";
$html .= "
";
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . __("Cabins typology", "navis-wp") . "";
$html .= "
";
$html .= $components;
$html .= "";
$html .= "
";
}
if ($sails_visibility) {
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . __("Materials", "navis-wp") . "";
$html .= "
";
$html .= "";
$html .= "
";
$html .= "";
$html .= $materials;
$html .= "
";
$html .= "";
$html .= "
";
}
if ($attachments) {
$attachments = "";
foreach ($attachmentsTbl as $attachment) {
$split = explode("/", $attachment->AttachmentUrl);
$split_len = count($split);
$href = "/wp-content/plugins/Digiboat/pack/download_attachment.php?boat_id=" . toLower($split[$split_len - 2]) . "&attachment_id=" . toLower(substr($split[$split_len - 1], 0, 36)) . "&group_id=" . toLower($split[$split_len - 3]) . "&label=" . urlencode($attachment->Text);
$attachments .= '
";
$html .= "
";
$html .= "";
$html .= "" . __("Sails", "navis-wp") . "";
$html .= "
";
$html .= $sails;
$html .= "";
$html .= "
";
}
//BOTTONI STAMPE
$html .= "";
$html .= "
";
$html .= "";
$html .= "" . __("Attachments", "navis-wp") . "";
$html .= "
";
$html .= writeMainTableRow($attachments ? $attachments : "Nessun allegato", "Allegati");
$html .= "";
$html .= "
";
$html .= "";
$html .= "
";
$html .= "";
if (!$config->BoatInfoRequestInfoJS) {
$html .= "GroupEmail . "?subject=Richiesta informazioni su " . $builder_model . " (" . $mainTbl->Code . ")" . "\" >" . __("Request info", "navis-wp") . "";
} else {
$html .= "" . __("Request info", "navis-wp") . "";
}
$html .= "
";
$html .= "";
$html .= "Culture. "\" target=\"_blank\">" . $boatInfoPrintText1 . "";
$html .= "
";
$html .= "";
$html .= "Culture . "\" target=\"_blank\">" . $boatInfoPrintText2 . "";
$html .= "
";
$html .= "";
$html .= "" . __("Back", "navis-wp") . "";
$html .= "
";
$html .= "