Ejemplo n.º 1
0
            <div class="clearfix"></div>
            <input type="hidden" id="paymenttype" value="2"/>
            <input class="form-button button3 bookbutton" type="button" id="paycard" disabled onClick="$('#paymenttype').val(2);$('#client').submit()" value="Pay with Credit Card"/>
            <?php if ($_SESSION['display_rate_in'] != "LKR") { ?>
                <input class="form-button button3 bookbutton" type="button" id="paypaypal" disabled onClick="$('#paymenttype').val(1);$('#client').submit()" value="Pay with Pay Pal"/>
            <?php } ?>
            <!--<input class="form-button" type="button" id="paylater" value="Pay Later" disabled onclick="$('#paymenttype').val(3);$('#client').submit();" style="margin-right: -2px;" />-->
            <span id="error_msg" style="color:#F00"></span>
        </form>
    </div>
</div>

<!-- //Paypal Form -->
<form id="payPalForm" name="payPalForm" action="<?php echo HTTP_PATH; ?>paypal/paypal_start.php" method="post" >
    <input type="hidden" name="amount" class="medium-input-logn" id="amount" style="width:150px;" autocomplete="off"/>
    <input type="hidden" name="item_number" id="item_number" value="<?php echo "{$no_of_room} - {$hotel_room_type->roomTypeName()} at {$hotel->hotelName()} for {$numDays} Days"; ?>">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="no_note" value="1">
    <input type="hidden" name="business" value="*****@*****.**">
    <input type="hidden" name="currency_code" value="<?php echo Sessions::getDisplayRatesIn(); ?>">
    <input type="hidden" name="return" value="<?php echo HTTP_PATH; ?>_controller?action=successPaymentReservation">
    <input type="hidden" name="custom" id="custom" value="">
    <input type="hidden" name="item_name" id="item_name" value="Roomista.com :: <?php echo "{$no_of_room} - {$hotel_room_type->roomTypeName()} at {$hotel->hotelName()} for {$numDays} Day(s)"; ?>" size="45">
</form>
<form id="paypal_payments" name="paypal_payments" style="display:none" action="../payments/paypal.php" method="post">
    <input type="text" id="total_amount1" name="total_amount1">
</form>
<!-- Paypal Form// -->
<!-- //IPG Form -->
<form id="ipg_payments" style="display:none">
    <input type="text" id="total_amount2" name="total_amount2" value="0">
Ejemplo n.º 2
0
    $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") {
    $meal_type = "Bed & Breakfast";
}
Ejemplo n.º 3
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 -->
                            <div class="banner-fade" id="banner-fade-<?php 
        echo $hotelRoomType->roomTypeId();
        ?>
">
                                <!-- start Basic Jquery Slider -->
                                <ul class="bjqs" id="bjqs-<?php 
        echo $hotelRoomType->roomTypeId();
        ?>
">
                                    <?php 
Ejemplo n.º 4
0
?>
                        </li>
                        <li><span>Email: </span><?php 
echo $bookingclient->email();
?>
</li>
                        <li><span>Contact: </span><?php 
echo $bookingclient->contactno();
?>
</li>
                        <li><span>Room: </span>
                            <?php 
$rooms = new HotelRoomType();
$rooms->setRoomTypeId($reservations->reservationHotelRoomTypeId());
$rooms->extractor($rooms->getHotelRoomTypeFromId());
echo $rooms->roomTypeName();
?>
</li>

                        <li><span>Check In: </span> <?php 
echo $reservations->reservationCheckInDate();
?>
</li>
                        <li><span>Check Out: </span><?php 
echo $reservations->reservationCheckOutDate();
?>
</li>
                        <li><span>Bed Type: </span> <?php 
//echo($reservations->reservationBedType());
?>
                            <?php 
Ejemplo n.º 5
0
 <div class="booking-side-wrapper">
     <div class="booking-side clearfix">
         <h4 class="title-style4">Your Reservation<span class="title-block"></span></h4>
         <ul>
             <li><span>Client Name: </span> <?php echo $bookingclient->name(); ?></li>
             <li>
                 <span>Address: </span>  <?php echo $bookingclient->address1() . "," . $bookingclient->address2(); ?>
             </li>
             <li><span>Email: </span><?php echo $bookingclient->email(); ?></li>
             <li><span>Contact: </span><?php echo $bookingclient->contactno(); ?></li>
             <li><span>Room: </span>
                 <?php
                     $rooms = new HotelRoomType();
                     $rooms->setRoomTypeId($reservations->reservationHotelRoomTypeId());
                     $rooms->extractor($rooms->getHotelRoomTypeFromId());
                     echo($rooms->roomTypeName()); ?></li>
             <li>
                 <span>Check In: </span> <?php echo(str_replace("00:00:00", "", $reservations->reservationCheckInDate())); ?>
             </li>
             <li>
                 <span>Check Out: </span><?php echo(str_replace("00:00:00", "", $reservations->reservationCheckOutDate())); ?>
             </li>
             <li><span>Bed Type: </span> <?php //echo($reservations->reservationBedType()); ?>
                 <?php  if ($reservations->reservationBedType() == "sgl") {
                     echo "Single Bed";
                 }
                     if ($reservations->reservationBedType() == "dbl") {
                         echo "Double Bed";
                     }
                     if ($reservations->reservationBedType() == "tpl") {
                         echo "Tripple Bed";
Ejemplo n.º 6
0
 $roomType = new HotelRoomType();
 $roomTypeData = $roomType->getHotelRoomTypeFromHotelRoomtypeId($hotelRoomType->roomTypeHotelId(), $hotelRoomType->roomTypeId());
 $roomType->extractor($roomTypeData);
 ?>
 <script type="text/javascript">
     $(document).ready(function(e) {
         ///var room_type_id = $("#room_type_id").val();
         //getRoomRateOnBookings(<?php echo $hotelRoomType->roomTypeId();?>);
         //getAvailableBeds(<?php echo $hotelRoomType->roomTypeId();?>);
     });
 </script>
 <!--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 -->
                 <div class="banner-fade" id="banner-fade-<?php echo $hotelRoomType->roomTypeId(); ?>">
                     <!-- start Basic Jquery Slider -->
                     <ul class="bjqs" id="bjqs-<?php echo $hotelRoomType->roomTypeId(); ?>">
                         <?php if ($hotelRoomType->roomTypeImg() != "") { ?>
                             <li><img title = "" src = '<?php echo HTTP_PATH; ?>uploads/room/<?php echo $hotelRoomType->roomTypeImg(); ?>' /></li>
                         <?php }
                             print("
                                 <script type='text/javascript'>
                                     loadRoomImagesForSlider('" . $hotelRoomType->roomTypeId() . "','bjqs-" . $hotelRoomType->roomTypeId() . "');
                                 </script>
                             "); ?>
                     </ul>
Ejemplo n.º 7
0
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);
}
Ejemplo n.º 8
0
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&rsquo; 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&rsquo; 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&rsquo; 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");
    }
}
Ejemplo n.º 9
0
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">&nbsp;</th>
                    <th class="head0">&nbsp;</th>
                    <th class="head1">&nbsp;</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();
}