403Webshell
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/prathamtour.com/application/modules/visa/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/prathamtour.com/application/modules/visa/controllers/IndexController.php
<?php

/* * *************************************************************
 * Catabatic Technology Pvt. Ltd.
 * File Name     : IndexController.php
 * File Desc.    : Index controller for home page front end
 * Created By    : Piyush Tiwari <piyush@catpl.co.in>
 * Created Date  : 27 June 2018
 * Updated Date  : ------------
 * ************************************************************* */

class Visa_IndexController extends Zend_Controller_Action {

    protected $objMdl;
    protected $tablename;
    protected $tablenameDestination;
    protected $baseUrl;
    protected $tollfreenumber;
    protected $objHelperGeneral;
    protected $per_page_record;
    public $_session;
    public $customerbookinglistAPIUrl;
    public $uploadPakcagePath;
    public $uploadDestinationPath;
    public $dummyImagePackage;
    public $dummyImageDestination;
    public $myNamespace;

    public function init() {
        parent::init();
        $aConfig = $this->getInvokeArg('bootstrap')->getOptions();
        $BootStrap = $aConfig['bootstrap'];

        $this->siteName = $BootStrap['siteName'];
		$this->gtxagencysysid = $BootStrap['gtxagencysysid'];
        $this->baseUrl = $BootStrap['siteUrl'];
        $this->tollfreenumber = $BootStrap['tollfreenumber'];

        $this->objMdl = new Admin_Model_CRUD();

        $this->tablename = "tb_tbb2c_packages_master";
        $this->tablenameTes = "tbl_testimonials";
        $this->tablenameDestination = "tb_tbb2c_destinations";
        $this->hotelTypeArr = ['Standard', 'Deluxe', 'Luxury'];

        $this->objHelperGeneral = $this->_helper->General;
        $this->per_page_record = 10;
        $this->_session = new Zend_Session_Namespace('User');

        $this->uploadPakcagePath = 'public/upload/tours/';
        $this->uploadDestinationPath = 'public/upload/destinations/';

        $this->dummyImagePackage = 'default-tour.jpg';
        $this->dummyImageDestination = 'default-destination.jpg';

        $this->enableCache = $BootStrap['enableCache'];
        $this->packageTypeStatic = $BootStrap['packageTypeDynamic'];


        $this->customerbookinglistAPIUrl = API_CUSTOMER_LIST; // from constant file

        $this->myNamespace = new Zend_Session_Namespace('MypopSess'); // get user end infomations
       // $this->_helper->layout->disableLayout();
        //$this->_helper->_layout->setLayout('layout-visa')->setLayoutPath(APPLICATION_PATH.'/layouts/scripts');
    }

