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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/dcb/application/controllers/LocateController.php
<?php

/***************************************************************
* Catabatic Technology Pvt. Ltd.
* File Name :IndexController.php
* File Description :Index controller for manage home page
* Created By : Praveen Kumar
* Created Date: 10-September-2014
***************************************************************/

class LocateController extends Zend_Controller_Action
{
    public function init()
    {
        /* Initialize action controller here */
        $aConfig = $this->getInvokeArg('bootstrap')->getOptions();
        $this->deviceBasePath = $aConfig['deviceBasePath'];
        $cms = new Application_Model_Cms();
        $page_details = $cms->getPageDetails();
        $this->page_title = $page_details['page_title'];
        $this->page_description = $page_details['page_description'];
        $this->page_keywords = $page_details['page_keywords'];
        
        //Start Code for tiled list menu on home page
        $menu = new Application_Model_Menu();
        $responsive_menu_list = $menu->getAllTopMenuList();
        //echo "<pre>";print_r($tiled_menus);die;
        $this->view->responsive_menu_list_arr = $responsive_menu_list;
        
        //For Mobile Menu
        $responsive_mobile_menu_list = $menu->getAllTopMobileOrderMenuList();
        //echo "<pre>";print_r($tiled_menus);die;
        $this->view->responsive_mobile_menu_list = $responsive_mobile_menu_list;
    }
    
    
    public function indexAction()
    {
        
      $this->view->headTitle()->prepend($this->page_title);
      $this->view->headMeta()->appendName("description", $this->page_description);
      $this->view->headMeta()->appendName("keyword", $this->page_keywords);
      
      require_once $this->deviceBasePath.'library/Catabatic/MobileDetect.php';
      $mobile_detect = new Catabatic_MobileDetect();
      if($mobile_detect->isMobile() =="mobile"){
       $deviceType = "mobile";  
      } else if($mobile_detect->isTablet() =="tablet") {
       $deviceType = "mobile";  
      } else {
       $deviceType = "desktop";    
      }
      
      $this->view->deviceType = $deviceType;
      
      //Start Code for quick menu
      $menu  = new Application_Model_Menu();
      $quickLinkColumn1Data = $menu->getQuickLinkColumn123DataList($type='quick_link_column1');
      //echo "<pre>";print_r($quickLinkColumn1Data);die;
      $this->view->quickLinkColumn1 = $quickLinkColumn1Data;

      $quickLinkColumn2Data = $menu->getQuickLinkColumn123DataList($type='quick_link_column2');
      $this->view->quickLinkColumn2 = $quickLinkColumn2Data;

      $quickLinkColumn3Data = $menu->getQuickLinkColumn123DataList($type='quick_link_column3');
      $this->view->quickLinkColumn3 = $quickLinkColumn3Data;
      //End Code for quick menu
      
      
      //--------Get all locate Branch----------//
      $locate = new Application_Model_Locate();
      
      //Branch State List
      $branch_state_list = $locate->getAllBranchStateList('branch');
      //echo "<pre>";print_r($branch_state_list);die;
      $this->view->branch_state_list = $branch_state_list;
      
      //ATM State List
      $atm_state_list = $locate->getAllBranchStateList('atm');
      $this->view->atm_state_list = $atm_state_list;
      

      //Start Code for footer menu
      $footerMenuColumn1Data = $menu->getQuickLinkColumn123DataList($type='footer_menu_column1');
      $this->view->footerMenuColumn1 = $footerMenuColumn1Data;

      $footerMenuColumn2Data = $menu->getQuickLinkColumn123DataList($type='footer_menu_column2');
      $this->view->footerMenuColumn2 = $footerMenuColumn2Data;

      $footerMenuColumn3Data = $menu->getQuickLinkColumn123DataList($type='footer_menu_column3');
      $this->view->footerMenuColumn3 = $footerMenuColumn3Data;
      //End Code for footer menu
      
    }
    
