| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/maxurtrip/application/admin/controllers/ |
Upload File : |
<?php
/* * *************************************************************
* Catabatic Technology Pvt. Ltd.
* File Name : ContactusController.php
* File Desc. : Contactus controller managed all contact queries
* Created By : Ranvir Singh <twitter @ranvir2012>
* Created Date : 23 May 2017
* Updated Date : 23 May 2017
* ************************************************************* */
class Admin_BookingController extends Zend_Controller_Action
{
public $dbAdapter;
public $perPageLimit;
public $siteurl;
public $DIR_WRITE_MODE;
protected $tablenameRegion;
public function init()
{
/* Initialize db and session access */
$aConfig = $this->getInvokeArg('bootstrap')->getOptions();
$this->siteurl = $aConfig['bootstrap']['siteUrl'];
$this->appmode = $aConfig['bootstrap']['appmode'];
$this->per_page_record = 25;
$this->dbAdapter = Zend_Db_Table::getDefaultAdapter();
$auth = Zend_Auth::getInstance();
$authStorage = $auth->getStorage()->read();
$this->username = $authStorage->username;
$this->admin_type = $authStorage->role;
$this->current_time = time();
$this->imageUrl = (($this->appmode == 'MODE_BETA') ? 'beta/' : '') . 'public/upload/destinations/';
$this->regionImageUrl = (($this->appmode == 'MODE_BETA') ? 'beta/' : '') . 'public/upload/region/';
$this->imageCountryUrl = (($this->appmode == 'MODE_BETA') ? 'beta/' : '') . 'public/upload/country/';
$this->imageStateUrl = (($this->appmode == 'MODE_BETA') ? 'beta/' : '') . 'public/upload/state/';
$this->imagedestIconUrl = (($this->appmode == 'MODE_BETA') ? 'beta/' : '') . 'public/upload/destIcon/';
$this->DIR_WRITE_MODE = 0777;
$this->img_w_thumb = 64;
$this->img_h_thumb = 64;
$this->img_w_medium = 800;
$this->img_h_medium = 600;
$this->img_w_large = 1600;
$this->img_h_large = 500;
$this->banner_w_thumb = 256;
$this->banner_h_thumb = 64;
$this->banner_w_large = 1600;
$this->banner_h_large = 500;
$this->img_w_regionsmall = 180;
$this->img_h_regionsmall = 120;
$this->country_banner_w_large = 1600;
$this->country_banner_h_large = 550;
$this->img_w_destination_main = 350;
$this->img_h_destination_main = 275;
$this->tablenameRegion = "tbl_regions";
$this->tablenameContinent = "tbl_all_continent";
$_SERVER["DOCUMENT_ROOT"] = $_SERVER["DOCUMENT_ROOT"].'/holidaybazaar';
}
/**
* index() method is used to admin login for form call
* @param Null
* @return Array
*/
public function indexAction()
{
// die('test');
//Check admin logedin or not
$this->checklogin();
$crud = new Admin_Model_CRUD();
$flight_booking = $crud->rv_select_all('tbl_flight_booking', ['apiTraceId', 'status', 'JourneyType', 'created_at', 'CustomerSysId', 'TotalFlightMembers', 'AgencySysId', 'PNR_Number', 'BookingId', 'TravelDate', 'DestAirportCode', 'SourceAirportCode'], ['IsMarkForDel' => 0, 'status' => 1], ['id' => 'DESC']);
//echo "<pre>";print_r($flight_booking);die;
# Start : Pagination
$page = $this->_getParam('page', 1);
$resultset = Zend_Paginator::factory($flight_booking);
$resultset->setItemCountPerPage($this->per_page_record);
$resultset->setCurrentPageNumber($page);
# End : Pagination
$this->view->per_page_record = $this->per_page_record;
$this->view->page = $page;
$this->view->resultset = $resultset;
$this->view->messages = $this->_helper->flashMessenger->getMessages();
}
public function pendingAction()
{
// die('test123');
//Check admin logedin or not
$this->checklogin();
$crud = new Admin_Model_CRUD();
$flight_booking = $crud->rv_select_all('tbl_flight_booking', ['apiTraceId', 'status', 'JourneyType', 'created_at', 'CustomerSysId', 'TotalFlightMembers', 'AgencySysId', 'PNR_Number', 'BookingId', 'TravelDate', 'DestAirportCode', 'SourceAirportCode'], ['IsMarkForDel' => 0,'status!' => 1], ['id' => 'DESC']);
// echo "<pre>";print_r($flight_booking);die;
# Start : Pagination
$page = $this->_getParam('page', 1);
$resultset = Zend_Paginator::factory($flight_booking);
$resultset->setItemCountPerPage($this->per_page_record);
$resultset->setCurrentPageNumber($page);
# End : Pagination
$this->view->per_page_record = $this->per_page_record;
$this->view->page = $page;
$this->view->resultset = $resultset;
$this->view->messages = $this->_helper->flashMessenger->getMessages();
}
public function hotelAction()
{
//Check admin logedin or not
$this->checklogin();
$crud = new Admin_Model_CRUD();
$objFlight = new Travel_Model_FlightMaster();
$hotel_booking = $objFlight->getHotelsBookingList('tbl_hotel_booking');
//echo "<pre>";print_r($hotel_booking);die;
# Start : Pagination
$page = $this->_getParam('page', 1);
$resultset = Zend_Paginator::factory($hotel_booking);
$resultset->setItemCountPerPage($this->per_page_record);
$resultset->setCurrentPageNumber($page);
# End : Pagination
$this->view->per_page_record = $this->per_page_record;
$this->view->page = $page;
$this->view->resultset = $resultset;
$this->view->messages = $this->_helper->flashMessenger->getMessages();
}
public function hotelcancelAction()
{
//Check admin logedin or not
$this->checklogin();
$crud = new Admin_Model_CRUD();
$objFlight = new Travel_Model_FlightMaster();
$hotel_booking = $objFlight->getHotelsBookingList('tbl_hotel_booking',null,1);
//echo "<pre>";print_r($hotel_booking);die;
# Start : Pagination
$page = $this->_getParam('page', 1);
$resultset = Zend_Paginator::factory($hotel_booking);
$resultset->setItemCountPerPage($this->per_page_record);
$resultset->setCurrentPageNumber($page);
# End : Pagination
$this->view->per_page_record = $this->per_page_record;
$this->view->page = $page;
$this->view->resultset = $resultset;
$this->view->messages = $this->_helper->flashMessenger->getMessages();
}
public function checklogin()
{
if (($this->admin_type == "superadmin") || ($this->admin_type == "admin")) {
$auth = Zend_Auth::getInstance();
$hasIdentity = $auth->hasIdentity();
/* * ************* check admin identity *********** */
if (!$hasIdentity) {
$this->_redirect('admin/index/index');
}
} else {
$this->_redirect('admin/index/index');
}
}
}