include "db.php"; function viewStarRating($star) { $rating = array("","1 star","2 stars","3 stars","4 stars","5 stars","Airport Hotel","Category: Apartment"); return $rating[$star]; } $regdate = date('d M Y'); if (!mysql_connect ($host, $usr, $pwd)) {echo "WARNING! Data Base connection error."; exit;} mysql_select_db($db_name); $path = preg_split ("/[\/]+/", $PHP_SELF); $filename = $path[count($path) -1]; $result = mysql_query("SELECT * FROM london WHERE filename = '$filename'"); while ($row = mysql_fetch_array($result)) { $title = $row[2]; $keywords = $row[3]; $hotelname = $row[4]; $starRating = $row[5]; $description = $row[6]; $mainPhoto = $row[7]; $photos = $row[8]; $address = $row[9]; $dphoto = $row[10]; $price = $row[11]; $link1_adr =$row[13]; $link1_descr =$row[14]; $link2_adr =$row[15]; $link2_descr =$row[16]; $nearest =$row[17]; $compare =$row[18]; $district =$row[20]; } ?>
|
if (!empty($hotelname)) {
echo " "; list($width, $height, $imgtype, $attr) = getimagesize("hotels/$mainPhoto"); if ($width > 250) { $prop = $width / 250; $width = round($width / $prop); $height = round($height / $prop); } echo " "; $images = preg_split("/[\s]/", trim($photos)); $descriptions = preg_split("/[\*]/", trim($dphoto)); for ($i = 0; $i < count($images); $i++) { list($realwidth, $realheight, $imgtype, $attr) = getimagesize("hotels/$images[$i]"); if ($width > 70) { $prop = $realwidth / 70; $width = round($realwidth / $prop); $height = round($realheight / $prop); } echo " Address: ".$address." "; echo " District: ".$district." "; echo "Neighbouring attractions: ".$nearest.""; } ?> More hotels: "> echo "$link1_descr"; ?> "> echo "$link2_descr"; ?> |
echo $hotelname; ?>, echo viewStarRating($starRating); ?>
Rates $hotelname Impressions \n"; } else { $dest1 = "impressions/" .$filename1; if (!copy("impressions/impr_templet.php", "impressions/$filename1")) {print ("Error! File wasn't created!... \n");} echo " $hotelname Impressions \n"; } echo ""; if ($price <> "") { echo " \n"; include "prices/$price"; } // echo " Compare prices for this resort with other sites: "; // $compare = preg_split("/[\*]/", trim($compare)); // for ($i = 0; $i < count($compare) - 1; ) { // echo ""; // ++$i; // echo "Accommodation in London $i ";} ?> Select a hotel category View popular resorts |