    public function getBranchCityAction() { 
    
        $this->_helper->layout()->disableLayout('');
        if ($this->_request->isXmlHttpRequest()) { 
            $branch_state = $this->getRequest()->getParam('branch_state_val');
            $type_val = $this->getRequest()->getParam('type_val');
            $bsid = $this->getRequest()->getParam('bsid');
            if($type_val=="branch")
            {
                $select_col_name = "branch_city";
            }else{
                $select_col_name = "atm_city";
            }

            $locate = new Application_Model_Locate();
            $branch_city_list = $locate->getAllBranchCityListBYStateId($bsid,$type_val);
            //echo "<pre>";print_r($branch_city_list);die;
            $select = '<option value="" style="color:#000000;">City</option>';
            if($branch_city_list!=""){
                foreach($branch_city_list as $val){
                 $select .= '<option value="'.$val['id'].'" style="color:#000000;">'.$val['city_name'].'</option>';  
                }
            }    
            echo $select;  
        }
        exit;
     }
     
     
     public function getBranchAction() 
     { 
        $this->_helper->layout()->disableLayout('');
        if ($this->_request->isXmlHttpRequest()) { 
            $branch_val = $this->getRequest()->getParam('branch_val');
            $type_str = $this->getRequest()->getParam('type_str'); 
            $brchid = $this->getRequest()->getParam('brchid');

            $locate = new Application_Model_Locate();
            $branch_list = $locate->getAllBranchListByCityId($brchid,$type_str);
            //echo "<pre>";print_r($branch_list);die;
            $select = '<option value="" style="color:#000000;">'.ucfirst($type_str).'</option>';
            if($branch_list!=""){
                foreach($branch_list as $val){
                 $select .= '<option value="'.$val['id'].'" style="color:#000000;">'.$val['location'].'</option>';  
                }
            }
            echo $select;  
            //$this->_helper->json($subcatList);
        }
        exit;
     }
     
