From 456987679da50808c1b60265da3477d5436645b5 Mon Sep 17 00:00:00 2001 From: Woliul Hasan Date: Fri, 14 Jul 2023 17:55:01 +0600 Subject: [PATCH] Hotel Search and List update --- gypsy/hoteldetails.php | 620 +++-------------------- gypsy/hotels.php | 2 +- gypsy/{ => testpages}/flight_results.php | 0 gypsy/{ => testpages}/flightsr.php | 16 +- 4 files changed, 93 insertions(+), 545 deletions(-) rename gypsy/{ => testpages}/flight_results.php (100%) rename gypsy/{ => testpages}/flightsr.php (90%) diff --git a/gypsy/hoteldetails.php b/gypsy/hoteldetails.php index e925a7f..5140375 100644 --- a/gypsy/hoteldetails.php +++ b/gypsy/hoteldetails.php @@ -7,6 +7,62 @@ } /*$username = $_SESSION['user'];*/ +if (isset($_GET['destination'])) { + $hname = $_GET['destination']; + $destination = $_GET['destination']; + +} + + +// Simulated flight data array +$sqlht = "SELECT * FROM hotel WHERE name = '$hname'"; +$resultht = $conn->query($sqlht); + +// Check if the query was successful +if ($resultht) { + // Fetch the rows from the result set + while ($rowht = mysqli_fetch_assoc($resultht)) { + // Access the flight data using column names + $nameht = $rowht['name']; + $ratinght = $rowht['rating']; + $locationht = $rowht['location']; + $priceht = $rowht['price']; + $roomtype = $rowht['roomtype']; + $resroom = $rowht['reserve']; + $free = $rowht['free']; + } + + +} else { + // Handle the case when the query fails + echo "Error executing query: " . mysqli_error($conn); +} + + +// Simulated flight data array +$sqlhr = "SELECT * FROM hotelroom"; +$resulthr = $conn->query($sqlhr); +$count=0; +$namer = array(); +$size = array(); +$sleep = array(); +$bed = array(); +// Check if the query was successful +if ($resulthr) { + // Fetch the rows from the result set + while ($rowhr = mysqli_fetch_assoc($resulthr)) { + // Access the flight data using column names + $namer[$count] = $rowhr['name']; + $size[$count] = $rowhr['size']; + $sleep[$count] = $rowhr['sleep']; + $bed[$count] = $rowhr['bed']; + $count++; + } + +} else { + // Handle the case when the query fails + echo "Error executing query: " . mysqli_error($conn); +} include 'header.php'; include 'func.php'; include 'functions.php'; @@ -395,9 +451,9 @@
-

Long Beach Hotel

-

-

Cox's Bazar 21.3 km from center

+

+

+

21.3 km from center

@@ -422,8 +478,6 @@
- - @@ -438,13 +492,11 @@
4.5 + style="margin-top: 0.35rem;">
-

118 reviews

+

reviews

- -
Room Types
@@ -460,7 +512,6 @@
Room Features
  • Allergy-free room
  • -
  • Air conditioning
  • Flatscreen TV
  • Minibar
  • @@ -470,284 +521,28 @@
-
-
-
- - - - -
-
-
- -
-
Superior Twin Room
+ -

24 sq m

-

Sleeps 2

-

Free WiFi

-

2 Twin Beds

-
- - Non-refundable - + USD 0
-
- - + USD 0 -
-

Reserve now, pay later

25% off -
-
BDT 44,912 - USD 434 -
-

-

USD 417 total
- includes taxes & feesWe have 1 left -

- -

Price details - - Reserve -

-
-
- - -
- -
-
Junior Suite, 1 Bedroom -
- -

32 sq m

-

Sleeps 2

-

Free WiFi

-

2 Twin Beds

-
- - Non-refundable - + USD 0
-
- - + USD 0 -
-

Reserve now, pay later

25% off -
-
BDT 44,912 - USD 434 -
-

-

USD 417 total
- includes taxes & feesWe have 1 left -

- -

Price details - - Reserve -

-
-
-
- -
-
Luxury Suite, 1 Bedroom, Balcony, City View -
- -

65 sq m

-

Sleeps 4

-

Free WiFi

-

2 Twin Beds

-
- - Non-refundable - + USD 0
-
- - + USD 0 -
-

Reserve now, pay later

25% off -
-
BDT 44,912 - USD 434 -
-

-

USD 417 total
- includes taxes & feesWe have 1 left -

- -

Price details - - Reserve -

-
-
-
-
- -
-
Deluxe Twin Room, 2 Twin Beds
- -

27 sq m

-

Sleeps 2

-

Free WiFi

-

2 Twin Beds

-
- - Non-refundable - + USD 0
-
- - + USD 0 -
-

Reserve now, pay later

25% off -
-
BDT 44,912 - USD 434 -
-

-

USD 417 total
- includes taxes & feesWe have 2 left -

- -

Price details - - Reserve -

-
-
- -
- -
-
- -
-
Executive Twin Room
- -

29 sq m

-

Sleeps 2

-

Free WiFi

-

2 Twin Beds

-
- - Non-refundable - + USD 0
-
- - + USD 0 -
-

Reserve now, pay later

25% off -
-
BDT 44,912 - USD 434 -
-

-

USD 417 total
- includes taxes & feesWe have 3 left -

- -

Price details - - Reserve -

-
-
- - -
- -
-
1 Bedroom Suite
- -

45 sq m

-

Sleeps 2

-

Free WiFi

-

2 Twin Beds

-
- - Non-refundable - + USD 0
-
- - + USD 0 -
-

Reserve now, pay later

25% off -
-
BDT 44,912 - USD 434 -
-

-

USD 417 total
- includes taxes & feesWe have 3 left + Reserve +

- -

Price details - - Reserve -

-
- -
-
Superior Room
- -

24 sq m

-

Sleeps 2

-

Free WiFi

-

2 Twin Beds

-
- - Non-refundable - + USD 0
-
- - + USD 0 -
-

Reserve now, pay later

25% off -
-
BDT 44,912 - USD 434 -
-

-

USD 417 total
- includes taxes & feesWe have 3 left -

- -

Price details - Reserve -

-
-
+
+
diff --git a/gypsy/flight_results.php b/gypsy/testpages/flight_results.php similarity index 100% rename from gypsy/flight_results.php rename to gypsy/testpages/flight_results.php diff --git a/gypsy/flightsr.php b/gypsy/testpages/flightsr.php similarity index 90% rename from gypsy/flightsr.php rename to gypsy/testpages/flightsr.php index 469ee48..586849a 100644 --- a/gypsy/flightsr.php +++ b/gypsy/testpages/flightsr.php @@ -59,7 +59,7 @@

Search for Flights

Start planning your trip by searching for the best flight options.

-