    public function indexAction() {
      
        $geoCityData =  $this->objMdl->getAllCountyDetailForHomePage();

         $getPageDetail = $this->objMdl->rv_select_row('tbl_static_pages' , ['*'], ['identifier'=>'visa','AgencySysId'=>$this->gtxagencysysid,'status'=>'Activate'] , ['sid'=> 'desc'] );
      // echo"<pre>";print_r($getPageDetail);die('000');
        $this->view->getPageDetail    = $getPageDetail;

        
         $resultsetSeoForBlog = array();
        $resultsetSeoForBlog['TravTitle'] = $getPageDetail['page_title']; // get package Keyword
        $resultsetSeoForBlog['Keyword'] = $getPageDetail['meta_keywords']; // get package Keyword
        $resultsetSeoForBlog['Description'] = $getPageDetail['meta_description']; // get package Description
        $resultsetSeoForBlog['metaTitle'] = (trim($getPageDetail['meta_title']) != '') ? $getPageDetail['meta_title'] : $getPageDetail['page_title']; // get package Metatag
        //echo "<pre>";print_r($geoCityData);die;
      // $popularDestination = $this->objMdl->rv_select_all('tbl_countries', ['contSysId', 'title', 'Image', 'description','countryId'], ['IsActive' => 1, 'IsMarkForDel' => 0,'displayOnVisa' => 1,], ['title' => 'ASC']);
        $specialDeals = $this->objMdl->rv_select_all('tb_tbb2c_packages_master', ['PkgSysId', 'Image', 'GTXPkgId', 'Destinations', 'Countries', 'LongJsonInfo', 'StarRating','packageNameUrl','CountryIds'], ['IsActive' => 1, 'IsMarkForDel' => 0, 'ItemType' => 6,'IsFeatured'=>1], ['PkgSysId' => 'DESC'], 6);
        $testimonials = $this->objMdl->rv_select_all('tbl_testimonials', ['*'], [ 'status' => 1], ['id' => 'DESC'], 3);
        $HomeBannerDetail = $this->objMdl->rv_select_all('tb_homebanner_detail', ['*'], [ 'status' => 1], ['banner_id' => 'DESC']);
        $popularDestinationArray = array();
        $specialDealsArray = array();
     //   $countryCode = $this->objMdl->rv_select_all('tb_master_geo_country', ['contId','code'], [ 'isActive' => 1,'isMarkForDel'=>0], ['contId' => 'DESC']);
        $countryCodeArr = array();
        foreach($countryCode as $cKey => $cVal){
            $countryCodeArr[$cVal['contId']] = $cVal['code']; 
               
        }   
         // echo "<pre>";print_r($popularDestination);die;
        foreach ($popularDestination as $desKey => $desValue) {
            $popularDestinationArray[] = [
                'contSysId' =>$desValue['contSysId'],
                'Image' =>$desValue['Image'],
                'title' =>$desValue['title'],
                'description' =>$desValue['description'],
                'code' => $countryCodeArr[$desValue['countryId']],
            ]; 

        }
		$currencyTypeArray = $this->objHelperGeneral->getCurrencyData();
       //	echo "<pre>";print_r($specialDeals);die;
        foreach ($specialDeals as $dealKey => $dealValue) {
            //echo "<pre>";print_r($countryCode);die;
            $LongJsonInfo = Zend_Json::decode($dealValue['LongJsonInfo']);
            $VisaAdultRates = $LongJsonInfo['VisaAdultRates'] + $LongJsonInfo['Markup'][0]['MarkUp'] + $LongJsonInfo['Markup'][0]['ServiceProviderFee'];
            $specialDealsArray[] = [
                'PkgSysId' =>$dealValue['PkgSysId'],
                'GTXPkgId' =>$dealValue['GTXPkgId'],
                'VisaName' =>$LongJsonInfo['VisaName'],
                'Nationality' =>$LongJsonInfo['Nationality'],
                'VisaAdultRates' =>$VisaAdultRates,
               'CurrencyType' =>$currencyTypeArray[$LongJsonInfo['CurrencyType']],
                'Country' =>$LongJsonInfo['Country'],
                'PrecessingTime' =>$LongJsonInfo['PrecessingTime'],
                'packageNameUrl' =>$dealValue['packageNameUrl'],
                'searchUrl' =>strtolower(Catabatic_Helper::getSeoName(trim($LongJsonInfo['Country']))).'-visa/'.strtolower(Catabatic_Helper::getSeoName(trim($dealValue['packageNameUrl']))).'.html',
                'code' => $countryCodeArr[$dealValue['CountryIds']],
                ]; 
        }
        $resultsetBlog = array();
        $resultsetBlog = $this->objMdl->rv_select_all('tbl_travelogues', ['*'], ['isMarkForDel' => 0,'status'=>1,'displayOnBanner'=>1,'category'=>3], ['TravId' => 'DESC'], 10);
        

                
$checkDuplicateCountries = array();
	foreach($geoCityData as $cdKey => $cdVal){
		if(!in_array(trim($cdVal['CountryIds']),$checkDuplicateCountries)){
			$finalgeoCityData[] = $cdVal;	
			$checkDuplicateCountries[] = trim($cdVal['CountryIds']);
		}
		
	}
//echo "<pre>";print_r($checkDuplicateCountries);die;
        $this->view->bolglist = $resultsetBlog;
        $this->view->countryNameArray = $finalgeoCityData;
        $this->view->popularDestinationArray = $popularDestinationArray;
        $this->view->specialDealsArray = $specialDealsArray;
        $this->view->testimonials = $testimonials;
        $this->view->HomeBannerDetail = $HomeBannerDetail;
        $this->view->baseUrl = $this->baseUrl;
        $this->view->MobileDetect = $this->objHelperGeneral->getDevice();
        $this->view->region_names = $region_names;
    }

