<?php define('_MEXEC', 'OK'); require_once($_SERVER['DOCUMENT_ROOT'] . "/config/app.php"); if(!isset($_POST['value']) || $_POST['value'] != '437d04d169b9b9a592f944802c6b3c39'){ die('Try again.'); } $string = isset($_POST['key']) ? $_POST['key'] : ''; if(strlen($string) < 1){ die(false); } $quaries = ['c' => [], 'h' => [], 'd' => []]; $objC = new SubCity(); $list1 = $objC->where('name', 'like', '%' . $string . '%') ->take(7) ->get(['name']); foreach($list1 as $list1Val){ $quaries['c'][] = $list1Val->name; } $objH = new Hotel(); $list2 = $objH->where('name', 'like', '%' . $string . '%')->take(7)->get(['name']); foreach($list2 as $list2Val){ $quaries['h'][] = $list2Val->name; } $objD = new Destination(); $list3 = $objD->where('destination', 'like', '%' . $string . '%') ->take(7) ->get(['destination']); foreach($list3 as $list3Val){ $quaries['d'][] = $list3Val->destination; }
<?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 $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['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)
<?php $category = new Category(); $accTypes = $category->all(); $mainCity = new MainCity(); $mCities = $mainCity->all(); $subCity = new SubCity(); $sCities = $subCity->all(); if(isset($_SESSION['editing_hotel']) && (strlen($_SESSION['editing_hotel']) > 0)){ $hotel = new Hotel(); $hotel = $hotel->find($_SESSION['editing_hotel']); if(!$hotel){ die(header('Location: ' . DOMAIN . '404')); } $categoryHotel = new CategoryHotel(); $categoryHotel = $categoryHotel->where('hotel_id', '=', $_SESSION['editing_hotel'])->get(); $categoryIds = []; foreach($categoryHotel as $categoryId){ $categoryIds[] = $categoryId->category_id; } $subCityName = $subCity->find($hotel->sub_city_id); $subCityName = $subCityName->name; $coverPhotos = explode(',', $hotel->cover_photo); $coverPhotos = array_filter($coverPhotos); } ?> <form action="<?php echo HTTP; ?>dashboard/get_step_01.php" method="post" enctype="multipart/form-data"> <input type="hidden" value="d1c4ed87775fffbab3acc36170b0cf2d" name="csrf"/> <fieldset> <legend>Hotel Registration/Property-details</legend> <h3 class="h3">Hotel information</h3> <div class="form-group"> <label for="hotelName">Hotel Name<span class="text-danger">*</span></label>
function viewTable($data, $count) { $sub_city = new SubCity(); $paginations = new Paginations(); $paginations->setLimit(10); $paginations->setPage($_REQUEST['page']); $paginations->setJSCallback("viewSubCity"); $paginations->setTotalPages($count); $paginations->makePagination(); ?> <div class="mws-panel-header"> <span class="mws-i-24 i-table-1">View Sub 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">Name</th> <th class="head0">Geo Location</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++) { $sub_city->extractor($data, $i); ?> <tr id="row_<?php echo $sub_city->subCityId(); ?> "> <td class="con1"><?php echo $sub_city->subCityName(); ?> </td> <td class="con0"><?php echo $sub_city->subCityGeoLocation(); ?> </td> <td class="con0"><?php //echo $sub_city->username(); ?> </td> <td class="center"><a onclick="loadGUIContent('subcity','edit','<?php echo $sub_city->subCityId(); ?> ')">Edit</a> <a href="javascript:;" onclick="deleteSubCity(<?php echo $sub_city->subCityId(); ?> )" class="toggle">Delete</a></td> </tr> <?php } ?> <?php } ?> </tbody> </table> </div> <?php $paginations->drawPagination(); }