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/myvisakit/application/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/myvisakit/application/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 IndexController extends Catabatic_CheckSession {

    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->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
    }

    public function indexAction() {
      
        $geoCityData =  $this->objMdl->getAllCountyDetailForHomePage();
        $offers = $this->objMdl->rv_select_all('tbl_offers', ['*'], ['isActive' => 1, 'isMarkForDel' => 0,'IsFeatured' => 1,'expiryDate>' => date('Y-m-d')], ['Id' => 'DESC']);
        $popularDestination = $this->objMdl->rv_select_all('tbl_countries', ['contSysId', 'title', 'Image', 'description','countryId'], ['IsActive' => 1, 'IsMarkForDel' => 0,'displayOnVisa' => 1,], ['title' => 'ASC']);
        $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']; 
        }
        
        foreach ($popularDestination as $desKey => $desValue) {
            $popularDestinationArray[] = [
                'contSysId' =>$desValue['contSysId'],
                'countryId' =>$desValue['countryId'],
                'Image' =>$desValue['Image'],
                'title' =>$desValue['title'],
                'description' =>$desValue['description'],
                'code' => $countryCodeArr[$desValue['countryId']],
            ]; 

        }
        
        $testimonials = $this->objMdl->rv_select_all('tbl_feedback', ['*'], [ 'IsActive' => 1,'displayOnHome'=>1], ['FeedbackId' => 'DESC']);
         //echo "<pre>"; print_r($testimonials); exit;
        $resultsetBlog = $this->objMdl->rv_select_blog_all_home('tbl_travelogues', ['*'], ['isMarkForDel' => 0,'status'=>1,'displayOnBanner'=>1], ['TravId' => 'DESC'], 10);
        $this->view->bolglist = $resultsetBlog;
        $this->view->popularDestinationArray = $popularDestinationArray;
        $this->view->countryNameArray = $geoCityData;
        $this->view->testimonials = $testimonials;
        $this->view->baseUrl = $this->baseUrl;
        $this->view->offers = $offers;
        $this->view->MobileDetect = $this->objHelperGeneral->getDevice();
    }
    public function searchvisaAction() {
        $this->view->layout()->disableLayout();
        $this->_helper->viewRenderer->setNoRender(true);
        if ($this->getRequest()->isPost()) {
            $param = $this->getRequest()->getParams();
            $sessionVisaSearchData = new Zend_Session_Namespace('sessionVisaSearchData');
            $sessionVisaSearchData->searchData = $param;
                $response = array('status' => true, 'msg' => 'success');
                echo json_encode($response);
                exit;
           
        }
    }
    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;
	     	
	    $model = new Gtxwebservices_Model_Webservices();
            $this->postFields = "";
            $this->postFields .= "&EmailId=" . trim($data['EmailId']);
            $this->postFields .= "&AgencySysId=" . $data['AgencySysId'];
            $this->postFields .= "&CustomerSysId=" . $data['CustomerSysId'];
            
	    $getVisaData = $model->getCustomerVisaDocumentDetail($this->postFields);
           	
            $getVisaDataArray = json_decode($getVisaData,1);

            if($getVisaDataArray){
                Zend_Controller_Action_HelperBroker::getStaticHelper('General')->createJsonFile( $getVisaDataArray , 'visa/'.$data['CustomerSysId'].'_customer_visa_document.json' );
            }
            $response = array('success' => true);
            echo json_encode($response);
            exit;
//                        echo "<pre>";print_r($getVisaDataArray);die;
//            $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;
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit