$client_email = $client->email(); } else { $client = new Clients(); $client->setClientId($reservations->reservationClientId()); $client->extractor($client->getClientFromId()); $client_name = $client->clientFirstName() . " " . $client->clientLastName(); $client_email = $client->clientEmail(); } $hotels->setHotelId($reservations->reservationHotelId()); $hotels->extractor($hotels->getHotelFromId()); $date = date("Y-m-d"); // current date $new_date = strtotime(date("Y-m-d", strtotime($date)) . " +3 month"); $expire_date = date("Y-m-d", $new_date); $rooms->setRoomTypeId($reservations->reservationHotelRoomTypeId()); $rooms->extractor($rooms->getHotelRoomTypeFromId()); $hotel_name = $hotels->hotelName(); $room_type = $rooms->roomTypeName(); if ($reservations->reservationBedType() == "sgl") { $bed_type = "Single Bed"; } if ($reservations->reservationBedType() == "dbl") { $bed_type = "Double Bed"; } if ($reservations->reservationBedType() == "tpl") { $bed_type = "Tripple Bed"; } if ($reservations->reservationBedType() == "") { $bed_type = "Not Selected"; } if ($reservations->reservationMealType() == "bb") {
var num_rooms='" . $no_of_room . "'; </script> "); $hotel_room_type = new HotelRoomType(); $hotel = new Hotels(); $country = new country(); $hotel->setHotelId($hotels_id); $hotel->extractor($hotel->getHotelFromId()); $country->setCountryId($_SESSION['country_id']); $hotel_room_type->setRoomTypeId($room_type_id); $hotel_room_type->extractor($hotel_room_type->getHotelRoomTypeFromId()); if ($hotels_id != $hotel_room_type->roomTypeHotelId()) { echo "Error"; die(); } $villa_type_id = 5; ?> <!DOCTYPE html><!--[if lt IE 7]> <html dir="ltr" lang="en-US" class="ie6"> <![endif]--><!--[if IE 7]> <html dir="ltr" lang="en-US" class="ie7"> <![endif]--><!--[if IE 8]> <html dir="ltr" lang="en-US" class="ie8"> <![endif]--><!--[if gt IE 8]><!--> <html dir="ltr" lang="en-US" xmlns="http://www.w3.org/1999/html"> <!--<![endif]--> <head> <!--designing script-->
$roomData = $roomcontrol->getAvailableRoomCountForRoomForDate($value, $hotelRoomType->roomTypeId()); if (count($roomData) > 0) { if ($roomData[0]['available_rooms'] > 0) { array_push($roomsCount, $roomData[0]['available_rooms']); } else { array_push($roomsCount, 0); } } else { array_push($roomsCount, 0); } } if (count($roomsCount) > 0 && min($roomsCount) > 0) { $room_count_empty++; $roomType = new HotelRoomType(); $roomTypeData = $roomType->getHotelRoomTypeFromHotelRoomtypeId($hotelRoomType->roomTypeHotelId(), $hotelRoomType->roomTypeId()); $roomType->extractor($roomTypeData); ?> <!--INFO: Modal Popup --> <div class="basic-modal-content" id="basic-modal-content<?php echo $hotelRoomType->roomTypeId(); ?> "> <div class="content"> <div class="left-col"> <h4>Room Type: <?php echo $hotelRoomType->roomTypeName(); ?> </h4> <div class="left-col-upper"> <!-- Slider --><!-- Outer wrapper for presentation only, this can be anything you like -->
function loadHotelsWithOffers() { $from_date = date('Y-m-d'); $hotel_id = $_REQUEST['hotel_id']; $offers = new Offers(); $offerArr = $offers->loadOffersForHotel($from_date, $hotel_id); $offerContent = ""; $offerAvailable = false; if (count($offerArr) > 0) { $offerAvailable = true; $offerContent = "\n <div>\n <div class='group-set' style='width: 100%;'>\n <div class='front-offers'>"; foreach ($offerArr as $offer) { $offerContent = $offerContent . "\n <div class='offers'>\n <h4>"; $room = new HotelRoomType(); $room->setRoomTypeId($offer['room_type']); $room->extractor($room->getHotelRoomTypeFromId()); $offerContent = $offerContent . "Room: " . $room->roomTypeName() . " | " . $offer['title']; $room = null; $offerContent = $offerContent . "</h4>\n <div class='desc clearfix'>" . $offer['des'] . "</div>\n <div class='offer-image clearfix'>"; if ($offer['image'] != '' && file_exists(DOC_ROOT . 'uploads/special_offers/' . $offer['image'])) { $offerContent = $offerContent . "<img style='max-width: 100%; max-height: 100%;' src='" . HTTP_PATH . "uploads/special_offers/" . $offer['image'] . "' />"; } $offerContent = $offerContent . "</div>\n <div class='clearfix detail'>\n <ul class='offerFe'>\n <li>Offer type : "; if ($offer['dis_type'] == 0) { $offerContent = $offerContent . "Fixed Price"; } elseif ($offer['dis_type'] == 1) { $offerContent = $offerContent . "Percentage Discount"; } elseif ($offer['dis_type'] == 2) { $offerContent = $offerContent . "Free Nights"; } elseif ($offer['dis_type'] == 3) { $offerContent = $offerContent . "Custom"; } $offerContent = $offerContent . "</li>\n <li>"; if ($offer['date_validity'] == 'on') { $offerContent = $offerContent . "Only for "; } else { $offerContent = $offerContent . "For "; } $offerContent = $offerContent . "bookings between " . $offer['from_date'] . " & " . $offer['to_date'] . "</li>\n <li>Offer available for\n <ul>\n <li>Beds:"; $beds = Libs::get('bed_type'); foreach (array_filter(explode(':', $offer['bed_type'])) as $bed) { $offerContent = $offerContent . $beds[$bed] . "/ "; if ($offerContent != "") { $offerContent = $offerContent . $beds[$bed] . "/ "; } else { $offerContent = $offerContent . $beds[$bed]; } } $offerContent = $offerContent . "</li>\n <li>Meals:"; $meals = Libs::get('meal_type'); foreach (array_filter(explode(':', $offer['meal_type'])) as $meal) { $offerContent = $offerContent . $meals[$meal] . "/ "; } $offerContent = $offerContent . "</li>\n </ul>\n </li>\n </ul>\n </div>\n <div class='clearfix'></div>\n </div>"; } $offerContent = $offerContent . "</div>\n </div>\n </div>"; } else { $offerAvailable = false; } $offerArray = array("offerAvailable" => $offerAvailable, "offerContent" => $offerContent); echo json_encode($offerArray); }
function onlinePayment() { $reservation = new Reservations(); $reservation->setReservationClientId(Sessions::getClientId()); $reservation->setReservationHotelId(Sessions::getOnlinePaymentHotelId()); $reservation->setReservationHotelRoomTypeId(Sessions::getOnlinePaymentRoomTypeId()); $reservation->setReservationBedType(Sessions::getOnlinePaymentBedType()); $reservation->setReservationMealType(Sessions::getOnlinePaymentMealType()); $reservation->setReservationNoOfRoom(Sessions::getOnlinePaymentRoomCount()); $reservation->setReservationTotalPrice(Sessions::getOnlinePaymentRate()); //$reservation->setCurrencyType(Sessions::currSuffix()); $reservation->setCurrencyType(Sessions::getDisplayRatesIn()); $reservation->setReservationCheckInDate(Sessions::getOnlinePaymentCheckin()); $reservation->setReservationCheckOutDate(Sessions::getOnlinePaymentCheckout()); $reservation->setReservationOfferAvailable(Sessions::getOnlinePaymentOfferAvailable()); $reservation->setReservationOfferData(Sessions::getOnlinePaymentOfferData()); //$reservation_id = $reservation->newReservations(); if ($reservation->newReservations()) { $reservation_id = mysql_insert_id(); Sessions::setOnlinePaymentReservationId($reservation_id); $client_name = ""; $client_email = ""; $client_contact = ""; $client = new Clients(); $client->setClientId(Sessions::getClientId()); $client->extractor($client->getClientFromId()); $client_name = $client->clientFirstName() . ' ' . $client->clientLastName(); $client_email = $client->clientEmail(); $client_contact = $client->clientPhoneFixed(); $hotels_name = ""; $hotels = new Hotels(); $hotels->setHotelId(Sessions::getOnlinePaymentHotelId()); $hotels->extractor($hotels->getHotelFromId()); $hotels_name = $hotels->hotelName(); $hotel_room_type = ""; $room = new HotelRoomType(); $room->setRoomTypeId(Sessions::getOnlinePaymentRoomTypeId()); $room->extractor($room->getHotelRoomTypeFromId()); $hotel_room_type = $room->roomTypeName(); $bed_type = Sessions::getOnlinePaymentBedType(); $meal_type = Sessions::getOnlinePaymentMealType(); $room_count = Sessions::getOnlinePaymentRoomCount(); $room_rate = Sessions::getOnlinePaymentRate() . ' ' . Sessions::currSuffix(); $check_in = Sessions::getOnlinePaymentCheckin(); $check_out = Sessions::getOnlinePaymentCheckout(); $mail_tmp = '<table width="560" border="0" align="center"> <tr> <td width="173" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Reservation Id </td> <td width="377" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> :' . $reservation_id . ' </td> </tr> <tr> <td width="173" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Hotel </td> <td width="377" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> :' . $hotels_name . ' </td> </tr> <tr> <td width="173" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Customer’ Name </td> <td width="377" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> :' . $client_name . ' </td> </tr> <tr> <td width="173" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Customer’ E-mail </td> <td width="377" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> :' . $client_email . ' </td> </tr> <tr> <td width="173" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Customer’ Contact </td> <td width="377" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> :' . $client_contact . ' </td> </tr> <tr> <td style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Room Type </td> <td style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> :' . $hotel_room_type . ' </td> </tr> <tr> <td style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Bed Type</td> <td style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> :' . $bed_type . ' </td> </tr> <tr> <td height="26" valign="top" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Meal Type </td> <td valign="top" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px; height:auto !important; min-height:10px; height:auto;"> :' . $meal_type . ' </td> </tr> <tr> <td height="26" valign="top" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> No of Rooms </td> <td valign="top" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px; height:auto !important; min-height:10px; height:auto;"> :' . $room_count . ' </td> </tr> <tr> <td height="26" valign="top" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Total </td> <td valign="top" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px; height:auto !important; min-height:10px; height:auto;"> :' . $room_rate . ' </td> </tr> <tr> <td height="26" valign="top" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Check In </td> <td valign="top" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px; height:auto !important; min-height:10px; height:auto;"> :' . $check_in . ' </td> </tr> <tr> <td height="26" valign="top" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Check Out </td> <td valign="top" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px; height:auto !important; min-height:10px; height:auto;"> :' . $check_out . ' </td> </tr> </table>'; $subject = "Reservation Details Roomista.com"; $random_hash = md5(time()); $headers = ""; $headers .= "\r\nContent-Type:text/html; charset=iso-8859-1\n boundary=\"PHP-alt-" . $random_hash . "\""; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-Type:text/html; charset=iso-8859-1\n"; $headers .= "From:reservation@roomista.com \n"; $headers .= "Return-Path:{$client_email}\n"; //mail('*****@*****.**',$subject,$mail_tmp,$headers); //mail('*****@*****.**',$subject,$mail_tmp,$headers); mail('booking@roomista.com,info@roomista.com', $subject, $mail_tmp, $headers); Common::jsonSuccess("payment registered"); } else { Common::jsonError("Error"); } }
function viewTable($data, $count) { $hotel_room_type = new HotelRoomType(); $paginations = new Paginations(); $paginations->setLimit(10); $paginations->setPage($_REQUEST['page']); $paginations->setJSCallback("viewHotelRoomTypes"); $paginations->setTotalPages($count); $paginations->makePagination(); ?> <div class="mws-panel-header"> <span class="mws-i-24 i-table-1">View Hotel Room Type</span> </div> <div class="mws-panel-body"> <table cellpadding="0" cellspacing="0" border="0" class="mws-datatable-fn mws-table"> <colgroup> <col class="con0"/> <col class="con1"/> </colgroup> <thead> <tr> <th class="head1">Room Type Name</th> <th class="head0"> </th> <th class="head0"> </th> <th class="head1"> </th> </tr> </thead> <tbody> <?php if (count($data) > 0) { ?> <?php for ($i = 0; $i < count($data); $i++) { $hotel_room_type->extractor($data, $i); ?> <tr id="row_<?php echo $hotel_room_type->roomTypeId(); ?> "> <td class="con1"><?php echo $hotel_room_type->roomTypeName(); ?> </td> <td class="con0"><?php //echo $hotel_room_type->categorySeoName(); ?> </td> <td class="con0"><?php //echo $hotel_room_type->username(); ?> </td> <td class="center"><a onclick="loadGUIContent('hotelroomtype','edit','<?php echo $hotel_room_type->roomTypeId(); ?> ')">Edit</a> <a onclick="deleteHotelRoomType(<?php echo $hotel_room_type->roomTypeId(); ?> )" class="toggle">Delete</a></td> </tr> <?php } ?> <?php } ?> </tbody> </table> </div> <?php $paginations->drawPagination(); }