     public function getLocationAction() 
     { 
        $this->_helper->layout()->disableLayout('');
        if ($this->_request->isXmlHttpRequest()) { 
            $type_str = $this->getRequest()->getParam('type_str'); 
            $brchid = $this->getRequest()->getParam('brchid');
            //echo $brchid;
            
            $locate = new Application_Model_Locate();
            $branch_list = $locate->getAllLocationListByCityId($brchid);
            
            $select = '<option value="" style="color:#000000;">Location</option>';
            if($branch_list!=""){
                foreach($branch_list as $val){
                 $select .= '<option value="'.$val['id'].'" style="color:#000000;">'.$val['location_name'].'</option>';  
                }
            }  
            echo $select;  
            //$this->_helper->json($subcatList);
        }
        exit;
     }
     
     
     public function getbranchatmAction() 
     { 
        $this->_helper->layout()->disableLayout('');
        
        if ($this->_request->isXmlHttpRequest()) { 
            $type = $this->getRequest()->getParam('type');
            $type_val = $this->getRequest()->getParam('type_val'); 
            
            $locate = new Application_Model_Locate();
            if($type=="branch") { 
              $branch_atm_list = $locate->getAllBranchAtmListById($type,$type_val);
            } else if($type=="atm"){
              $location_type_val = $type_val?$type_val:NULL;
              $atm_location_list = $locate->getAllLocationBranchAtmListById($type,$location_type_val);
              //echo "<br/>"; print_r($atm_location_list);die;
            }
            
            if($type=="branch")
            { 
                if(!empty($branch_atm_list)) {
                $select = '<div class="branchmap">
                           <table width="100%" border="0" cellspacing="0" cellpadding="0" class="locatetable">
                           <tr>
                            <th width="25%" valign="top">Branch Location</th>
                            <td width="75%" valign="top">'.$branch_atm_list['location'].'</td>
                          </tr>
                          <tr>
                            <th valign="top">Address</th>
                            <td valign="top">'.$branch_atm_list['address1'].'';
                           if($branch_atm_list['address2']!="") { 
                            $select .= ' '.$branch_atm_list['address2'].'';
                           }
                    $select .= '
                            </td>
                          </tr>';
                
                    if($branch_atm_list['nearby_milestone']) {
                      $select .='<tr>
                                 <th valign="top">Landmark</th>
                                 <td valign="top">'.$branch_atm_list['nearby_milestone'].'</td>
                               </tr>'; 
                    }
                    
                    $select .= '<tr>
                            <th valign="top">Pin Code</th>
                            <td valign="top">'.$branch_atm_list['pin_code'].'</td>
                          </tr>
                          <tr>
                            <th valign="top">IFS Code</th>
                            <td valign="top">'.$branch_atm_list['ifs_code'].'</td>
                          </tr>
                          <tr>
                            <th valign="top">Tel</th>
                            <td valign="top">'.$branch_atm_list['telephone_no'].'';
                           if($branch_atm_list['telephone_no2']!="") { 
                            $select .= ', '.$branch_atm_list['telephone_no2'].'';
                           }
                           if($branch_atm_list['telephone_no3']!="") { 
                            $select .= '  , '.$branch_atm_list['telephone_no3'].'';
                           }
                           if($branch_atm_list['telephone_no4']!="") { 
                            $select .= ',<br/> '.$branch_atm_list['telephone_no4'].'';
                           }
                           if($branch_atm_list['telephone_no5']!="") { 
                            $select .= ', '.$branch_atm_list['telephone_no5'].'';
                           }
                 $select .= '  </td>
                          </tr>
                          <tr>
                            <th valign="top">ATM</th>
                            <td valign="top">'.$branch_atm_list['branch_atm'].'</td>
                          </tr>
                          <tr>
                            <th valign="top">Locker</th>
                            <td valign="top">'.$branch_atm_list['branch_locker'].'</td>
                          </tr>
                          <tr>
                            <th valign="top">Branch Timing</th>
                            <td valign="top">
                            <strong>Monday to Saturday</strong>  '.$branch_atm_list['branch_timing_monday_to_friday'].'<br />
                             Closed  2nd & 4th Saturday   
                            </td>
                          </tr>
                          <tr>
                            <th width="150" valign="top">Branch Head</th>
                            <td width="328" valign="top">'.$branch_atm_list['branch_head'].'</td>
                          </tr>
                          </table></div>
                          ';
                }
                 echo $select;  
            }else {
              if(count($atm_location_list)>0) { 
              
              $select = ' <div id="mcs_container">
                        <div class="customScrollBox">
                         <div class="container">
                         <div class="content">';    
              foreach($atm_location_list as $atm_list) {    
              $select .= '<div class="branchmap" style="margin-bottom:10px;">
                         <table width="100%" border="0" cellspacing="0" cellpadding="0" class="locatetable">
                          <tr>
                            <th valign="top" width="150">ATM Location</th>
                            <td valign="top" width="328">'.$atm_list['location'].'</td>
                          </tr>';
                    if($atm_list['nearby_milestone'] && $atm_list['nearby_milestone']!='NULL') {
                       $select .='<tr>
                                  <th valign="top">Landmark</th>
                                  <td valign="top">'.$atm_list['nearby_milestone'].'</td>
                                </tr>'; 
                    }
                  $select .='<tr>
                            <th valign="top">Address</th>
                            <td valign="top">'.$atm_list['address1'].'';
                           if($atm_list['address2']!="") { 
                            $select .= ', '.$atm_list['address2'].'';
                           }
                 $select .= ' </td>
                          </tr>
                          <tr>
                            <th valign="top">Pin Code</th>
                            <td valign="top">'.$atm_list['pin_code'].'</td>
                          </tr>
                           </table></div>
                          ';  
                   
            }
            $select .='<div class="cl"></div></div>
		</div>
		<div class="dragger_container">
    		<div class="dragger"></div>
		</div>
                    </div>
                <a href="#" class="scrollUpBtn"></a> <a href="#" class="scrollDownBtn"></a>
            </div> 
            '; 
           } 
           echo $select; 
           
           } 
           
            //$this->_helper->json($subcatList);
        }
        exit;
     }

}




Youez - 2016 - github.com/yon3zu
LinuXploit