query("SELECT * FROM item WHERE iID = '$_GET[id]' AND category = 0 AND type = 0 AND publish != 0"); $num = mysqli_num_rows($get_rows); if($num > 0) { $map_item = mysqli_fetch_row($get_rows); $id = $map_item[0]; if($l == 'en' && $map_item[26]) { $name = $map_item[26]; } else { $name = $map_item[1]; } $title = $name; $plaintitle = $name; $contenttitle = "

" . $name . "

"; $clat = $map_item[2]; $clong = $map_item[3]; $cat = $map_item[7]; $icon = $map_item[8]; $iconfile = $icons[$cat][$icon]; $difficulty = $map_item[10]; $printlink = ""; $explanation = ""; $track = ""; $trackdownload = ""; $text = ""; $content = ""; $picmodal = ""; if($map_item[4] != NULL) { $textno = mysqli_real_escape_string($db,$map_item[4]); } else { $textno = ""; } if($map_item[5] != NULL) { $texten = mysqli_real_escape_string($db,$map_item[5]); } else { $texten = ""; } if($map_item[6] != NULL) { $textde = mysqli_real_escape_string($db,$map_item[6]); } else { $textde = ""; } if($map_item[25] != NULL) { $service_img = ""; $item_services = explode(",",$map_item[25]); $servicescount = count($item_services); for ($i = 0; $i < $servicescount; $i++) { $serv = $item_services[$i]; $service_img .= "
  • " . $service_icons[$serv][
  • "; } $services = ""; } else { $services = ""; } // Track details if($map_item[7] == 0) { if($map_item[9] != NULL) { $track = $map_item[9]; $trackdownload = " " . $trackbtn[$l] . ""; } else { $track = ""; $trackdownload = ""; } if ($map_item[11] == 0) { $difficulty_icon = $hiking[$difficulty]['icon']; } if ($map_item[11] == 1) { $difficulty_icon = $bike_tour[$difficulty]['icon']; } $contenttitle = "

    " . $difficulty . " " . $name . "

    "; $title = "" . $name . " " . $name; $printlink = " " . $printbtn[$l] . ""; $explanation = ""; } $get_img = $db->query("SELECT * FROM images WHERE itemid = '$id' ORDER BY position"); $img_num = mysqli_num_rows($get_img); if ($img_num > 0) { $picmodal = ""; } if($map_item[11] != NULL) { $type = $map_item[11]; } else { $type = ""; } if($map_item[12] != NULL) { $terrain_txt = ""; $item_terrain = explode(",",$map_item[12]); $terraincount = count($item_terrain); for ($i = 0; $i < $terraincount; $i++) { $terr = $item_terrain[$i]; $terrain_txt[$i] = $terraintypes[$terr][$l]; } $terrain = "

    " . $terrhead[$l] . implode(",",$terrain_txt) . "

    "; } else { $terrain = ""; } // Contactinfo if($map_item[13] != NULL) { $tlf = " " . $map_item[13] . "
    "; } else { $tlf = ""; } if($map_item[14] != NULL) { $address = " " . $map_item[14] . "
    "; } else { $address = ""; } if($map_item[15] != NULL) { $email = " " . $map_item[15] . "
    "; } else { $email = ""; } if($map_item[16] != NULL) { $www = " "; } else { $www = ""; } if($map_item[17] != NULL) { $fb = " "; } else { $fb = ""; } if($map_item[18] != NULL) { $twitter = " "; } else { $twitter = ""; } if($map_item[19] != NULL) { $instagram = " "; } else { $instagram = ""; } if($map_item[20] != NULL) { $airbnb = " "; } else { $airbnb = ""; } if($map_item[24] != NULL) { $tripadvisor = " "; } else { $tripadvisor = ""; } if($map_item[21] != NULL) { $lastupdate = $map_item[21]; } else { $lastupdate = ""; } $alerts = ""; $get_alert_rows = $db->query("SELECT * FROM alert WHERE itemid = '$id' ORDER BY alertID"); while ($alert = mysqli_fetch_row($get_alert_rows)) { if ($l == "no") { $lang = 3; } else { $lang = 4; } $alerts .= "

    " . $alert[$lang] . "

    " . $alert[5] . "

    "; } // Language if ($l == "en") { $text = $texten; } elseif ($l == "de") { $text = $textde; } else { $text = $textno; } $content = "
    " . $contenttitle . $alerts . "

    " . $text . "

    " . $services . $terrain . "

    " . $address . $tlf . $email . "
    " . $www . $fb . $twitter . $instagram . $airbnb . $tripadvisor . "

    " . $picmodal . $printlink . $trackdownload . $explanation . "

    " . $lastupdate . "

    "; } else { header("Location: ../trail.php?lang=$l"); } } ?> <? echo $page_title; ?> 0) { ?>
    Kartdata: Statens Kartverk