" . $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 .= "PBrokerPhoneNumberLink ."\">" . __("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 .= "PBrokerPhoneNumberLink . "\" class=\"btn btn-default\">";
$html .= "" . __("Phone", "navis-wp") . " " . $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/Navis/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 : __("No attachment", "navis-wp"), __("Attachments", "navis-wp"));
$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 .= "