query($sql); if ($myrow = $tour_cat1_data->fetch_array()) { do { $tour_cat1_name = $myrow["tour_cat1_name"]; $tour_cat1_description = $myrow["tour_cat1_description"]; $city_eng_text = $myrow["tour_cat1_city"]; } while ($myrow = $tour_cat1_data->fetch_array()); echo "\n";} $tour_cat1_name_upper = strtoupper($tour_cat1_name); // ************************* FIND CITY INFO $city_eng_text_underscore = strtolower(str_replace(" ","_",$city_eng_text)); $sql = "Select * From planetholiday_city WHERE city='$city_eng_text'"; $citydata = $mysqli->query($sql); if ($myrow = $citydata->fetch_array()) { do { $country=$myrow["country"]; $city_id=$myrow["city_id"]; $country_id=$myrow["country_id"]; $city_description=$myrow["city_description"]; $city_hotel_url=$myrow["city_hotel_url"]; $city_latitude=$myrow["city_latitude"]; $city_longitude=$myrow["city_longitude"]; $city_poi_id=$myrow["POI_ID"]; } while ($myrow = $citydata->fetch_array()); echo "\n"; } else { ; } $city_eng_text = ucwords(strtolower ($city_eng_text)); $city_eng_text_upper = strtoupper ($city_eng_text); // ************************* FIND CITY PICTURE **************** $sql = "Select * From poi WHERE POI_ID='$city_poi_id'"; $poi_data = $mysqli->query($sql); if ($myrow = $poi_data->fetch_array()) { do { $city_poi_photo_url=$myrow["POI_photo_url"]; } while ($myrow = $citydata->fetch_array()); echo "\n";} if (strlen($city_poi_photo_url) < 10) {$city_poi_photo_url = 'http://www.gojapango.com/japan_picture/albums/upload/tokyo/shinjuku_gyoen/thumb_shinjuku_gyoen_IMG_1935.jpg';} $city_poi_photo_url_normal = str_replace ("thumb","normal",$city_poi_photo_url); // ************************* FILE HEADER ******************************* echo (" $tour_cat1_name_upper - Go Japan Go
$tour_cat1_name_upper

$tour_cat1_name_upper

$tour_cat1_description

Book $tour_cat1_name with Confidence


$tour_cat1_name

$city_eng_text_upper TOURS BY TYPE

"); $sql = "SELECT viator_tour_cat1_name.tour_cat1_name, viator_tour_cat1_name.tour_cat1_city, viator_tour_cat1_name.tour_cat1_url, viator_tours_v2.ProductCode FROM viator_tours_v2 Inner Join viator_tour_cat1 ON viator_tour_cat1.ProductCode = viator_tours_v2.ProductCode Inner Join viator_tour_cat1_name ON viator_tour_cat1_name.tour_cat1_id = viator_tour_cat1.tour_cat1_id WHERE viator_tour_cat1_name.tour_cat1_city = '$city_eng_text' AND viator_tours_v2.ProductCode IS NOT NULL GROUP BY viator_tour_cat1_name.tour_cat1_id ORDER BY viator_tour_cat1_name.tour_cat1_id ASC"; $result = $mysqli->query($sql); if ($myrow = $result->fetch_array()) { do { $myrow["tour_cat1_url"]= "" . $myrow["tour_cat1_name"] . ""; printf("%s
", $myrow["tour_cat1_url"]); } while ($myrow = $result->fetch_array()); echo "\n"; } echo ("

$city_eng_text_upper GUIDE

$city_description
") ?>