    public function destinationAction() {
        $destinations = $this->objMdl->getDestinationsHeader(['tbl.IsActive' => 1, 'tbl.IsPublish' => 1, 'tbl.IsMarkForDel' => 0, 'tb2.IsMarkForDel' => 0, 'tbl.DisplayOnHeader' => 1], ['tbl.DesSysId' => 'ASC'], 50);
        $region_names = $finalDestination = [];
        $region = trim($this->getRequest()->getParam('region'));
        foreach ($destinations as $key => $value) {
            if(isset($region) && !empty($region)){
                if($region == $value['region_name']){
            if (($value['region_name'] != NULL) && !in_array($value['region_name'], $region_names)) {
                $region_names[] = $value['region_name'];
            }

            $finalDestination[$value['region_name']][] = [
                'DesSysId' => $value['DesSysId'],
                'Title' => $value['Title'],
                'Image' => $value['Image'],
                'Tours' => $value['Tours'],
            ];
            }
            }
        }

        $this->view->baseUrl = $this->baseUrl;
        $this->view->finalDestination = $finalDestination;
        $this->view->region_names = $region_names;
      
    }

    public function saveLetterAction() {
        $this->view->layout()->disableLayout();
        $this->_helper->viewRenderer->setNoRender(true);
        if ($this->getRequest()->isPost()) {
            $param = $this->getRequest()->getParams();
            $date = new Zend_Date();
            $currentDate = $date->get('YYYY-MM-dd HH:mm:ss');
            $email = $param['email'];

            $newsletter = new Travel_Model_PackagesMaster();

            $savePageData = [
                'created_date' => $currentDate,
                'news_letter_email' => $email,
                'status' => 1,
            ];

            $resultset = $newsletter->checkLetter("tb_tbb2c_newsletter", ['*'], ['news_letter_email' => $savePageData['news_letter_email']]);

            if (isset($resultset) && !empty($resultset)) {
                $response = array('success' => false, 'msg' => 'This Email Id Already Exists!!!');
                echo json_encode($response);
                exit;
            } else {
                $returnId = $newsletter->sendNewsLetter('tb_tbb2c_newsletter', $savePageData);
                if ($returnId) {
                    $response = array('success' => true, 'msg' => 'Your query has been submitted successfully!');
                    echo json_encode($response);
                    exit;
                }
            }
        }
    }

    public function autosuggestdesAction() {
        try {
            $arrResponse = array();
            if ($this->getRequest()->getParam("term")) {
                $term = $this->getRequest()->getParam("term");
                $objDes = new Travel_Model_PackagesMaster();
                $arrResponse = $objDes->getDestinationAutoSuggest($term, $this->tablename);
            }
            //print_r($arrResponse);die('okkk');
            echo json_encode($arrResponse);
            exit;
        } catch (Exception $e) {
            $response = array('success' => false, 'msg' => $e->getMessage());
            echo json_encode($response);
            exit;
        }
    }

    public function autosuggestAction() {
        $this->_helper->viewRenderer->setNoRender(true);
        $this->_helper->layout->disableLayout();
        try {
            $arrResponse = array();
//            echo "<pre>";print_r($this->getRequest()->getParams());die('[here');
            if ($this->getRequest()->getParam("term") or $this->getRequest()->getParam("query")) {
                $term = $this->getRequest()->getParam("term") ? $this->getRequest()->getParam("term") : $this->getRequest()->getParam("query");
                $countryId = $this->getRequest()->getParam("countryId") ? $this->getRequest()->getParam("countryId") : '';

                $condCity = "AND Country like '" . $term . "%'";
                if (isset($countryId) && !empty($countryId)) {
                    $condCity .= " AND tbl.ContSysId = " . $countryId . "";
                }
                $arrResponse = $this->objMdl->getBuyHotelCityAutoSuggest($condCity);
            }
            echo json_encode($arrResponse);
            exit;
        } catch (Exception $e) {
            $response = array('success' => false, 'msg' => $e->getMessage());
            echo json_encode($response);
            exit;
        }
    }
    
    
    
    

    public function customerloginAction() {
        $request = Zend_Controller_Front::getInstance()->getRequest();
        if ($this->getRequest()->isPost()) {
            $data = $request->getPost();
            $this->_session->session = $data;
            $this->_redirect('customer/myprofile');
        }
    }

    public function logoutAction() {
        $storage = new Zend_Session_Namespace('User');
        $storage->unsetAll();
        $this->_redirect('/');
    }

    /*
     * writeSessionPopup is used to show the request a callback popup window after interval on landing page
     */

    public function writeSessionPopupAction() {
        $myNamespace = new Zend_Session_Namespace('MypopSess');
        $myNamespace->setPopup = true;
        $myNamespace->session_time = time();
        exit;
    }
    
    
    public function thankyouAction() {
         $this->view->baseUrl = $this->baseUrl;
         $this->view->siteName = $this->siteName;
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit