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/b2c.hellogtx.com/application/modules/cms/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2c.hellogtx.com/application/modules/cms/controllers/IndexController.php
<?php

class Cms_IndexController extends Catabatic_ValidateCustomer {

    public $baseUrl = '';
    protected $objMdl;
    public $smtpUserName;
    public $smtpPassword;
    public $smtpPort;
    public $smtpHost;
    public $AgencyId;
    public $tablenamePage;
    protected $db;

    public function init() {
        $this->objMdl = new Admin_Model_CRUD();
        $object = Zend_Controller_Front::getInstance();
        $this->action = $action = $object->getRequest()->getActionName();
        $this->modulename = $modulename = $object->getRequest()->getModuleName();

        $aConfig = $this->getInvokeArg('bootstrap')->getOptions();
        $BootStrap = $aConfig['bootstrap'];
        $this->view->stylecss = $this->stylecss = $BootStrap['stylecss'];
        $this->siteName = $BootStrap['siteName'];
        $this->elasticekey = $BootStrap['elasticekey'];
        $this->baseUrl = $BootStrap['siteUrl'];
        $this->gtxBtoBsite = $BootStrap['gtxBtoBsite'];
        $this->AgencyId = $BootStrap['gtxagencysysid'];
        $this->AgentSysId = $BootStrap['gtxagentsysid'];
        $this->LeadURL = $BootStrap['siteUrl'] . 'index/query';
        $this->tablename = 'tbl_enquiry';
        $this->tablenamePage = 'tbl_static_pages';
        $this->adminEmail = $BootStrap['adminEmail'];
        $this->objHelperGeneral = $this->_helper->General;

        $this->db = Zend_Db_Table::getDefaultAdapter();
    }

    public function indexAction() {

        $param = $this->getRequest()->getParams();
        //	echo "<pre>";print_r($param);die('test');
        $REQUEST_URI = str_replace('%E2%80%99', '’', ltrim($_SERVER['REQUEST_URI'], '/'));
        $pageid = $REQUEST_URI;
        //  print_r($REQUEST_URI);die;
        $model = new Admin_Model_CRUD();
        $getPageDetail = $model->rv_select_row($this->tablenamePage, ['*'], ['identifier' => $pageid, 'status' => 'Activate', 'isb2b' => 0], ['sid' => 'desc']);
        $getAboutUsDetailForContactUs = $model->rv_select_row($this->tablenamePage, ['page_description'], ['identifier' => 'about-us', 'status' => 'Activate'], ['sid' => 'desc']);
        // echo"<pre>";print_r($getPageDetail);die();
        /* SEO KEYWORD */
        $detailLayout = array();
        $detailLayout['Keyword'] = $getPageDetail['meta_keywords']; // get Keyword
        $detailLayout['Description'] = $getPageDetail['meta_description']; // get Description
        $detailLayout['metaTitle'] = $getPageDetail['meta_title']; // get name
        $tbl_branches = $this->objMdl->getAddress(['*'], ['tbl.status' => 1, 'tbl.IsMarkForDel' => 0], ['tbl.address' => 'DESC']);

        // echo "<pre>";print_r($tbl_branches);
        //   die;
        $finalThingstodo = array();
        $BranchArr = array();
        foreach ($tbl_branches as $key => $value) {
            if (!empty($value['address'])) {

                $BranchArr[$value['address_id']] = $value['address'];
            }
            $finalThingstodo[$value['address_id']][] = $value;
        }

        // echo "<pre>";print_r($finalThingstodo);
        // die;

        $showourteams = $this->objMdl->rv_select_all('tbl_ourpartner', ['*'], ['isMarkForDel' => 0], ['id' => 'ASC']);
        $this->view->showourteams = $showourteams;
        $this->view->ctrurl = $REQUEST_URI;

        $this->view->finalThingstodo = $finalThingstodo;
        $this->view->thingstodo_address = ($BranchArr);

        $getMypopCookie = Zend_Controller_Action_HelperBroker::getStaticHelper('General')->getMypopCookie('MyCookies'); // get the popup sessions
        $this->view->getMypopCookie = $getMypopCookie;
        $this->view->detailLayout = $detailLayout;
        $this->view->pagedetail = $getPageDetail;
        $this->view->getAboutUsDetailForContactUs = $getAboutUsDetailForContactUs;
        $this->view->baseUrl = $this->baseUrl;
        $this->view->siteName = $this->siteName;
        // echo "<pre>";print_r($getPageDetail);exit;
        if ($pageid == 'domestic-tour-packages') {
            $this->_redirect($this->baseUrl . 'tour-destination/domestic-tour-packages.html');
        } else if ($pageid == 'international-tour-packages') {
            $this->_redirect($this->baseUrl . 'tour-destination/international-tour-packages.html');
        }
    }

    public function sendenquiryAction() {
        if ($this->getRequest()->isPost()) {
            $param = $this->getRequest()->getParams();
            if (!empty($_SERVER['HTTP_CLIENT_IP'])) { // check ip from shared internet
				$user_ip = $_SERVER['HTTP_CLIENT_IP'];
			} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { // check ip passed from proxy
				$user_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
			} else {
				$user_ip = $_SERVER['REMOTE_ADDR'];
			} 
            $contactDetail_mail = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom')->getContactDetailForFooter();
            $contactDetail = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom')->getContactDetailForFooter();
            if (empty(trim($param['captcha']))) {
                $result = ['status' => false, 'message' => 'Please enter captcha code.'];
                echo Zend_Json::encode($result);
                exit;
            }
            if (strtolower($param['captcha']) != $_SESSION['captcha']) {
                $result = ['status' => false, 'message' => 'Captcha code invalid.'];
                echo Zend_Json::encode($result);
                exit;
            } else {
                $_SESSION['captcha'] = '';
                if (isset($param['name'])) {
                    $param['name'] = $param['name'];
                    $salutation = @$param['salutation'];
                } else {
                    $salutation = @$param['salutation'];
                    $fname = @$param['fname'];
                    $lname = @$param['lname'];
                    $param['name'] = $fname . ' ' . $lname;
                }
                $insertdata = [
                    'name' => $param['name'],
                    'email' => trim($param['email']),
                    'phone' => trim($param['mobile']),
                    'message' => $param['message'],
                    'PlanType' => (int) ($param['PlanType']),
                    'CurrencyType' => (int) ($param['CurrencyType']),
                    'CurrencyRequired' => (int) ($param['CurrencyRequired']),
                    'InventoryType' => $param['InventoryType'],
                    'DestinationPlaces' => $param['DestinationPlaces'],
                    'created_at' => date('Y-m-d h:i:s'),
                ];
                //echo"<pre>";print_r($insertdata);die();
                $FirstName = (isset($fname) && $fname != '') ? $fname : $param['name'];
                $LastName = (isset($lname) && $lname != '') ? $lname : '';
                $countryCode = isset($param['countrycode']) ? $param['countrycode'] : '+91';
                $message = (isset($param['remark']) && !empty($param['remark'])) ? $param['remark'] : $param['message'];
                $PlanType = (isset($param['PlanType'])) ? $param['PlanType'] : 5;
                $CurrencyType = (isset($param['CurrencyType'])) ? trim($param['CurrencyType']) : 'INR';
                $CurrencyRequired = (isset($param['CurrencyRequired'])) ? trim($param['CurrencyRequired']) : '';
                $salutation = (isset($param['salutation'])) ? $param['salutation'] : '';
                $InventoryType = (isset($param['InventoryType'])) ? trim($param['InventoryType']) : '1';
                $DestinationPlaces = (isset($param['DestinationPlaces'])) ? trim($param['DestinationPlaces']) : '';
                $package_destination = (isset($param['package_destination'])) ? $param['package_destination'] : '';
                $DestinationPlacesIds = (isset($param['package_destinationsId'])) ? $param['package_destinationsId'] : '';
                $packdate = (isset($param['date'])) ? $param['date'] : '';
                if ($param['willbookdays']) {
                    $bookdays = 'Will Book- ' . $param['willbookdays'];
                }
                if (!empty($param['hotelcategory'])) {
                    $hotelcategory = ' Hotel Category- ' . $param['hotelcategory'][0] . $param['hotelcategory'][1] . $param['hotelcategory'][2] . $param['hotelcategory'][3];
                }
                if ($param['preferredtime']) {
                    $preferredtime = ' Time to call- ' . $param['preferredtime'];
                }
                if ($param['tourtype']) {
                    $tourtype = ' Tour Type- ' . $param['tourtype'];
                }
                if ($param['message']) {
                    $requirements = ' Message- ' . $param['message'];
                }
                if ($param['thispackageurl']) {
                    $thispackageurl = ' Url- ' . $param['thispackageurl'];
                }
                $messageextra = $bookdays . $hotelcategory . $preferredtime . $tourtype . $requirements . $thispackageurl;
                $package_tpid = (isset($param['package_tpid'])) ? (int) $param['package_tpid'] : 0;
                if (!empty($package_destination)) {
                    $DestinationPlaces = $package_destination;
                }

                $FirstName = (isset($fname) && $fname != '') ? $fname : $param['name'];
                $LastName = (isset($lname) && $lname != '') ? $lname : '';
                $countryCode = isset($param['countrycode']) ? $param['countrycode'] : '+91';
                $message = (isset($param['remark']) && !empty($param['remark'])) ? $param['remark'] : $param['message'];
                $PlanType = (isset($param['PlanType'])) ? $param['PlanType'] : 5;
                $CurrencyType = (isset($param['CurrencyType'])) ? $param['CurrencyType'] : 'INR';
                $CurrencyRequired = (isset($param['CurrencyRequired'])) ? $param['CurrencyRequired'] : '';
                $InventoryType = (isset($param['InventoryType'])) ? $param['InventoryType'] : '1';
                $DestinationPlaces = (isset($param['DestinationPlaces'])) ? $param['DestinationPlaces'] : '';
                $TripType = (isset($param['TripType'])) ? $param['TripType'] : '';
                $Purpose = (isset($param['Purpose'])) ? $param['Purpose'] : '';
                $NoofDays = (isset($param['NoofDays'])) ? $param['NoofDays'] : '';
                //New Added  Feilds
                $ToDestination = (isset($param['ToDestination'])) ? $param['ToDestination'] : '';
                $traveldate = (isset($param['traveldate_flight'])) ? $param['traveldate_flight'] : '';
                $returndate = (isset($param['returndate'])) ? $param['returndate'] : '';
                $Destination = (isset($param['Destination'])) ? $param['Destination'] : '';
                $checkInDate = (isset($param['checkInDate'])) ? $param['checkInDate'] : '';
                $checkOutDate = ( isset($param['checkOutDate'])) ? $param['checkOutDate'] : '';
                $residence = ( isset($param['residence'])) ? $param['residence'] : '';
                $Service = (isset($param['Service'])) ? $param['Service'] : '';
                $Count = (isset($param['Count'])) ? $param['Count'] : '';
                $goingfrom = (isset($param['goingfrom'])) ? $param['goingfrom'] : '';
                $goingto = (isset($param['goingto'])) ? $param['goingto'] : '';
                $contactno = $contactDetail['whatsapp_no'];
                $callon = $param['mobile'];
                $custname = $param['fname'] . ' ' . $param['lname'];
                $custmail = $param['email'];
                $agencyDisplayName = $this->baseUrl;
                $NoofTraveler = $param['NoofTraveler'];

                //end
                // echo"<pre>";print_r($PlanType);die();
                if ($PlanType == 1) {
                    $this->postFields .= "&PlanType=" . (int) $PlanType;
                    $this->postFields .= "&AgencySysId=$this->AgencyId";
                    $this->postFields .= "&Salutation=" . $salutation;
                    $this->postFields .= "&FirstName=" . $FirstName;
                    $this->postFields .= "&LastName=" . $LastName;
                    $this->postFields .= "&CountryCode=" . $countryCode;
                    $this->postFields .= "&MobileNumber=" . $param['mobile'];
                    $this->postFields .= "&Email=" . $param['email'];
                    $this->postFields .= "&Destination=" . $param['Destination_flight'];
                    $this->postFields .= "&ToDestination=" . $ToDestination;
                    $this->postFields .= "&TripType=" . $param['TripType_1'];
                    $this->postFields .= "&traveldate=" . $traveldate;
                    $this->postFields .= "&returndate=" . $returndate;
                    $this->postFields .= "&NoofTraveler=" . $param['NoofTraveler'];
                    $this->postFields .= "&message=" . $message;
                    $this->postFields .= "&IPAddress=" . $user_ip;
                    $Destination_flight = $param['Destination_flight'];
                    $TripType = $param['TripType_1'];
                    $whatsappmessage = "*Dear Admin*,%0a%0aThanks for your flight query for $Destination_flight.%0a%0a*Name:* $FirstName $LastName %0a%0a*Source City:* $Destination_flight %0a%0a*Destination City:* $ToDestination %0a%0a*Trip Type:* $TripType %0a%0a*Travel Date:* $traveldate  %0a%0a*Return Date:* $returndate %0a%0a*No Of Pax:* $NoofTraveler  %0a%0a*Remarks:* $message   %0a%0aYou can also call  at $callon or email at %0a$custmail  or whatsapp me here.%0a%0aRegards %0a%0a$custname, %0a$agencyDisplayName";
                } else if ($PlanType == 2) {
                    $this->postFields .= "&PlanType=" . (int) $PlanType;
                    $this->postFields .= "&AgencySysId=$this->AgencyId";
                    $this->postFields .= "&Salutation=" . $salutation;
                    $this->postFields .= "&FirstName=" . $FirstName;
                    $this->postFields .= "&LastName=" . $LastName;
                    $this->postFields .= "&CountryCode=" . $countryCode;
                    $this->postFields .= "&MobileNumber=" . $param['mobile'];
                    $this->postFields .= "&Email=" . $param['email'];
                    $this->postFields .= "&ToDestination=" . $param['Destination'];
                    $this->postFields .= "&traveldate=" . $checkInDate;
                    $this->postFields .= "&returndate=" . $checkOutDate;
                    $this->postFields .= "&Nationality=" . $residence;
                    $this->postFields .= "&NoofTraveler=" . $param['NoofTraveler'];
                    $this->postFields .= "&message=" . $message;
					$this->postFields .= "&IPAddress=" . $user_ip;
                    $whatsappmessage = "*Dear Admin*,%0a%0aThanks for your hotel query for $Destination.%0a%0a*Name:* $FirstName $LastName %0a%0a*Destination:* $Destination  %0a%0a*CheckIn Date:* $checkInDate %0a%0a*CheckOut Date:* $checkOutDate %0a%0a*Nationality:* $residence %0a%0a*No Of Pax:* $NoofTraveler Adult(s)  %0a%0a*Remarks:* $message %0a%0aYou can also call  at $callon or email at %0a$custmail  or whatsapp me here.%0a%0aRegards %0a%0a$custname, %0a$agencyDisplayName";
                } else if ($PlanType == 5) {
                    $param['traveldate'] = isset($param['traveldate']) && !empty($param['traveldate']) ? $param['traveldate'] : $packdate;
                    $param['Destination'] = isset($param['Destination']) && !empty($param['Destination']) ? $param['traveldate'] : $package_destination;
                    $this->postFields .= "&PlanType=" . (int) $PlanType;
                    $this->postFields .= "&AgencySysId=$this->AgencyId";
                    $this->postFields .= "&Salutation=" . $salutation;
                    $this->postFields .= "&FirstName=" . $FirstName;
                    $this->postFields .= "&LastName=" . $LastName;
                    $this->postFields .= "&CountryCode=" . $countryCode;
                    $this->postFields .= "&MobileNumber=" . $param['mobile'];
                    $this->postFields .= "&Email=" . $param['email'];
                    $this->postFields .= "&traveldate=" . $param['traveldate'];
                    $this->postFields .= "&ToDestination=" . $param['Destination'];
                    $this->postFields .= "&NoofTraveler=" . $param['NoofTraveler'];
                    $this->postFields .= "&message=" . $message . $messageextra;
                    $Destination = $param['Destination'];
                    $TravelDate = $param['traveldate'];
                    $this->postFields .= "&packageSysId=" . $package_tpid;
					$this->postFields .= "&IPAddress=" . $user_ip;
                    $whatsappmessage = "*Dear Admin*,%0a%0aThanks for your package query for $Destination.%0a%0a*Name:* $FirstName $LastName %0a%0a*Destination:* $Destination  %0a%0a*Travel Date:* $TravelDate  %0a%0a*No Of Pax:* $NoofTraveler Adult(s)  %0a%0a*Remarks:* $message %0a%0aYou can also call  at $callon or email at %0a$custmail or whatsapp me here.%0a%0aRegards %0a%0a$custname, %0a$agencyDisplayName";
                    //print_r($messageextra);die;
                } else if ($PlanType == 6) {
                    $this->postFields .= "&PlanType=" . (int) $PlanType;
                    $this->postFields .= "&AgencySysId=$this->AgencyId";
                    $this->postFields .= "&Salutation=" . $salutation;
                    $this->postFields .= "&FirstName=" . $FirstName;
                    $this->postFields .= "&LastName=" . $LastName;
                    $this->postFields .= "&CountryCode=" . $countryCode;
                    $this->postFields .= "&MobileNumber=" . $param['mobile'];
                    $this->postFields .= "&Email=" . $param['email'];
                    $this->postFields .= "&traveldate=" . $param['traveldate'];
                    $this->postFields .= "&ToDestination=" . $DestinationPlaces;
                    $this->postFields .= "&NoofTraveler=" . $param['NoofTraveler'];
                    $this->postFields .= "&TripType=" . $param['TripType_2'];
                    $this->postFields .= "&Purpose=" . $Purpose;
                    $this->postFields .= "&NoofDays=" . $param['NoofDays_visa'];
                    $this->postFields .= "&message=" . $message;
                    $VisaCategory = $param['TripType_2'];
                    $TravelDate = $param['traveldate'];
                    $NoofDays = $param['NoofDays_visa'];
					$this->postFields .= "&IPAddress=" . $user_ip;
                    $whatsappmessage = "*Dear Admin*,%0a%0aThanks for your package visa for $DestinationPlaces. %0a%0a*Name:* $FirstName $LastName %0a%0a*Destination:* $DestinationPlaces %0a%0a*Visa Category:* $VisaCategory %0a%0a*No Of Pax:* $NoofTraveler Adult(s) %0a%0a*Travel Date:* $TravelDate %0a%0a*For Purpose:* $Purpose %0a%0a*Stay Length:* $NoofDays %0a%0a*Remarks:* $message  %0a%0aRegards %0a%0a$custname, %0a$agencyDisplayName";
                } else if ($PlanType == 9) {

                    $this->postFields .= "&PlanType=" . (int) $PlanType;
                    $this->postFields .= "&AgencySysId=$this->AgencyId";
                    $this->postFields .= "&Salutation=" . $salutation;
                    $this->postFields .= "&FirstName=" . $FirstName;
                    $this->postFields .= "&LastName=" . $LastName;
                    $this->postFields .= "&CountryCode=" . $countryCode;
                    $this->postFields .= "&MobileNumber=" . $param['mobile'];
                    $this->postFields .= "&Email=" . $param['email'];
                    $this->postFields .= "&ToDestination=" . $param['Destination'];
                    $this->postFields .= "&traveldate=" . $param['traveldate'];
                    $this->postFields .= "&NoofTraveler=" . $param['NoofTraveler'];
                    $this->postFields .= "&message=" . $message;
                    $Destination = $param['Destination'];
                    $TravelDate = $param['traveldate'];
					$this->postFields .= "&IPAddress=" . $user_ip;
                    $whatsappmessage = "*Dear Admin*,%0a%0aThanks for your sightseeing query for $Destination.%0a%0a*Name:* $FirstName $LastName %0a%0a*Destination:* $Destination  %0a%0a*Travel Date:* $TravelDate  %0a%0a*No Of Pax:* $NoofTraveler Adult(s)  %0a%0a*Remarks:* $message %0a%0aYou can also call  at $callon or email at %0a$custmail  or whatsapp me here.%0a%0aRegards %0a%0a$custname, %0a$agencyDisplayName";
                } else if ($PlanType == 10) {
                    $remark = '';
                    if ($CurrencyType != '') {
                        $remark .= 'Currency:' . $CurrencyType . ', ';
                    }
                    if ($CurrencyRequired != '') {
                        $remark .= 'Amount:' . $CurrencyRequired . ', ';
                    }
                    if ($InventoryType != '') {
                        $remark .= 'Inventory Type:' . $InventoryType;
                    }
                    if ($Count != '') {
                        $remark .= 'Count:' . $Count;
                    }
                    $this->postFields .= "&PlanType=" . (int) $PlanType;
                    $this->postFields .= "&AgencySysId=$this->AgencyId";
                    $this->postFields .= "&Salutation=" . $salutation;
                    $this->postFields .= "&CountryCode=" . $countryCode;
                    $this->postFields .= "&FirstName=" . $FirstName;
                    $this->postFields .= "&LastName=" . $LastName;
                    $this->postFields .= "&CountryCode=" . $countryCode;
                    $this->postFields .= "&MobileNumber=" . $param['mobile'];
                    $this->postFields .= "&Email=" . $param['email'];
                    $this->postFields .= "&ToDestination=" . $DestinationPlaces;
                    $this->postFields .= "&traveldate=" . $param['traveldate'];
                    $this->postFields .= "&NoofTraveler=" . $param['NoofTraveler'];
                    $this->postFields .= "&Purpose=" . $Service;
                    $this->postFields .= "&message=" . $remark . ' ' . $message;
                    $TravelDate = $param['traveldate'];
                    $Destination = $param['Destination'];
					$this->postFields .= "&IPAddress=" . $user_ip;
                    $whatsappmessage = "*Dear Admin*,%0a%0aThanks for your misecellaneous query for $Destination.%0a%0a*Name:* $FirstName $LastName %0a%0a*Destination:* $Destination  %0a%0a*Travel Date:* $TravelDate %0a%0a*Service:* $Service %0a%0a*Count:* $Count %0a%0a*No Of Pax:* $NoofTraveler Adult(s) %0a%0a*Remarks:* $message  %0a%0aYou can also call  at $callon or email at %0a$custmail  or whatsapp me here.%0a%0aRegards %0a%0a$custname, %0a$agencyDisplayName";
                } else if ($PlanType == 11) {
                    $this->postFields .= "&AgencySysId=$this->AgencyId";
                    $this->postFields .= "&Salutation=" . $salutation;
                    $this->postFields .= "&FirstName=" . $FirstName;
                    $this->postFields .= "&LastName=" . $LastName;
                    $this->postFields .= "&CountryCode=" . $countryCode;
                    $this->postFields .= "&MobileNumber=" . $param['mobile'];
                    $this->postFields .= "&Email=" . $param['email'];
                    $this->postFields .= "&PlanType=" . (int) $PlanType;
                    $this->postFields .= "&TripType=" . $param['TripType_3'];
                    $this->postFields .= "&ToDestination=" . $goingto;
                    $this->postFields .= "&Destination=" . $goingfrom;
                    $this->postFields .= "&NoofDays=" . $NoofDays;
                    $this->postFields .= "&traveldate=" . $param['traveldate'];
                    $this->postFields .= "&NoofTraveler=" . $param['NoofTraveler'];
                    $this->postFields .= "&message=" . $message;
                    $TravelDate = $param['traveldate'];
                    $TripType = $param['TripType_3'];
					$this->postFields .= "&IPAddress=" . $user_ip;
                    $whatsappmessage = "*Dear Admin*,%0a%0aThanks for your Transfer query for $goingfrom.%0a%0a*Name:* $FirstName $LastName %0a%0a*Going From:* $goingfrom %0a%0a*Going To:* $goingto %0a%0a*Trip Type:* $TripType %0a%0a*Travel Date:* $TravelDate %0a%0a*No. of Days:* $NoofDays  %0a%0a*No Of Pax:* $NoofTraveler Adult(s) %0a%0a*Remarks:* $message  %0a%0aYou can also call  at $callon or email at %0a$custmail  or whatsapp me here.%0a%0aRegards %0a%0a$custname, %0a$agencyDisplayName";
                }

//				$this->postFields .= "&packageSysId=" . $package_tpid;
                // echo"<pre>";print_r( $this->postFields);die('here');
                //            $resultset = $this->objMdl->rv_insert($this->tablename, $insertdata);

                if (isset($param['form_type']) && (trim($param['form_type']) == 'contact_us')) {
                    $message = "Your query has been sent successfully.";
                    $status = true;
                } else {
                    //    echo '<pre>';print_r($this->postFields);die('ddd');
                    try {
                        $model = new Gtxwebservices_Model_Webservices();
                        $getPackagesData = $model->sendLead($this->postFields);
                        $getPackagesDataArr = json_decode($getPackagesData, 1);

                        $message = "Your query has been sent successfully.";
                        $status = true;
                    } catch (Zend_Exception $error) {
                        $message = $this->view->error_msg = $error->getMessage();
                        $status = false;
                    }
                }

                $MypopC = [
                    'salutation' => $param['salutation'],
                    'fname' => $param['fname'],
                    'lname' => $param['lname'],
                    'name' => $param['name'],
                    'email' => $param['email'],
                    'countrycode' => $param['countrycode'],
                    'mobile' => $param['mobile'],
                    'from_destination_id' => $param['from_destination_id'],
                    'from_destination' => $param['from_destination'],
                    'from_destination_name' => $param['from_destination_name'],
                    'date' => $param['date'],
                    'message' => $param['remark'] . ' ' . $param['thispackageurl'],
                    'PlanType' => $param['PlanType'],
                    'CurrencyType' => (int) ($param['CurrencyType']),
                    'CurrencyRequired' => (int) ($param['CurrencyRequired']),
                    'InventoryType' => $param['InventoryType'],
                    'DestinationPlaces' => $param['DestinationPlaces'],
                    'IPAddress' => $user_ip,
                        // 'room' => isset($param['room']) && !empty($param['room']) ? count($param['room']) : '',
                        // 'adult' => isset($param['adult']) && !empty($param['adult']) ? implode(",", $param['adult']) : '',
                        // 'adult_bed_type' => isset($param['adult_bed_type']) && !empty($param['adult_bed_type']) ? implode(",", $param['adult_bed_type']) : '',
                        // 'child' => isset($param['child']) && !empty($param['child']) ? implode(",", $param['child']) : '',
                        // 'child1_bed_type' => isset($param['child1_bed_type']) && !empty($param['child1_bed_type']) ? implode(",", $param['child1_bed_type']) : '',
                        // 'child2_bed_type' => isset($param['child2_bed_type']) && !empty($param['child2_bed_type']) ? implode(",", $param['child2_bed_type']) : '',
                        // 'infant' => isset($param['infant']) && !empty($param['infant']) ? implode(",", $param['infant']) : '',
                ];
                // echo "<pre>";print_r($MypopC);die;
                //setcookie("MyCookies", json_encode($MypopC), time() + (3600 * 24 * 2), "/");
                setcookie("MyCookies", json_encode($MypopC), time() + (3600 * 24 * 2), "/");

                $result = ['status' => true, 'message' => $message, 'name' => $param['name'], 'leadID' => $getPackagesDataArr['leadID'], 'contactno' => $contactno, 'whatsappmessage' => $whatsappmessage];

                echo Zend_Json::encode($result);
                exit;
            }
        } else {
            $result = ['status' => false, 'message' => 'Unable to send enquiry'];
            echo Zend_Json::encode($result);
            exit;
        }
    }

    public function sendQueryDetailsAction() {

        $this->_helper->layout()->disableLayout('');
        $this->_helper->viewRenderer->setNoRender(true);
        if ($this->getRequest()->isPost()) {
			exit('sendQueryDetails');
            $param = $this->getRequest()->getParams();
            $contactDetail_mail = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom')->getContactDetailForFooter();

            //echo "<pre>";print_r($param);die;
            //check if any of the inputs are empty
            if (empty($param['fname']) || empty($param['email']) || empty($param['mobile'])) {
                $result = ['status' => false, 'message' => 'Please fill out the form completely.'];
            } else {

                $queryArr = array(
                    'AgencySysId' => $this->AgencyId,
                    'AgentSysId' => $this->AgentSysId,
                    'AgencyName' => '',
                    'Destination' => isset($param['Destination']) && !empty($param['Destination']) ? $param['Destination'] : '',
                    'DestinationID' => isset($param['DestinationID']) && !empty($param['DestinationID']) ? $param['DestinationID'] : '',
                    'PlanType' => isset($param['planType']) && !empty($param['planType']) ? $param['planType'] : '',
                    'Email' => $param['email'],
                    'MobileNumber' => $param['mobile'],
                    'FirstName' => $param['name'],
                    'LastName' => '',
                    'NoofTraveler' => '2',
                    'PKGCheckInDate' => date('m/d/Y'),
                    'Noofdays' => '2',
                    'remark' => '',
                );

                try {

                    $curl = curl_init($this->gtxBtoBsite . "gtxwebservices/b2b-query"); // b2c demo site url
                    curl_setopt($curl, CURLOPT_POST, true);
                    curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($queryArr));
                    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
                    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

                    $response = curl_exec($curl);

                    $message = "Your query has been sent successfully.";
                    $status = true;
                    curl_close($curl);
                } catch (Exception $ex) {
                    $message = $this->view->error_msg = $ex->getMessage();
                    $status = false;
                }
                $flname = explode(' ', $param['name']);
                $MypopC = [
                    'name' => $param['name'],
                    'fname' => $flname[0],
                    'lname' => $flname[1],
                    'email' => $param['email'],
                    'mobile' => $param['mobile'],
                ];

                setcookie("MyCookies", json_encode($MypopC), time() + (3600 * 24 * 2), "/");

                $result = ['status' => $status, 'message' => $message];

                $params = array('param' => $param, 'baseUrl' => $this->baseUrl, 'callusnumber' => $this->callusnumber, 'emailId' => $this->contactEmail, 'contactDetail_mail' => $contactDetail_mail, 'siteName' => $this->siteName);

                $cust_subject = 'Thanks for contacting us';
                $cust_html = new Zend_View();
                $cust_html->setScriptPath(APPLICATION_PATH . '/views/');
                $cust_html->assign($params);
                $cust_mailBody = $cust_html->render('customer_mail_master.phtml');

                $cust_configs = [
                    'to' => trim($param['email']),
                    'fromName' => $this->siteName,
                    'fromEmail' => $contactDetail_mail['email'],
                    'subject' => $cust_subject,
                    'bodyHtml' => $cust_mailBody,
                ];

               // $cust_Mail = $this->objHelperGeneral->mailSentByElastice($cust_configs, 'Package');

                $admin_subject = 'New Request for Callback';
                $admin_html = new Zend_View();
                $admin_html->setScriptPath(APPLICATION_PATH . '/views/');
                $admin_html->assign($params);
                $admin_mailBody = $admin_html->render('admin_mail_master.phtml');

                $admin_configs = [
                    'to' => $contactDetail_mail['email'],
                    'fromName' => $this->siteName,
                    'fromEmail' => $contactDetail_mail['email'],
                    'subject' => $admin_subject,
                    'bodyHtml' => $admin_mailBody,
                ];

                //$admin_Mail = $this->objHelperGeneral->mailSentByElastice($admin_configs, 'Package');
            }
        } else {

            $result = ['status' => false, 'message' => 'Invalid Request!'];
        }

