function viewTable($data, $count) { $maincity = new MainCity(); $paginations = new Paginations(); $paginations->setLimit(10); $paginations->setPage($_REQUEST['page']); $paginations->setJSCallback("viewMainCitys"); $paginations->setTotalPages($count); $paginations->makePagination(); ?> <div class="mws-panel-header"> <span class="mws-i-24 i-table-1">View Main City</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">Main City Name</th> <th class="head0">Main City SEO</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++) { $maincity->extractor($data, $i); ?> <tr id="row_<?php echo $maincity->mainCityId(); ?> "> <td class="con1"><?php echo $maincity->mainCityName(); ?> </td> <td class="con0"><?php echo $maincity->mainCitySeo(); ?> </td> <td class="con0"><?php //echo $admins->username(); ?> </td> <td class="center"><a onclick="loadGUIContent('maincity','edit','<?php echo $maincity->mainCityId(); ?> ')">Edit</a> <a onclick="deleteMainCity(<?php echo $maincity->mainCityId(); ?> )" class="toggle">Delete</a> </td> </tr> <?php } ?> <?php } ?> </tbody> </table> <?php $paginations->drawPagination(); }
<?php $category = new Category(); $accTypes = $category->all(); $mainCity = new MainCity(); $mCities = $mainCity->all(); $subCity = new SubCity(); $sCities = $subCity->all(); $hotelFeatureType = new HotelFeatureType(); $hFTypes = $hotelFeatureType->all(); $roomType = new RoomType(); $rTypes = $roomType->all(); $roomFeature = new RoomFeature(); $rFeatures = $roomFeature->all(); if(!isset($_SESSION['step_01_completed']) || $_SESSION['step_01_completed'] != true){ die(header('Location: ' . DOMAIN . 'dashboard/add-hotel/step-01')); } if(isset($_SESSION['hotel_step_error']) && (strlen($_SESSION['hotel_step_error']) > 0)){ ?> <div><?php echo $_SESSION['hotel_step_error']; $_SESSION['hotel_step_error'] = ''; ?></div> <?php } ?> <form action="<?php echo HTTP; ?>dashboard/get_step_02.php" method="post"> <input type="hidden" value="83620581b63ecf30c23cd5f97cc84939" name="csrf"/> <fieldset> <legend>Hotel Registration/Property-details</legend> <h3 class="h3">Hotel facilities</h3> <div class="row"> <div class="col-xs-12"> <h4>Hotel Facilities<span class="text-danger">*</span></h4>
<?php define('_MEXEC', 'OK'); require_once($_SERVER['DOCUMENT_ROOT'] . "/config/app.php"); if(!isset($_GET['type']) && (strlen($_GET['type']) < 1)){ die(header('Location: ' . DOMAIN . '404')); } $_SESSION['page_url'] = ($_GET['page_url']) ? DOMAIN . $_GET['page_url'] : DOMAIN; $_SESSION['eagerLoad'] = 30; $type = urldecode($_GET['type']); $urlType = strtolower($type); $type = explode('-', $type); $type = implode(' ', $type); $category = new Category(); $mainCity = new MainCity(); $subCity = new SubCity(); $hotel = new Hotel(); $hotelImage = new HotelImage(); if((!isset($_GET['mainCity']) || strlen($_GET['mainCity']) < 1) && (!isset($_GET['subCity']) || strlen($_GET['subCity']) < 1)){ //by category $inCity = false; $hotelsList = $category->where('categories.seo_name', '=', $type) ->join('category_hotel', 'categories.id', '=', 'category_hotel.category_id') ->join('hotels', 'category_hotel.hotel_id', '=', 'hotels.id') ->orderBy('hotels.id', 'DESC') ->skip(0) ->take(30) ->get(); $hotelsListCount = $category->where('categories.seo_name', '=', $type)
<?php $mainCity = new MainCity(); $mainCityList = $mainCity->all(); ?> <div class="befor-footer_3"> <div class="container"> <div class="footer-inner col-xs-12 no-padding"> <div class="news_letters"> <h2>Subscribe Now & Get Exclusive Hotel Deals from roomista</h2> <div class="col-xs-12 no-padding" id="subscribe_div"> <?php if(isset($_SESSION['']) && (strlen($_SESSION['']) > 1)){ ?> <div class="alert alert-success"><?php echo $_SESSION['']; ?></div> <?php } ?> <form action="<?php echo DOMAIN; ?>assets/subscribers" method="post"> <input type="hidden" name="csrf" value="2f2f6673aab0fa90d9992a67801046cf"> <div class="form-group col-xs-12 col-sm-4 no-padding"> <input class="form-control" id="subscribe_email" name="subscribe_email" placeholder="E-Mail" type="email"/> </div> <button class="btn btn-default" id="subscribe" name="subscribe" type="submit">Subscribe</button> <span class="alert alert-danger hidden" id="subcrbchk">Please enter the valid email address</span> </form> </div> </div> </div> <div class="footer-inner col-xs-12 no-padding"> <h2>Hotels by Top City</h2> <ul class="hotel_list col col-xs-12 n-padding"> <?php foreach($mainCityList as $mainCityItem){ ?> <li class="col-xs-12 col-lg-2 col-md-3 col-sm-4"> <a href="<?php echo HTTP_PATH; ?>sri-lanka/hotels-in-<?php echo implode("-", explode(" ", strtolower($mainCityItem->name))); ?>">Hotels in <?php echo $mainCityItem->name; ?></a> </li>
<?php define('_MEXEC', 'OK'); require_once "../../../system/load.php"; include "../pgconfig.php"; $mainCity = new MainCity(); $SubCity = new SubCity(); $hotels = new Hotels(); $session = new Sessions(); $reservations = new Reservations(); $mainCity_row = $mainCity->getMainCityFromHomePage(); $mainCity_list = $mainCity->getMainCity(); $hotels_row = $hotels->getHotelFromFeaturedStatus(); $hotelsRecently_row = $hotels->getHotelRecentlyAdd(); /*$transactionTypeCode=$_REQUEST["transaction_type_code"]; $installments=$_REQUEST["installments"]; $transactionId=$_REQUEST["transaction_id"]; $amount=$_REQUEST["amount"]; $exponent=$_REQUEST["exponent"]; $currencyCode=$_REQUEST["currency_code"];*/ $merchantReferenceNo = $session->getMerchantReferenceNo(); /*$status=$_REQUEST["status"]; $eci=$_REQUEST["3ds_eci"]; $pgErrorCode=$_REQUEST["pg_error_code"]; $pgErrorDetail=$_REQUEST["pg_error_detail"]; $pgErrorMsg=$_REQUEST["pg_error_msg"]; $messageHash=$_REQUEST["message_hash"];
<?php define('_MEXEC', 'OK'); require_once "../../system/load.php"; $Hotels = new Hotels(); $MainCity = new MainCity(); $queryString = $_REQUEST['queryString']; $queryString = str_replace("'", '’', $queryString); $HotelsQuick_rows = $Hotels->quickSearchHotels($queryString); $MainCityQuick_rows = $MainCity->quickSearchMainCity($queryString); echo '<div class="searchtitle">Hotels</div>'; if (count($HotelsQuick_rows) > 0) { for ($y = 0; $y < count($HotelsQuick_rows); $y++) { $Hotels->extractor($HotelsQuick_rows, $y); $MainCity->extractor($HotelsQuick_rows, $y); if ($Hotels->hotelsImages() != '') { $temp_arr = array(); $temp_arr = explode(",", $Hotels->hotelsImages()); $img_path = $temp_arr[0]; } else { $img_path = "no-image.png"; } echo '<a onClick="fill(\'' . trim($Hotels->hotelName()) . '\',\'' . trim($Hotels->hotelSeoUrl()) . '\',\'1\');"><div class="display_box">'; //echo '<img src="uploads/hotels/'.$img_path.'" alt="" />'; echo $Hotels->hotelName() . '</div></a>'; } } else { //echo 'Hotels Not Found :('; } if (count($MainCityQuick_rows) > 0) { echo '<div class="searchtitle">Citys</div>';
<?php define('_MEXEC', 'OK'); require_once($_SERVER['DOCUMENT_ROOT'] . "/config/app.php"); if(!isset($_GET['mainCity']) && (strlen($_GET['mainCity']) < 1)){ die(header('Location: ' . DOMAIN . '404')); } $_SESSION['page_url'] = ($_GET['page_url']) ? DOMAIN . $_GET['page_url'] : DOMAIN; $_SESSION['eagerLoad'] = 30; $mainCity = new MainCity(); $subCity = new SubCity(); $hotel = new Hotel(); $hotelImage = new HotelImage(); $mPlace = urldecode($_GET['mainCity']); $mPlace = str_replace('-', ' ', $mPlace); $title = ucwords($mPlace); $bCrumb = ucwords($mPlace); $subCityList = $mainCity->where('main_cities.name', '=', $mPlace) ->join('hotels', 'main_cities.id', '=', 'hotels.main_city_id') ->join('sub_cities', 'hotels.sub_city_id', '=', 'sub_cities.id') ->orderBy('sub_cities.name', 'ASC') ->groupBy('sub_cities.name') ->select('sub_cities.name', 'sub_cities.seo', 'sub_cities.id') ->get(); if(!isset($_GET['subCity']) || (strlen($_GET['subCity']) < 1)){ //by main city $hotelsList = $mainCity->where('main_cities.name', '=', $mPlace) ->join('hotels', 'main_cities.id', '=', 'hotels.main_city_id') ->orderBy('hotels.id', 'DESC') ->skip(0)
function viewTableSpecialOfferHotels($data, $count) { $paginations = new Paginations(); $paginations->setLimit(10); $paginations->setPage($_REQUEST['page']); $paginations->setJSCallback("viewSpecialOfferHotelsFront"); $paginations->setTotalPages($count); $paginations->makePagination(); $mainCity = new MainCity(); $hotels = new Hotels(); $country = new country(); $SubCity = new SubCity(); $hotelimages = new HotelImages(); $discount = new HotelRoomRates(); ?> <div class="after-mid"> <div class="accordian-cont"> <ul id="ulHotelList" class="hotelList"> <?php for ($x = 0; $x < count($data); $x++) { $hotels->extractor($data, $x); $discount->setHotelId($hotels->hotelId()); $discount_data = $discount->getRatesFromHotelId(); $discount->extractor($discount_data); $rateAvailable = $hotels->getLowestRate(); if ($rateAvailable['RateAvailable'] == true) { $new_hotel = new Hotels(); $new_hotel->setHotelId($hotels->hotelId()); $new_hotel_data = $new_hotel->getHotelFromId(); $new_hotel->extractor($new_hotel_data); $hotelimages->setImageHotelId($new_hotel->hotelId()); $hotelimages->extractor($hotelimages->getImageFromHotelsIdOne()); $mainCity_discount = new MainCity(); $mainCity_discount->setMainCityId($new_hotel->hotelMainCityId()); $mainCity_discount->extractor($mainCity_discount->getMainCityFromId()); $filename = DOC_ROOT . 'uploads/hotels/thumbnails/' . $hotelimages->imageName(); ?> <li> <a href="<?php echo HTTP_PATH; echo $new_hotel->hotelSeoUrl(); ?> .html"> <?php if (file_exists($filename) && $hotelimages->imageName() != "") { ?> <img src="<?php echo HTTP_PATH . 'uploads/hotels/thumbnails/' . $hotelimages->imageName(); ?> " width="151" height="130" alt="new_hotel"/> <?php } else { ?> <img src="images/no_image.jpg" alt="image" width="151" height="130"/> <?php } ?> <div class="hotel-name-price"> <h5 onclick="makeAlert(<?php echo $new_hotel->hotelId(); ?> );"><?php echo $new_hotel->hotelName(); ?> </h5> <input type="hidden" id="<?php echo $new_hotel->hotelId(); ?> " name="<?php echo $new_hotel->hotelId(); ?> " value="<?php echo $new_hotel->hotelSeoUrl(); ?> "/> </div> <div> <span><?php echo $mainCity_discount->mainCityName(); ?> </span> </div> <div class="price-box"> <span>From</span> <span class="price"> <?php echo $_SESSION['defaultCurrency'] . ' ' . $rateAvailable['Rate']; ?> </span> <p></p> </div> </a> </li> <?php } ?> <div id="pagination"><?php $paginations->drawPagination(); ?> </div> <?php } ?> </ul> </div> </div> <?php }
<?php define('_MEXEC', 'OK'); require_once($_SERVER['DOCUMENT_ROOT'] . "/system/config/app.php"); if(!isset($_GET['start']) && !isset($_GET['end']) && !is_numeric($_GET['start']) && !is_numeric($_GET['end'])){ $start = 0; $end = 8; }else{ $start = $_GET['start']; $end = $_GET['end']; } $mainCity = new MainCity(); $topCities = $mainCity->where('top_cities', '=', 1)->skip($start)->take($end)->get(); ?> <div class="hotel-thumb-set col-xs-12 no-padding"> <?php foreach($topCities as $topCity){ $hotel = new Hotel(); $countHotels = $hotel->where('main_city_id', '=', $topCity->id)->count(); ?> <div class="hotel-thumb col-sm-3"> <a href="<?php echo HTTP_PATH; ?>sri-lanka/hotels-<?php echo implode('-', explode(' ', strtolower($topCity['name']))); ?>"> <?php $filename = DOC_ROOT . 'uploads/main-city/' . $topCity['image']; if(file_exists($filename) && $topCity['image'] != "") { ?> <img src="<?php echo HTTP_PATH; ?>timthumb.php?src=<?php echo HTTP_PATH; ?>uploads/main-city/<?php echo $topCity['image']; ?>&w=239&h=100"> <?php }else{ ?> <img src="<?php echo HTTP_PATH; ?>timthumb.php?src=<?php echo HTTP_PATH; ?>images/no_image.jpg&w=239&h=100"> <?php } ?>
function deleteMainCityImage() { $file = $_REQUEST['image']; $file_path = DOC_ROOT . 'uploads/main-city/' . $file; if (file_exists($file_path)) { if (unlink($file_path)) { $maincity = new MainCity(); $maincity->setMainCityId($_REQUEST['id']); $data = $maincity->getMainCityFromId(); $maincity->extractor($data); $imagelist = $maincity->mainCityImage(); $imgs = explode(',', $imagelist); $key = array_search($file, $imgs); if (false !== $key) { unset($imgs[$key]); } for ($x = 0; $x <= count($imgs); $x++) { if (!empty($imgs[$x])) { $update_img .= $imgs[$x] . ','; } } $maincity->setMainCityImage($update_img); $maincity->updateMainCityImages(); Common::jsonSuccess("City Image Deleted Successfully"); } else { Common::jsonError("Fail To Delete"); } } else { Common::jsonError("Error"); } }
<?php define('_MEXEC', 'OK'); require_once($_SERVER['DOCUMENT_ROOT'] . "/config/app.php"); $_SESSION['page_url'] = HTTP_PATH; $hotel = new Hotel(); $mainCity = new MainCity(); $hotelImage = new HotelImage(); $news = new News(); $featuredHotels = $hotel->where('is_featured', '=', 1)->with('mainCity', 'subCity')->orderBy('id', 'DESC')->get(); $newsData = $news->where('status', '=', 1)->take(4)->get(); $topCities = $mainCity->where('top_cities', '=', 1)/*->take(2)*/->get(); $otherCities = $mainCity->where('top_cities', '=', 0)->get(); ?> <!DOCTYPE> <html> <?php require_once(DOC_ROOT . 'includes/head.php'); ?> <body> <div id="wrapper"> <?php include(DOC_ROOT . 'includes/header.php'); ?> <div id="content"> <div class="home_banner home" style="background-image:url(<?php echo HTTP_PATH; ?>images/banner_home_3.jpg);"> <div class="container"> <?php include(DOC_ROOT . 'includes/booking-form.php'); ?> </div> </div> <div class="container"> <div class="row"> <div class="col-xs-12 no-padding"> <div class="col-xs-12 no-padding">
function viewTableFront($data, $count) { $paginations = new Paginations(); $paginations->setLimit(10); $paginations->setPage($_REQUEST['page']); $paginations->setJSCallback("viewHotelsFront"); $paginations->setTotalPages($count); $paginations->makePagination(); $mainCity = new MainCity(); $hotels = new Hotels(); $dicount_hotel = new Hotels(); $country = new country(); $SubCity = new SubCity(); $hotelimages = new hotelimages(); $discount = new HotelRoomRates(); ?> <?php for ($x = 0; $x < count($data); $x++) { $dicount_hotel->extractor($data, $x); $discount->setHotelId($dicount_hotel->hotelId()); $discount_data = $discount->getRatesFromHotelId(); $discount->extractor($discount_data); if (round($discount->discountRatesUpLocal()) >= 0) { $new_hotel = new Hotels(); $new_hotel->setHotelId($dicount_hotel->hotelId()); $new_hotel_data = $new_hotel->getHotelFromId(); $new_hotel->extractor($new_hotel_data); $hotelimages->setImageHotelId($new_hotel->hotelId()); $hotelimages->extractor($hotelimages->getImageFromHotelsIdOne()); $mainCity_discount = new MainCity(); $mainCity_discount->setMainCityId($new_hotel->hotelMainCityId()); $mainCity_discount->extractor($mainCity_discount->getMainCityFromId()); $filename = '../../uploads/hotels/thumbnails/' . $hotelimages->imageName(); ?> <div class="offer-listing"> <?php if (file_exists($filename) && $hotelimages->imageName() != "") { ?> <img src="uploads/hotels/thumbnails/<?php echo $hotelimages->imageName(); ?> " width="157" height="130" alt="new_hotel"/> <?php } else { ?> <img src="images/no_image.jpg" alt="image" width="151" height="130"/> <?php } ?> <h4 onclick="makeAlert(<?php echo $new_hotel->hotelId(); ?> );" style="cursor:pointer;"><?php echo $new_hotel->hotelName(); ?> </h4> <input type="hidden" id="<?php echo $new_hotel->hotelId(); ?> " name="<?php echo $new_hotel->hotelId(); ?> " value="<?php echo $new_hotel->hotelSeoUrl(); ?> "/> <h5><?php echo $mainCity_discount->mainCityName(); ?> </h5> <p> <?php echo substr($new_hotel->hotelDescription(), 0, 250); ?> </p> <div class="price_tag"> <span class="striked_price"><!--Rs. 5,600--></span> <span class="actual_price"><?php if ($discount->dblBbSellLocal()) { echo 'LKR ' . $discount->dblBbSellLocal(); } else { echo 'N/A'; } ?> </span> <span class="label">Price Per Night</span> </div> <button onclick="makeAlert(<?php echo $new_hotel->hotelId(); ?> );">Book Now ></button> </div> <?php } } ?> <div id="pagination"><?php $paginations->drawPagination(); ?> </div><?php }