function __construct($data = null) { if (!empty($data)) { parent::__construct($data); $this->{$datasource} = $data; } }
<?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(); $sessions = new Sessions(); $hotelRoomRates = new HotelRoomRates(); $hotelRoomType = new HotelRoomType(); $roomcontrol = new RoomControl(); $hotels_id = $_REQUEST['hotels_id']; $hotels->setHotelId($hotels_id); $hotels->extractor($hotels->getHotelFromId()); $Sessions->setSearchSessions($_REQUEST['search_num_of_room'], $_REQUEST['search_adults'], $_REQUEST['search_children'], $_REQUEST['check_in_date'], $_REQUEST['check_out_date'], $_REQUEST['no_of_dates']); $day = 86400; $startTime = strtotime($_REQUEST['check_in_date']); $endTime = strtotime($_REQUEST['check_out_date']); $numDays = round(($endTime - $startTime) / $day); $room_count_empty = 0; ?> <style> .rates_vertical { border: 1px #999 solid; border-radius: 4px; } .rates_vertical td { padding: 1px 3px; border: 0px; font-size: 9px !important;
<?php define('_MEXEC', 'OK'); require_once("../system/load.php"); include("../pgconfig.php"); $hotels = new Hotels(); $reservations = new Reservations(); $merchantReferenceNo = $_REQUEST['resid']; $reservations->setReservationId($merchantReferenceNo); $pay_data = $reservations->getReservationsFromId(); $reservations->extractor($pay_data); $reservation_link_id = $reservations->reservationFromBookingLink(); $reservations_status = $reservations->reservationPaymentStatus(); $hotels->setHotelId($reservations->reservationHotelId()); $hotels->extractor($hotels->getHotelFromId()); $hotels_id = $reservations->reservationHotelId(); $bookingclient = new BookingClient(); $bookingclient->setId($reservations->reservationClientId()); $bookingclient->extractor($bookingclient->getClientsFromId()); ?> <!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]>
/** * @return \yii\db\ActiveQuery */ public function getHotel() { return $this->hasOne(Hotels::className(), ['Id' => 'hotelId']); }
<?php define('_MEXEC', 'OK'); require_once("../system/load.php"); $hotels = new Hotels(); $sessions = new Sessions(); $hotelRoomRates = new HotelRoomRates(); $hotelRoomType = new HotelRoomType(); $roomcontrol = new RoomControl(); $hotels_id = $_SESSION['hotels_id']; if (!isset($_REQUEST['check_in_date'])) { $_SESSION['country_id'] = $_SESSION['country_id']; $_SESSION['rc_num_of_rooms'] = $_SESSION['rc_num_of_rooms']; $_SESSION['check_in_date'] = $_SESSION['check_in_date']; $_SESSION['check_out_date'] = $_SESSION['check_out_date']; $_SESSION['book_room_adults'] = $_SESSION['book_room_adults']; $_SESSION['book_room_children'] = $_SESSION['book_room_children']; } else { $_SESSION['country_id'] = $_REQUEST['country_id']; $_SESSION['rc_num_of_rooms'] = $_REQUEST['rc_num_of_rooms']; $_SESSION['check_in_date'] = $_REQUEST['check_in_date']; $_SESSION['check_out_date'] = $_REQUEST['check_out_date']; $_SESSION['book_room_adults'] = $_REQUEST['book_room_adults']; $_SESSION['book_room_children'] = $_REQUEST['book_room_children']; } $hotels->setHotelId($hotels_id); $hotels->extractor($hotels->getHotelFromId()); $Sessions->setSearchSessions($_SESSION['search_num_of_room'], $_SESSION['search_adults'], $_SESSION['search_children'], $_SESSION['check_in_date'], $_SESSION['check_out_date'], $_SESSION['no_of_dates']);
/** * Removes a hotel. * * @param Hotel $hotel * @return $this For fluid purposes. */ public function removeHotel(\Seh\Bundle\SehBundle\Entity\Hotel $hotel) { $this->hotels->removeElement($hotel); return $this; }
function __construct($login_type = '') { parent::__construct(); global $objSettings; $this->params = array(); if (isset($_POST['first_name'])) { $this->params['first_name'] = prepare_input($_POST['first_name']); } if (isset($_POST['last_name'])) { $this->params['last_name'] = prepare_input($_POST['last_name']); } if (isset($_POST['user_name'])) { $this->params['user_name'] = prepare_input($_POST['user_name']); } if (isset($_POST['password'])) { $this->params['password'] = prepare_input($_POST['password']); } if (isset($_POST['email'])) { $this->params['email'] = prepare_input($_POST['email']); } if (isset($_POST['preferred_language'])) { $this->params['preferred_language'] = prepare_input($_POST['preferred_language']); } if (isset($_POST['account_type'])) { $this->params['account_type'] = prepare_input($_POST['account_type']); } if (isset($_POST['date_created'])) { $this->params['date_created'] = prepare_input($_POST['date_created']); } if (isset($_POST['is_active'])) { $this->params['is_active'] = (int) $_POST['is_active']; } else { $this->params['is_active'] = '0'; } if (self::$PROJECT == 'HotelSite') { if (isset($_POST['hotels'])) { $this->params['hotels'] = prepare_input($_POST['hotels']); } } $this->primaryKey = 'id'; $this->tableName = TABLE_ACCOUNTS; $this->dataSet = array(); $this->error = ''; $this->formActionURL = 'index.php?admin=admins_management'; $this->actions = array('add' => true, 'edit' => true, 'details' => true, 'delete' => true); $this->actionIcons = true; $this->allowRefresh = true; $this->allowLanguages = false; if ($login_type == 'owner') { $this->WHERE_CLAUSE = 'WHERE (' . TABLE_ACCOUNTS . '.account_type = \'mainadmin\' || ' . TABLE_ACCOUNTS . '.account_type = \'admin\' || ' . TABLE_ACCOUNTS . '.account_type = \'hotelowner\')'; } else { if ($login_type == 'mainadmin') { $this->WHERE_CLAUSE = 'WHERE (' . TABLE_ACCOUNTS . '.account_type = \'admin\' || ' . TABLE_ACCOUNTS . '.account_type = \'hotelowner\')'; } else { if ($login_type == 'admin') { $this->WHERE_CLAUSE = 'WHERE ' . TABLE_ACCOUNTS . '.account_type = \'admin\''; } else { if ($login_type == 'hotelowner') { $this->WHERE_CLAUSE = 'WHERE ' . TABLE_ACCOUNTS . '.account_type = \'hotelowner\''; } } } } $this->ORDER_CLAUSE = 'ORDER BY id ASC'; $this->isAlterColorsAllowed = true; $this->isPagingAllowed = true; $this->pageSize = 20; $this->isSortingAllowed = true; $this->isFilteringAllowed = true; // define filtering fields $this->arrFilteringFields = array(_FIRST_NAME => array('table' => $this->tableName, 'field' => 'first_name', 'type' => 'text', 'sign' => 'like%', 'width' => '80px'), _LAST_NAME => array('table' => $this->tableName, 'field' => 'last_name', 'type' => 'text', 'sign' => 'like%', 'width' => '80px'), _ACTIVE => array('table' => $this->tableName, 'field' => 'is_active', 'type' => 'dropdownlist', 'source' => array('0' => _NO, '1' => _YES), 'sign' => '=', 'width' => '85px')); // prepare languages array $total_languages = Languages::GetAllActive(); $arr_languages = array(); foreach ($total_languages[0] as $key => $val) { $arr_languages[$val['abbreviation']] = $val['lang_name']; } $arr_account_types = array('admin' => _ADMIN, 'mainadmin' => _MAIN_ADMIN); if (self::$PROJECT == 'HotelSite') { $arr_account_types['hotelowner'] = _HOTEL_OWNER; } $arr_is_active = array('0' => '<span class=no>' . _NO . '</span>', '1' => '<span class=yes>' . _YES . '</span>'); $datetime_format = get_datetime_format(); if (self::$PROJECT == 'HotelSite') { $total_hotels = Hotels::GetAllActive(); $arr_hotels = array(); foreach ($total_hotels[0] as $key => $val) { $this->arrCompanies[$val['id']] = $val['name']; } $this->additionalFields = ', hotels'; $this->accountTypeOnChange = 'onchange="javascript:AccountType_OnChange(this.value)"'; } if ($objSettings->GetParameter('date_format') == 'mm/dd/yyyy') { $this->sqlFieldDatetimeFormat = '%b %d, %Y %H:%i'; } else { $this->sqlFieldDatetimeFormat = '%d %b, %Y %H:%i'; } $this->SetLocale(Application::Get('lc_time_name')); //---------------------------------------------------------------------- // VIEW MODE //---------------------------------------------------------------------- $this->VIEW_MODE_SQL = 'SELECT ' . $this->primaryKey . ', first_name, last_name, CONCAT(first_name, \' \', last_name) as full_name, user_name, email, preferred_language, account_type, DATE_FORMAT(date_lastlogin, \'' . $this->sqlFieldDatetimeFormat . '\') as date_lastlogin, is_active ' . $this->additionalFields . ' FROM ' . $this->tableName; // define view mode fields $this->arrViewModeFields = array('full_name' => array('title' => _NAME, 'type' => 'label', 'align' => 'left', 'width' => ''), 'user_name' => array('title' => _USER_NAME, 'type' => 'label', 'align' => 'left', 'width' => ''), 'email' => array('title' => _EMAIL_ADDRESS, 'type' => 'link', 'maxlength' => '35', 'href' => 'mailto:{email}', 'align' => 'left', 'width' => ''), 'account_type' => array('title' => _ACCOUNT_TYPE, 'type' => 'enum', 'align' => 'center', 'width' => '120px', 'sortable' => true, 'nowrap' => '', 'visible' => true, 'source' => $arr_account_types), 'is_active' => array('title' => _ACTIVE, 'type' => 'enum', 'align' => 'center', 'width' => '80px', 'sortable' => true, 'nowrap' => '', 'visible' => true, 'source' => $arr_is_active), 'date_lastlogin' => array('title' => _LAST_LOGIN, 'type' => 'label', 'align' => 'center', 'width' => '110px', 'format' => 'date', 'format_parameter' => $datetime_format), 'id' => array('title' => 'ID', 'type' => 'label', 'align' => 'center', 'width' => '40px')); //---------------------------------------------------------------------- // ADD MODE //---------------------------------------------------------------------- // define add mode fields $this->arrAddModeFields = array('separator_1' => array('separator_info' => array('legend' => _PERSONAL_DETAILS), 'first_name' => array('title' => _FIRST_NAME, 'type' => 'textbox', 'width' => '210px', 'required' => true, 'maxlength' => '32', 'validation_type' => 'text'), 'last_name' => array('title' => _LAST_NAME, 'type' => 'textbox', 'width' => '210px', 'required' => true, 'maxlength' => '32', 'validation_type' => 'text'), 'email' => array('title' => _EMAIL_ADDRESS, 'type' => 'textbox', 'width' => '210px', 'required' => true, 'maxlength' => '70', 'validation_type' => 'email', 'unique' => true)), 'separator_2' => array('separator_info' => array('legend' => _ACCOUNT_DETAILS), 'user_name' => array('title' => _USER_NAME, 'type' => 'textbox', 'width' => '210px', 'required' => true, 'maxlength' => '32', 'validation_type' => 'alpha_numeric', 'unique' => true, 'username_generator' => true), 'password' => array('title' => _PASSWORD, 'type' => 'password', 'width' => '210px', 'required' => true, 'maxlength' => '32', 'validation_type' => 'password', 'cryptography' => PASSWORDS_ENCRYPTION, 'cryptography_type' => PASSWORDS_ENCRYPTION_TYPE, 'aes_password' => PASSWORDS_ENCRYPT_KEY, 'password_generator' => true), 'account_type' => array('title' => _ACCOUNT_TYPE, 'type' => 'enum', 'required' => true, 'readonly' => false, 'width' => '120px', 'source' => $arr_account_types, 'javascript_event' => $this->accountTypeOnChange), 'preferred_language' => array('title' => _PREFERRED_LANGUAGE, 'type' => 'enum', 'required' => true, 'readonly' => false, 'width' => '120px', 'default' => Application::Get('lang'), 'source' => $arr_languages)), 'separator_3' => array('separator_info' => array('legend' => _OTHER), 'date_lastlogin' => array('title' => '', 'type' => 'hidden', 'required' => false, 'default' => ''), 'date_created' => array('title' => '', 'type' => 'hidden', 'required' => false, 'default' => date('Y-m-d H:i:s')), 'is_active' => array('title' => _ACTIVE, 'type' => 'checkbox', 'readonly' => false, 'default' => '1', 'true_value' => '1', 'false_value' => '0', 'unique' => false))); if (self::$PROJECT == 'HotelSite') { $this->arrAddModeFields['separator_3']['hotels'] = array('title' => _HOTELS, 'type' => 'enum', 'width' => '', 'required' => false, 'readonly' => false, 'default' => '', 'source' => $this->arrCompanies, 'default_option' => '', 'unique' => false, 'javascript_event' => '', 'view_type' => 'checkboxes', 'multi_select' => true); } //---------------------------------------------------------------------- // EDIT MODE //---------------------------------------------------------------------- $this->EDIT_MODE_SQL = 'SELECT ' . $this->tableName . '.' . $this->primaryKey . ', ' . $this->tableName . '.first_name, ' . $this->tableName . '.last_name, ' . $this->tableName . '.user_name, ' . $this->tableName . '.password, ' . $this->tableName . '.email, ' . $this->tableName . '.account_type, ' . $this->tableName . '.preferred_language, DATE_FORMAT(' . $this->tableName . '.date_created, \'' . $this->sqlFieldDatetimeFormat . '\') as date_created, DATE_FORMAT(' . $this->tableName . '.date_lastlogin, \'' . $this->sqlFieldDatetimeFormat . '\') as date_lastlogin, ' . $this->tableName . '.is_active ' . $this->additionalFields . ' FROM ' . $this->tableName . ' WHERE ' . $this->tableName . '.' . $this->primaryKey . ' = _RID_'; // define edit mode fields $this->arrEditModeFields = array('separator_1' => array('separator_info' => array('legend' => _PERSONAL_DETAILS), 'first_name' => array('title' => _FIRST_NAME, 'type' => 'textbox', 'width' => '210px', 'maxlength' => '32', 'required' => true, 'validation_type' => 'text'), 'last_name' => array('title' => _LAST_NAME, 'type' => 'textbox', 'width' => '210px', 'maxlength' => '32', 'required' => true, 'validation_type' => 'text'), 'email' => array('title' => _EMAIL_ADDRESS, 'type' => 'textbox', 'width' => '210px', 'maxlength' => '70', 'required' => true, 'validation_type' => 'email', 'unique' => true)), 'separator_2' => array('separator_info' => array('legend' => _ACCOUNT_DETAILS), 'user_name' => array('title' => _USER_NAME, 'type' => 'textbox', 'width' => '210px', 'maxlength' => '32', 'required' => true, 'readonly' => true, 'validation_type' => 'alpha_numeric', 'unique' => true), 'account_type' => array('title' => _ACCOUNT_TYPE, 'type' => 'enum', 'width' => '120px', 'required' => true, 'maxlength' => '32', 'readonly' => $login_type == 'owner' ? false : true, 'source' => $arr_account_types, 'javascript_event' => $this->accountTypeOnChange), 'preferred_language' => array('title' => _PREFERRED_LANGUAGE, 'type' => 'enum', 'width' => '120px', 'required' => true, 'readonly' => false, 'source' => $arr_languages)), 'separator_3' => array('separator_info' => array('legend' => _OTHER), 'date_created' => array('title' => _DATE_CREATED, 'type' => 'label'), 'date_lastlogin' => array('title' => _LAST_LOGIN, 'type' => 'label'), 'is_active' => array('title' => _ACTIVE, 'type' => 'checkbox', 'true_value' => '1', 'false_value' => '0'))); if (self::$PROJECT == 'HotelSite') { $this->arrEditModeFields['separator_3']['hotels'] = array('title' => _HOTELS, 'type' => 'enum', 'width' => '', 'required' => false, 'readonly' => false, 'default' => '', 'source' => $this->arrCompanies, 'default_option' => '', 'unique' => false, 'javascript_event' => '', 'view_type' => 'checkboxes', 'multi_select' => true); } //---------------------------------------------------------------------- // DETAILS MODE //---------------------------------------------------------------------- $this->DETAILS_MODE_SQL = 'SELECT ' . $this->tableName . '.' . $this->primaryKey . ', ' . $this->tableName . '.first_name, ' . $this->tableName . '.last_name, ' . $this->tableName . '.user_name, ' . $this->tableName . '.password, ' . $this->tableName . '.email, ' . $this->tableName . '.preferred_language, ' . $this->tableName . '.account_type, DATE_FORMAT(' . $this->tableName . '.date_created, \'' . $this->sqlFieldDatetimeFormat . '\') as date_created, DATE_FORMAT(' . $this->tableName . '.date_lastlogin, \'' . $this->sqlFieldDatetimeFormat . '\') as date_lastlogin, ' . $this->tableName . '.is_active ' . $this->additionalFields . ' FROM ' . $this->tableName . ' WHERE ' . $this->tableName . '.' . $this->primaryKey . ' = _RID_'; $this->arrDetailsModeFields = array('separator_1' => array('separator_info' => array('legend' => _PERSONAL_DETAILS), 'first_name' => array('title' => _FIRST_NAME, 'type' => 'label'), 'last_name' => array('title' => _LAST_NAME, 'type' => 'label'), 'email' => array('title' => _EMAIL_ADDRESS, 'type' => 'label')), 'separator_2' => array('separator_info' => array('legend' => _ACCOUNT_DETAILS), 'user_name' => array('title' => _USER_NAME, 'type' => 'label'), 'account_type' => array('title' => _ACCOUNT_TYPE, 'type' => 'enum', 'source' => $arr_account_types), 'preferred_language' => array('title' => _PREFERRED_LANGUAGE, 'type' => 'enum', 'source' => $arr_languages)), 'separator_3' => array('separator_info' => array('legend' => _OTHER), 'date_created' => array('title' => _DATE_CREATED, 'type' => 'label'), 'date_lastlogin' => array('title' => _LAST_LOGIN, 'type' => 'label'), 'is_active' => array('title' => _ACTIVE, 'type' => 'enum', 'source' => $arr_is_active))); if (self::$PROJECT == 'HotelSite') { $this->arrDetailsModeFields['separator_3']['hotels'] = array('title' => _HOTELS, 'type' => 'enum', 'width' => '', 'required' => false, 'readonly' => false, 'default' => '', 'source' => $this->arrCompanies, 'default_option' => '', 'unique' => false, 'javascript_event' => '', 'view_type' => 'checkboxes', 'multi_select' => true); } }
<?php //define('_MEXEC','OK'); //require_once("../../../system/load.php"); //include('../../../config/config.php'); $dateTime = new DateTime("now", new DateTimeZone('Asia/Colombo')); $submitted_date = $dateTime->format("Y-m-d H:i:s"); $currentDate = date("F j, Y, g:i a"); $mainCity = new MainCity(); $SubCity = new SubCity(); $hotels = new Hotels(); $session = new Sessions(); //$mail = new SystemMail(); $reservations = new Reservations(); $bookingclient = new BookingClient(); $rooms = new HotelRoomType(); $hotels->setHotelId($_SESSION['hotels_id']); $hotels->extractor($hotels->getHotelFromId()); $merchantReferenceNo = $session->getMerchantReferenceNo(); $reservations->setReservationId($merchantReferenceNo); $pay_data = $reservations->getReservationsFromId(); $reservations->extractor($pay_data); $reservation_link_id = $reservations->reservationFromBookingLink(); $reservations_status = $reservations->reservationPaymentStatus(); $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); $bookingclient->setId($reservations->reservationClientId()); $bookingclient->extractor($bookingclient->getClientsFromId()); $rooms->setRoomTypeId($reservations->reservationHotelRoomTypeId());
/** * Draw page text */ public function DrawText() { global $objLogin; $objGallery = new GalleryAlbums(); $objContactUs = ContactUs::Instance(); $replace_needles = 1; $module_page = false; if (!count($this->page)) { return false; } // dont show this page if it was expired if (!$objLogin->IsLoggedInAsAdmin() && $this->page['finish_publishing'] != '0000-00-00' && date('Y-m-d') > $this->page['finish_publishing']) { draw_important_message(_PAGE_EXPIRED); return false; } if ($this->page['content_type'] == 'article' && isset($this->page['page_text'])) { $page_text = decode_text($this->page['page_text'], false); echo '<div class="pages_contents">'; if (preg_match('/{module:gallery}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:gallery}/i', $objGallery->DrawGallery(false), $page_text, 1); } if (preg_match_all('/{module:album=(.*?)}/i', $page_text, $matches)) { $module_page = true; if (is_array($matches[1])) { foreach ($matches[1] as $key => $val) { if (strtolower($val) != 'code') { $val = @preg_replace('/[^A-Za-z0-9:]/i', '', $val); $page_text = @preg_replace('/{module:album=' . $val . '}/i', $objGallery->DrawAlbum($val, false), $page_text, 1); } } } } if (self::$PROJECT == 'MedicalAppointment') { if (preg_match('/{module:about_us}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:about_us}/i', Clinic::DrawAboutUs(false), $page_text, 1); } } if (self::$PROJECT == 'HotelSite') { if (preg_match('/{module:about_us}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:about_us}/i', Hotels::DrawAboutUs(false), $page_text, 1); } if (preg_match('/{module:rooms}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:rooms}/i', Rooms::DrawRoomsInfo(false), $page_text, 1); } if (preg_match('/{module:testimonials}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:testimonials}/i', Testimonials::DrawTestimonails(false), $page_text, 1); } } if (preg_match('/{module:contact_us}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:contact_us}/i', $objContactUs->DrawContactUsForm(false), $page_text, 1); } if (preg_match('/{module:faq}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:faq}/i', FaqCategories::DrawFaqList(false), $page_text, 1); } if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { $page_text = stripslashes($page_text); } if ($this->page['is_home']) { if (self::$PROJECT == 'HotelSite') { Campaigns::DrawCampaignBanner('standard'); Campaigns::DrawCampaignBanner('global'); } } //echo $page_text; //echo "<hr>"; // draw all needed blocks for Home page if ($this->page['is_home']) { if (self::$PROJECT == 'BusinessDirectory') { if (ModulesSettings::Get('listings', 'show_categories_home_block') == 'yes') { Categories::DrawHomePageBlock(); } } else { if (self::$PROJECT == 'ShoppingCart') { if (ModulesSettings::Get('products_catalog', 'is_active') == 'yes') { Campaigns::DrawCampaignBanner(); if (ModulesSettings::Get('products_catalog', 'show_featured_block') == 'home page') { Products::DrawFeaturedBlock('home'); } if (ModulesSettings::Get('products_catalog', 'show_new_products_block') == 'home page') { Products::DrawNewProductsBlock(); } Categories::DrawHomePageBlock(); } } } } // draw comments form if (!$this->page['is_home'] && !$module_page) { if (Modules::IsModuleInstalled('comments')) { if (ModulesSettings::Get('comments', 'comments_allow') == 'yes' && $this->page['comments_allowed']) { $objComments = new Comments(); $objComments->DrawArticleComments($this->page['id']); } } } echo '</div>'; } else { if ($this->page['content_type'] == 'link' && isset($this->page['link_url'])) { $link_url = decode_text($this->page['link_url']); echo '<div class="pages_contents">'; echo '<a href="' . $link_url . '">' . $link_url . '</a>'; echo '</div>'; } } }
function createRoomBooking($bean, $khachsan = '') { global $db; $sql = "\r\n SELECT \r\n a.id \r\n FROM\r\n `roombookings` a \r\n JOIN `hotels_roombookings_c` b \r\n ON a.`id` = b.`hotels_rooc1a7ookings_idb` \r\n AND b.`deleted` = 0 \r\n AND b.`hotels_rooc622shotels_ida` = '{$khachsan->ks_id}' \r\n JOIN `groupprograroombookings_c` c \r\n ON c.`groupprogr952fookings_idb` = a.`id` \r\n AND c.`deleted` = 0 \r\n AND c.`groupprogra66erograms_ida` = '{$bean->id}' \r\n WHERE a.`deleted` = 0 \r\n "; $RoomBooking = new RoomBookings(); $result = $db->query($sql); while ($row = $db->fetchByAssoc($result)) { $RoomBooking->id = $row['id']; } $RoomBooking->groupprogrambookings_name = $bean->groupprogram_code; $RoomBooking->groupprogra66erograms_ida = $bean->id; $hotel = new Hotels(); $hotel->retrieve($khachsan->ks_id); $RoomBooking->hotels_rooc622shotels_ida = $hotel->id; $RoomBooking->hotels_roombookings_name = $hotel->name; $RoomBooking->hotel_address = $hotel->address; $RoomBooking->hotel_tel = $hotel->tel; $RoomBooking->hotel_fax = $hotel->fax; $RoomBooking->confirm = 0; $RoomBooking->name = 'Room Bookings To ' . $hotel->name; $RoomBooking->assigned_user_name = $bean->assigned_user_name; $RoomBooking->assigned_user_id = $bean->assigned_user_id; $return = $RoomBooking->save(); return $return; }
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 }
function viewTable($data, $count) { $reservation = new Reservations(); $paginations = new Paginations(); $paginations->setLimit(10); $paginations->setPage($_REQUEST['page']); $paginations->setJSCallback("viewReservations"); $paginations->setTotalPages($count); $paginations->makePagination(); ?> <div class="mws-panel-header"> <span class="mws-i-24 i-table-1">View Reservations</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">Hotel</th> <th class="head0">Client</th> <th class="head0">Room Rate</th> <th class="head1">Total Price</th> </tr> </thead> <tbody> <?php if (count($data) > 0) { ?> <?php for ($i = 0; $i < count($data); $i++) { $reservation->extractor($data, $i); $hotels = new Hotels(); $hotels->setHotelId($reservation->reservationHotelId()); $hotels->extractor($hotels->getHotelFromId()); $clients = new Clients(); $clients->setClientId($reservation->reservationClientId()); $clients->extractor($clients->getClientFromId()); ?> <tr id="row_<?php echo $reservation->reservationId(); ?> "> <td class="con1"><?php echo $hotels->hotelName(); ?> </td> <td class="con0"><?php echo $clients->clientFirstName() . ' - ' . $clients->clientFirstName(); ?> </td> <td class="con0"><?php echo $reservation->reservationRoomRate(); ?> </td> <td class="center"><?php echo $reservation->reservationTotalPrice(); ?> </td> </tr> <?php } ?> <?php } ?> </tbody> </table> </div> <?php $paginations->drawPagination(); }
$no_of_room = $_REQUEST['no_of_room']; $_SESSION['no_of_room'] = $no_of_room; $room_type_id = $_REQUEST['room_type_id']; print(" <script type='text/javascript'> var check_in_date='" . $check_in_date . "'; var check_out_date='" . $check_out_date . "'; var room_type_id='" . $room_type_id . "'; var room_bed_type='" . $room_bed_type . "'; var room_meal_type='" . $_SESSION['room_meal_type'] . "'; 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(); }
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 "../../../system/load.php"; //error_reporting(E_ALL); //Mail Controllers require_once '../../../smtpmailclass/class.phpmailer.php'; require_once '../../../smtpmailclass/class.smtp.php'; // optional, gets called from within class.phpmailer.php if not $hotels = new Hotels(); $session = new Sessions(); $reservations = new Reservations(); $bookingclient = new BookingClient(); $bookingclient = new BookingClient(); $rooms = new HotelRoomType(); $client; $merchantReferenceNo = $_REQUEST['resid']; //$session->getMerchantReferenceNo(); $reservations->setReservationId($merchantReferenceNo); $pay_data = $reservations->getReservationsFromId(); $reservations->extractor($pay_data); $reservation_link_id = $reservations->reservationFromBookingLink(); $reservations_status = $reservations->reservationPaymentStatus(); if ($reservations->reservationFromBookingLink()) { $client = new BookingClient(); $client->setId($reservations->reservationClientId()); $client->extractor($client->getClientsFromId()); $client_name = $client->name(); $client_email = $client->email(); } else { $client = new Clients();
<?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>';
/* create a new, "virtual" image */ $virtual_image = imagecreatetruecolor($desired_width, $desired_height); /* copy source image at a resized size */ imagecopyresampled($virtual_image, $source_image, 0, 0, 0, 0, $desired_width, $desired_height, $width, $height); /* create the physical thumbnail image to its destination */ imagejpeg($virtual_image, $dest); //---------------------------------- $image_list .= $upload->file_copy . ','; $session->setHotelImageUploadList($image_list); $hotels = new Hotels(); $hotels->setHotelId($hotel_file_id); $hotels->extractor($hotels->getHotelFromId()); $hotel_img = $hotels->hotelsImages(); //$img_list = ""; if ($hotel_img != '') { $hotel_img .= ',' . $upload->file_copy; $hotels->updateHotelsImages($hotel_img); //$img_list = $hotel_img; } else { $hotels->updateHotelsImages($upload->file_copy); //$img_list = $upload->file_copy; }
} if ($path == 'client') { $Sessions = new Sessions(); $members = new Members(); $members->setMemberId($_REQUEST['id']); $members->extractor($members->getMemberFromId()); unset($_SESSION['HTTP_PATH_SESSION']); $Sessions->logoutClient(); $Sessions->logoutMember(); $Sessions->setHotelsLoginSessions($hotel->hotelId()); $_SESSION['HTTP_PATH_SESSION'] = HTTP_PATH; if (!$Sessions->redirectIfNotLoggedInHotels()) { echo "true"; } } if ($path == 'hotels') { $Sessions = new Sessions(); $hotel = new Hotels(); $hotel->setHotelId($_REQUEST['id']); $hotel->extractor($hotel->getHotelFromId()); unset($_SESSION['HTTP_PATH_SESSION']); $Sessions->logoutClient(); $Sessions->logoutMember(); $Sessions->setHotelsLoginSessions($hotel->hotelId()); $_SESSION['HTTP_PATH_SESSION'] = HTTP_PATH; if (!$Sessions->redirectIfNotLoggedInHotels()) { echo "true"; } $Sessions->setEnableBackEndAgentRateView(); $Sessions->setEnableBackEndAgentSpclDiscountView(); }