        echo Zend_Json::encode($result);
        exit;
    }

    public function sendVisaEnquiryAction() {

        $this->_helper->layout()->disableLayout('');
        $this->_helper->viewRenderer->setNoRender(true);
        if ($this->getRequest()->isPost()) {

            $param = $this->getRequest()->getParams();
            $contactDetail_mail = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom')->getContactDetailForFooter();

            //echo "<pre>";print_r($param);die;
            //check if any of the inputs are empty
            if (empty($param['name']) || empty($param['email']) || empty($param['mobile'])) {
                $result = ['status' => false, 'message' => 'Please fill out the form completely.'];
            } else {

                $queryArr = array(
                    'AgencySysId' => $this->AgencyId,
                    'AgentSysId' => $this->AgentSysId,
                    'AgencyName' => '',
                    'country' => isset($param['country']) && !empty($param['country']) ? $param['country'] : '',
                    'visatype' => isset($param['visatype']) && !empty($param['visatype']) ? $param['visatype'] : '',
                    'purpose' => isset($param['purpose']) && !empty($param['purpose']) ? $param['purpose'] : '',
                    'Email' => $param['email'],
                    'MobileNumber' => $param['mobile'],
                    'Name' => $param['name'],
                    'staylength' => isset($param['staylength']) && !empty($param['staylength']) ? $param['staylength'] : '',
                    'NoofTraveler' => isset($param['NoofTraveler']) && !empty($param['NoofTraveler']) ? $param['NoofTraveler'] : '',
                    'PKGCheckInDate' => date('m/d/Y'),
                    'remark' => isset($param['remark']) && !empty($param['remark']) ? $param['remark'] : '',
                );

                $params = array('param' => $param, 'baseUrl' => $this->baseUrl, 'callusnumber' => $this->callusnumber, 'emailId' => $this->contactEmail, 'contactDetail_mail' => $contactDetail_mail, 'siteName' => $this->siteName);

                $cust_subject = 'Thanks for contacting us';
                $cust_html = new Zend_View();
                $cust_html->setScriptPath(APPLICATION_PATH . '/views/');
                $cust_html->assign($params);
                $cust_mailBody = $cust_html->render('customer_mail_master.phtml');

                $cust_configs = [
                    'to' => trim($param['email']),
                    'fromName' => $this->siteName,
                    'fromEmail' => $contactDetail_mail['email'],
                    'subject' => $cust_subject,
                    'bodyHtml' => $cust_mailBody,
                ];

                //$cust_Mail = $this->objHelperGeneral->mailSentByElastice($cust_configs, 'visa');

                $admin_subject = 'New Request for Visa Callback';
                $admin_html = new Zend_View();
                $admin_html->setScriptPath(APPLICATION_PATH . '/views/');
                $admin_html->assign($params);
                $admin_mailBody = $admin_html->render('visa_admin_mail_master.phtml');

                $admin_configs = [
                    'to' => $contactDetail_mail['email'],
                    'fromName' => $this->siteName,
                    'fromEmail' => trim($param['email']),
                    'subject' => $admin_subject,
                    'bodyHtml' => $admin_mailBody,
                ];

                //$admin_Mail = $this->objHelperGeneral->mailSentByElastice($admin_configs, 'visa');
                $result = ['status' => true, 'message' => 'Send Successfully'];
            }
        } else {

            $result = ['status' => false, 'message' => 'Invalid Request!'];
        }

        echo Zend_Json::encode($result);
        exit;
    }

    public function aboutDetailsAction() {

        //         $aboutResult = $this->objMdl->getCmsdata($this->tableabout, ['*'], ['AboutId'=>$pId], ['AboutId'=>'DESC']);
        $aboutResult = $this->objMdl->rv_select_all($this->tableabout, ['*'], ['status' => 1, 'isMarkForDel' => 0], ['AboutId' => 'DESC'], 4);
        $this->view->aboutResult = $aboutResult;

        $this->view->baseUrl = $this->baseUrl;
        $this->view->CONST_YEAR_NAME = $this->CONST_YEAR_NAME;
    }

    public function getHotelDetailAction() {

        $this->_helper->layout()->disableLayout();
        if ($this->getRequest()->isXmlHttpRequest()) {
            if ($this->getRequest()->isPost()) {
                $param = $this->getRequest()->getParams();
                $hotelId = $param['hotelId'];
                $type = $param['type'];
                $categoryId = $param['categoryId'];
                $packageId = $param['packageId'];
                $gtxID = $param['gtxID'];
                $model = new Detail_Model_PackageMapper();
                if ($type == 'H') {
                    $getDetail = $model->fetchHotelDetails($categoryId, $gtxID, $packageId, $hotelId);
                } else if ($type == 'A') {
                    $getDetail = $model->fetchActivityDetails($categoryId, $gtxID, $packageId, $hotelId);
                } else {
                    $getDetail = $model->fetchSightSeeingDetails($categoryId, $gtxID, $packageId, $hotelId);
                }
                $this->view->type = $type;
                $this->view->hotelData = $getDetail;
                $this->view->baseUrl = $this->baseUrl;
            }
        }
    }

    public function covidAction() {
        $model = new Admin_Model_CRUD();
        $getPageDetail = $model->rv_select_row($this->tablenamePage, ['*'], ['identifier' => $pageid, 'status' => 'Activate', 'isb2b' => 0], ['sid' => 'desc']);
        $covidResult = $model->rv_select_row($this->tablenamePage, ['page_description'], ['identifier' => 'about-us', 'status' => 'Activate'], ['sid' => 'desc']);

        /* SEO KEYWORD */
        $detailLayout = array();
        $detailLayout['Keyword'] = $getPageDetail['meta_keywords']; // get Keyword
        $detailLayout['Description'] = $getPageDetail['meta_description']; // get Description
        $detailLayout['metaTitle'] = $getPageDetail['meta_title']; // get name

        $getMypopCookie = Zend_Controller_Action_HelperBroker::getStaticHelper('General')->getMypopCookie('MyCookies'); // get the popup sessions
        $this->view->getMypopCookie = $getMypopCookie;
        $this->view->detailLayout = $detailLayout;
        $this->view->pagedetail = $getPageDetail;
        $this->view->covidResult = $covidResult;
        $this->view->baseUrl = $this->baseUrl;
        $this->view->siteName = $this->siteName;
    }

    public function getgeocityAction() {
        $param = $this->getRequest()->getParams();
        $model = new Admin_Model_CRUD();
        $select = $this->db->select()->from("tb_master_geo_city", "*");
        $select->where('Title LIKE ?', '%' . $param['term'] . '%');
        //$select->where('Title=?', $param['term']);
        $select->where("IsMarkForDel=?", 0);
        $select->where("IsActive=?", 1);
        $result = $this->db->fetchAll($select);
        //echo"<pre>";print_r($result);die;
        $dataArr = [];
        if ($result) {
            foreach ($result as $key => $value) {
                $dataArr[] = array(
                    'label' => $value['Title'],
                    'value' => $value['Title'],
                    'id' => $value['CityId'],
                    'ContId' => $value['ContSysId'],
                    'countryName' => $value['Country'],
                );
            }
        }
        echo json_encode($dataArr);
        exit;
        //print_r($dataArr);die;
    }

    public function mediaAction() {
        $this->view->baseUrl = $this->baseUrl;
        $this->objMdl = new Admin_Model_CRUD();
        $mediagallery = $this->objMdl->rv_select_all('tbl_home_exploregallery', ['*'], ['IsActive' => 1, 'isMarkForDel' => 0, 'type' => 1], ['id' => 'DESC'], 15);
        // echo "<pre>"; print_r($mediagallery); die();
        $mediavideo = $this->objMdl->rv_select_all('tbl_home_exploregallery', ['*'], ['IsActive' => 1, 'isMarkForDel' => 0, 'type' => 2], ['id' => 'DESC'], 15);
        $staticdataMedia = $this->objMdl->rv_select_row('tbl_static_pages', ['*'], ['sid' => 12, 'status' => 'Activate'], ['sid' => 'desc']);

        $categorymaster = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom')->categorymaster();

        //echo "<pre>"; print_r($categorymaster); die();
        $allverticalArray = $allCategoryArray = $masterData = array();
        foreach ($categorymaster as $key => $masterVal) {

            $allverticalArray[$masterVal['type']] = $masterVal['categaryName'];
            // $allCategoryArray[$masterVal['type']][$masterVal['Id']] = $masterVal['title'];
            $masterData[$masterVal['type']][$masterVal['categoryId']]['catTitle'] = $masterVal['categaryName'];
            $masterData[$masterVal['type']][$masterVal['categoryId']]['catImg'] = $masterVal['categaryImage'];
            $masterData[$masterVal['type']][$masterVal['categoryId']]['masterCatId'] = $masterVal['categoryId'];

            $masterData[$masterVal['type']][$masterVal['categoryId']]['data'][] = $masterVal;

            // if($masterVal['type']==1) {
            //     $mediagallery1[] = [
            //          'id' =>   $masterVal['id'],       
            //          'title' => $masterVal['title'],                 
            //          'gallery' => $masterVal['gallery'],                
            //          'type' =>    $masterVal['type'],            
            //          'IsActive' =>   $masterVal['IsActive'],              
            //          'IsmarkForDel' =>  $masterVal['IsmarkForDel'],               
            //          'IsFeatured' =>$masterVal['IsFeatured'], 
            //          'categoryId' =>    $masterVal['categoryId'],             
            //          'Id' => $masterVal['Id'], 
            //          'categaryName' =>$masterVal['categaryName'], 
            //          'categaryImage' =>    $masterVal['categaryImage'],            
            //    ];
            // }  else {
            //     $mediavideo1[] = [
            //          'id' =>   $masterVal['id'],       
            //          'title' => $masterVal['title'],                 
            //          'video' => $masterVal['video'],                
            //          'type' =>    $masterVal['type'],            
            //          'IsActive' =>   $masterVal['IsActive'],              
            //          'IsmarkForDel' =>  $masterVal['IsmarkForDel'],               
            //          'IsFeatured' =>$masterVal['IsFeatured'], 
            //          'categoryId' =>    $masterVal['categoryId'],             
            //          'Id' => $masterVal['Id'], 
            //          'categaryName' =>$masterVal['categaryName'], 
            //          'categaryImage' =>    $masterVal['categaryImage'],            
            //    ];
            // }
        } //end foreach 
        //  echo "<pre>"; print_r($masterData); die("");


        $this->view->masterData = $masterData;

        $this->view->staticdataMedia = $staticdataMedia;
        $this->view->mediagallery = $mediagallery;
        $this->view->mediavideo = $mediavideo;
    }

    public function addpassportAction() {
        if ($this->getRequest()->isPost()) {
            $param = $this->getRequest()->getParams();
            echo "<pre>";
            print_r($param);
            die();
            $contactDetail_mail = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom')->getContactDetailForFooter();

            if (isset($param['captcha']) && strtolower($param['captcha']) != $_SESSION['captcha_contact']) {
                $result = ['status' => 'captcha', 'message' => 'Captcha code invalid.'];
                echo Zend_Json::encode($result);
                exit;
            } else {
			 $_SESSION['captcha'] = '';
                if (isset($param['name'])) {
                    $param['name'] = $param['name'];
                } else {
                    $salutation = @$param['salutation'];
                    $fname = @$param['fname'];
                    $lname = @$param['lname'];
                    $param['name'] = $fname . ' ' . $lname;
                }
                $insertdata = [
                    'name' => $param['name'],
                    'email' => trim($param['email']),
                    'phone' => trim($param['mobile']),
                    'message' => $param['message'],
                    'created_at' => date('Y-m-d h:i:s'),
                ];
                $FirstName = (isset($fname) && $fname != '') ? $fname : $param['name'];
                $LastName = (isset($lname) && $lname != '') ? $lname : '';
                $countryCode = isset($param['countrycode']) ? $param['countrycode'] : '+91';
                $this->postFields = "";
                $this->postFields .= "&AgencySysId=$this->AgencyId";
                $this->postFields .= "&Salutation=" . $salutation;
                $this->postFields .= "&CountryCode=" . $countryCode;
                $this->postFields .= "&FirstName=" . $FirstName;
                $this->postFields .= "&LastName=" . $LastName;
                $this->postFields .= "&message=" . $param['message'];
                $this->postFields .= "&Email=" . $param['email'];
                $this->postFields .= "&MobileNumber=" . $param['mobile'];
                //            $resultset = $this->objMdl->rv_insert($this->tablename, $insertdata);

                if (isset($param['form_type']) && (trim($param['form_type']) == 'contact_us')) {
                    $message = "Your query has been sent successfully.";
                    $status = true;
                } else {
                    try {
                        $model = new Gtxwebservices_Model_Webservices();
                        $getPackagesData = $model->sendLead($this->postFields);

                        // echo "<pre>";print_r($getPackagesData);exit;

                        $message = "Your query has been sent successfully.";
                        $status = true;
                    } catch (Zend_Exception $error) {
                        $message = $this->view->error_msg = $error->getMessage();
                        $status = false;
                    }
                }

                $MypopC = [
                    'Salutation' => $param['salutation'],
                    'fname' => $param['fname'],
                    'lname' => $param['lname'],
                    'name' => $param['name'],
                    'email' => $param['email'],
                    'countrycode' => $param['countrycode'],
                    'mobile' => $param['mobile'],
                    'from_destination_id' => $param['from_destination_id'],
                    'from_destination' => $param['from_destination'],
                    'from_destination_name' => $param['from_destination_name'],
                    'date' => $param['date'],
                        // 'room' => isset($param['room']) && !empty($param['room']) ? count($param['room']) : '',
                        // 'adult' => isset($param['adult']) && !empty($param['adult']) ? implode(",", $param['adult']) : '',
                        // 'adult_bed_type' => isset($param['adult_bed_type']) && !empty($param['adult_bed_type']) ? implode(",", $param['adult_bed_type']) : '',
                        // 'child' => isset($param['child']) && !empty($param['child']) ? implode(",", $param['child']) : '',
                        // 'child1_bed_type' => isset($param['child1_bed_type']) && !empty($param['child1_bed_type']) ? implode(",", $param['child1_bed_type']) : '',
                        // 'child2_bed_type' => isset($param['child2_bed_type']) && !empty($param['child2_bed_type']) ? implode(",", $param['child2_bed_type']) : '',
                        // 'infant' => isset($param['infant']) && !empty($param['infant']) ? implode(",", $param['infant']) : '',
                ];
                // echo "<pre>";print_r($MypopC);die;
                //setcookie("MyCookies", json_encode($MypopC), time() + (3600 * 24 * 2), "/");
                setcookie("MyCookies", json_encode($MypopC), time() + (3600 * 24 * 2), "/");
                $result = ['status' => true, 'message' => $message, 'name' => $param['name']];

                echo Zend_Json::encode($result);
                exit;
            }
        } else {
            $result = ['status' => false, 'message' => 'Unable to send enquiry'];
            echo Zend_Json::encode($result);
            exit;
        }
    }

    public function thankyouAction() {
        $this->view->baseUrl = $this->baseUrl;
        $this->tablename = "tb_tbb2c_packages_master";
        $this->tablenameDestination = "tb_tbb2c_destinations";
        $param = $this->getRequest()->getParams();
        $this->view->getParams = $param;
        $this->view->CurrencyTitle = $this->CurrencyTitle;
        $result = $this->objMdl->getCmsdata('tbl_home_common_box', ['*'], ['home_common_id' => 1], ['home_common_id' => 'DESC']);
        $popularTourContent = json_decode($result->popularTourContent, 1);
        $destinationContent = json_decode($result->destinationContent, 1);
        $perfectTourContent = json_decode($result->perfectTourContent, 1);
        $blogContent = json_decode($result->blogContent, 1);
        $offersContent = json_decode($result->offersContent, 1);
        $whychooseusContent = json_decode($result->whychooseusContent, 1);
        $happycustomerContent = json_decode($result->happycustomerContent, 1);
        $otherUsefulContent = json_decode($result->otherUsefulContent, 1);
        $interestingFactsContent = json_decode($result->interestingFactsContent, 1);

        $homeContentdata["internationalTourTitle"] = $popularTourContent['internationalTourTitle'];
        $homeContentdata["internationalTourDescription"] = $popularTourContent['internationalTourDescription'];
        $homeContentdata["international_check"] = $popularTourContent['international_check'];
        $homeContentdata["international_order_byhome"] = $popularTourContent['international_order_byhome'];
        $homeContentdata["destinationTitle"] = $destinationContent['destinationTitle'];
        $homeContentdata["destinationDescription"] = $destinationContent['destinationDescription'];
        $homeContentdata["destination_order_byhome"] = $destinationContent['destination_order_byhome'];
        $homeContentdata["domesticTourTitle"] = $perfectTourContent['domesticTourTitle'];
        $homeContentdata["domesticTourDescription"] = $perfectTourContent['domesticTourDescription'];
        $homeContentdata["domestic_order_byhome"] = $perfectTourContent['domestic_order_byhome'];
        $homeContentdata["blogTitle"] = $blogContent['blogTitle'];
        $homeContentdata["blogDescription"] = $blogContent['blogDescription'];
        $homeContentdata["blog_order_byhome"] = $blogContent['blog_order_byhome'];
        $homeContentdata["offersTitle"] = $offersContent['offersTitle'];
        $homeContentdata["offersDescription"] = $offersContent['offersDescription'];
        $homeContentdata["offers_order_byhome"] = $offersContent['offers_order_byhome'];
        $homeContentdata["whychooseusTitle"] = $whychooseusContent['whychooseusTitle'];
        $homeContentdata["whychooseus_order_byhome"] = $whychooseusContent['whychooseus_order_byhome'];
        $homeContentdata["whychooseus_check"] = $whychooseusContent['whychooseus_check'];

        $homeContentdata["internationalTourTitle"] = $popularTourContent['internationalTourTitle'];
        $homeContentdata["internationalTourDescription"] = $popularTourContent['internationalTourDescription'];
        $homeContentdata["international_check"] = $popularTourContent['international_check'];
        $homeContentdata["international_order_byhome"] = $popularTourContent['international_order_byhome'];
        $homeContentdata["destinationTitle"] = $destinationContent['destinationTitle'];
        $homeContentdata["destinationDescription"] = $destinationContent['destinationDescription'];
        $homeContentdata["destination_order_byhome"] = $destinationContent['destination_order_byhome'];
        $homeContentdata["domesticTourTitle"] = $perfectTourContent['domesticTourTitle'];
        $homeContentdata["domesticTourDescription"] = $perfectTourContent['domesticTourDescription'];
        $homeContentdata["domestic_order_byhome"] = $perfectTourContent['domestic_order_byhome'];
        $homeContentdata["blogTitle"] = $blogContent['blogTitle'];
        $homeContentdata["blogDescription"] = $blogContent['blogDescription'];
        $homeContentdata["blog_order_byhome"] = $blogContent['blog_order_byhome'];

        $homeContentdata["offersTitle"] = $offersContent['offersTitle'];
        $homeContentdata["offersDescription"] = $offersContent['offersDescription'];
        $homeContentdata["offers_order_byhome"] = $offersContent['offers_order_byhome'];

        $homeContentdata["whychooseusTitle"] = $whychooseusContent['whychooseusTitle'];
        $homeContentdata["whychooseus_order_byhome"] = $whychooseusContent['whychooseus_order_byhome'];
        $homeContentdata["whychooseus_check"] = $whychooseusContent['whychooseus_check'];

        $homeContentdata["happycustomerTitle"] = $happycustomerContent['happycustomerTitle'];
        $homeContentdata["happycustomer_order_byhome"] = $happycustomerContent['happycustomer_order_byhome'];
        $homeContentdata["themeTitle"] = $otherUsefulContent['themeTitle'];
        $homeContentdata["theme_check"] = $otherUsefulContent['theme_check'];
        $homeContentdata["theme_order_byhome"] = $otherUsefulContent['theme_order_byhome'];
        $homeContentdata["themeDescription"] = $otherUsefulContent['themeDescription'];
        $homeContentdata["testimonialTitle"] = $interestingFactsContent['testimonialTitle'];
        $homeContentdata["testimonialDescription"] = $interestingFactsContent['testimonialDescription'];
        $homeContentdata["testmonial_order_byhome"] = $interestingFactsContent['testmonial_order_byhome'];

        $destinatonTop = $destinationJsonArray = array();
        if ($destinationContent['destinations_check'] == 1) {
            //echo "<pre>";print_r($this->stylecss );die;
            if ($this->stylecss == 'lts' || $this->stylecss == 'uamongus' || $this->stylecss == 'bigvalue' || $this->stylecss == 'ushaholidays' || $this->stylecss == 'goflysmart' || $this->stylecss == 'unitedtoursandtravels' || $this->stylecss == 'flywelltours' || $this->stylecss == 'bookmytournow' || $this->stylecss == 'ktas' || $this->stylecss == 'crossworld' || $this->stylecss == 'incredible' || $this->stylecss == 'flightguruonline' || $this->stylecss == 'sterling' || $this->stylecss == 'thekrishnatravels' || $this->stylecss == 'rahattravels') {
                $urlDes = $this->baseUrl . 'public/upload/' . $this->stylecss . '/data/package_destinations.json';
                $destinationJson = file_get_contents($urlDes, false, stream_context_create($arrContextOptions));
                //echo"<pre>";print_r($destinationJson);die;
                $destinationJsonArray = !empty($destinationJson) ? json_decode($destinationJson, 1) : array();
                // echo "<pre>";print_r($result);die;
            } //else {
            $destinatonTop = $this->objMdl->rv_select_all($this->tablenameDestination, ['DesSysId', 'Title', 'Activities', 'Hotels', 'Tours', 'Image', 'DestDescription'], ['IsActive' => 1, 'IsFeatured' => 1, 'IsMarkForDel' => 0], ['tbl.DesSysId' => 'ASC'], 8);
            // }
        }

        $destinatonTopArr = array();
        $destinatonTopArr = array();
        foreach ($destinatonTop as $topdesKey => $topdesValue) {
            $desTitleValue = $topdesValue['Title'];
            $whereCustom = ($desTitleValue) ? " ( Destinations LIKE '%{$desTitleValue}%' )" : "";
            $tourResult = $this->objMdl->rv_select_row_where_custom($this->tablename, ['count(*) as totalCount'], ['IsMarkForDel' => 0, 'IsActive' => 1, 'IsPublish' => 1, 'ItemType' => 1], $whereCustom, [], '');
            $destinatonTopArr[] = [
                'DesSysId' => $topdesValue['DesSysId'],
                'Title' => $topdesValue['Title'],
                'Activities' => $topdesValue['Activities'],
                'Hotels' => $topdesValue['Hotels'],
                'Tours' => $topdesValue['Tours'],
                'Image' => $topdesValue['Image'],
                'DestDescription' => $topdesValue['DestDescription'],
                'totalCount' => $tourResult['totalCount']
            ];
        }

        $travelogues = $this->objMdl->rv_select_all('tbl_travelogues', ['*'], ['isMarkForDel' => 0, 'status' => 1, 'displayOnBanner' => 1], ['TravId' => 'DESC'], 10);
        $this->view->homeContentdata = $homeContentdata;
        $this->view->destinations = $destinatonTopArr;
        $this->view->travelogues = $travelogues;
    }

    public function consultationAction() {
		exit('consultation');
        $contactDetail = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom')->getContactDetailForFooter();
        $emailsend = ($contactDetail['email']) ? $contactDetail['email'] : $whatsappnumber;
        $whatsappnumber = ($contactDetail['whatsapp_no']) ? $contactDetail['whatsapp_no'] : $whatsappnumber;
//echo '<pre>';	print_r($this->elasticekey); die;
        if ($this->getRequest()->isPost()) {
            $param = $this->getRequest()->getParams();
            $FirstName = (isset($fname) && $fname != '') ? $fname : $param['fname'];
            $mobile = (isset($mobile) && $mobile != '') ? $mobile : $param['mobile'];
            $email = (isset($email) && $email != '') ? $email : $param['email'];
            $country = (isset($country) && $country != '') ? $country : $param['country'];
            $remark = (isset($remark) && $remark != '') ? $remark : $param['remark'];

            if (!empty($param)) {
                $from = $emailsend;
                $fromName = "HelloGTX";
                $subject = 'Book Your Consultation Query';
                $subjectCustomer = 'Book Your Consultation Query';
                $body1 = '
<table width="650" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td height="30" colspan="2" bgcolor="#CCCCCC"><p class="style1">Feedback</p></td>
  </tr>
  <tr>
    <td width="157" align="left">Name: </td>
    <td width="429">' . @$FirstName . '</td>
  </tr>
  <tr>
    <td align="left">Email: </td>
    <td>' . @$email . '</td>
  </tr>
  <tr>
    <td width="157" align="left">Phone : </td>
    <td>' . @$mobile . '</td>
  </tr>
  <tr>
    <td align="left"><p>Country: </p></td>
    <td>' . @$country . '</td>
  </tr>
 
  <tr>
    <td align="left">Message: </td>
    <td>' . stripslashes(@$remark) . '</td>
  </tr>
</table>
';

                $bodyCustomer = '
<table width="650" border="0" cellspacing="2" cellpadding="2">
  
  <tr>
    <td align="left">Dear  ' . @$FirstName . '</td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Thanks for showing your interest in  ' . ucfirst($this->siteName) . ' . We will get back to you at the eirliest.</td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Thanks,</td>
  </tr>
  <tr>
    <td align="left">Team  ' . ucfirst($this->siteName) . ',</td>
  </tr>
  <tr>
    <td align="left"> ' . @$whatsappnumber . '</td>
  </tr>
</table>
';
                $url = 'https://api.elasticemail.com/v2/email/send';
                try {
                    $post = array('from' => $from,
                        'fromName' => 'Book Your Consultation',
                        'apikey' => $this->elasticekey,
                        'subject' => 'Book Your Consultation Query',
                        'to' => $emailsend,
                        //'to' => 'subhash@catpl.co.in',
                        //'msgCC' => $emailsend,
                        'bodyHtml' => $body1,
                        'bodyText' => '',
                        'isTransactional' => false);
                    $ch = curl_init();
                    curl_setopt_array($ch, array(
                        CURLOPT_URL => $url,
                        CURLOPT_POST => true,
                        CURLOPT_POSTFIELDS => $post,
                        CURLOPT_RETURNTRANSFER => true,
                        CURLOPT_HEADER => false,
                        CURLOPT_SSL_VERIFYPEER => false
                    ));
                    $result = curl_exec($ch);
                    $error1 = "Thank you for the contact us. Our customer relationship manager contact you soon.";
                    curl_close($ch);
                } catch (Exception $ex) {
                    $error = $result = $ex->getMessage();
                }
                try {
                    $post = array('from' => $from,
                        'fromName' => 'Book Your Consultation',
                        'apikey' => $this->elasticekey,
                        'subject' => $subjectCustomer,
                        'to' => $email,
                        //'to' => 'subhash@catpl.co.in',
                        //'msgCC' =>'subhash@catpl.co.in',
                        'bodyHtml' => $bodyCustomer,
                        'bodyText' => '',
                        'isTransactional' => false);
                    $ch = curl_init();
                    curl_setopt_array($ch, array(
                        CURLOPT_URL => $url,
                        CURLOPT_POST => true,
                        CURLOPT_POSTFIELDS => $post,
                        CURLOPT_RETURNTRANSFER => true,
                        CURLOPT_HEADER => false,
                        CURLOPT_SSL_VERIFYPEER => false
                    ));
                    $result = curl_exec($ch);
                    $error1 = "Thank you for the contact us. Our customer relationship manager contact you soon.";
                    curl_close($ch);
                } catch (Exception $ex) {
                    $error = $result = $ex->getMessage();
                }
                $status = true;
            } else {
                $error1 = "Please enter valid captcha code";

                $status = false;
            }

            $error = json_encode(array("status" => $status, "message" => $error1));
            echo $error;
            exit;
        } else {
            $result = ['status' => false, 'message' => 'Unable to send enquiry'];
            echo Zend_Json::encode($result);
            exit;
        }
    }

    public function forexAction() {

        $testimonials = $this->objMdl->rv_select_all('tbl_feedback', ['*'], ['AgencySysId' => $this->AgencyId, 'IsActive' => 1, 'displayOnHome' => 1], ['FeedbackId' => 'DESC'], 10);
        $this->view->testimonials = $testimonials;

        $forexbanner = $this->objMdl->rv_select_all('tbl_forex', ['*'], ['AgencySysId' => $this->AgencyId, 'IsActive' => 1, 'category' => 1, 'isMarkForDel' => 0, 'isb2b' => 0], ['Id' => 'DESC'], 10);
        $this->view->forexbanner = $forexbanner;

        $forexwhatwedo = $this->objMdl->rv_select_all('tbl_forex', ['*'], ['AgencySysId' => $this->AgencyId, 'IsActive' => 1, 'category' => 2, 'isMarkForDel' => 0, 'isb2b' => 0], ['Id' => 'DESC'], 10);
        $this->view->forexwhatwedo = $forexwhatwedo;
        
        $currencyDetails = $this->objMdl->rv_select_all('tbl_forex', ['*'], ['AgencySysId' => $this->AgencyId, 'IsActive' => 1, 'category' => 3, 'isMarkForDel' => 0, 'isb2b' => 0], ['Id' => 'DESC'], 10);
        $this->view->currencyDetails = $currencyDetails;
        //echo '<pre>';	print_r($forexbanner);die;
    }
	    public function enquiryAction() {
		 $model = new Admin_Model_CRUD();
		 $getPageDetail = $model->rv_select_row($this->tablenamePage, ['*'], ['identifier' => 'enquiry', 'status' => 'Activate', 'isb2b' => 0], ['sid' => 'desc']);
		  $this->view->pagedetail = $getPageDetail;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit