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/LmsController.php
<?php

/* * *************************************************************
 * Catabatic Technology Pvt. Ltd.
 * File Name :LmsController.php
 * File Description :Lms controller for manage all lms pages
 * Created By : Praveen Kumar
 * Created Date: 18-November-2014
 * ************************************************************* */

class LmsController extends Zend_Controller_Action {

    public function init() {
        /* Initialize action controller here */
        $aConfig = $this->getInvokeArg('bootstrap')->getOptions();
        $this->deviceBasePath = $aConfig['deviceBasePath'];
        $this->view->deviceBasePath = $aConfig['deviceBasePath'];
        $this->siteUrl = $aConfig['bootstrap']['siteUrl'];
        $this->smtpUserName = $aConfig['smtpUserName'];
        $this->smtpPassword = $aConfig['smtpPassword'];
        $this->smtpPort = $aConfig['smtpPort'];
        $this->smtpHost = $aConfig['smtpHost'];
        $this->fromEmail = $aConfig['fromEmail'];
        $this->fromName = $aConfig['fromName'];
        $this->nriFromEmail = $aConfig['nriFromEmail'];

        $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;

        $controller_name = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
        $action_name = Zend_Controller_Front::getInstance()->getRequest()->getActionName();
        Zend_Session::start();
        $defaultNamespace = new Zend_Session_Namespace('pageName');
        $this->sess_page_name = $defaultNamespace->sess_page_name;
        $this->sess_ppage_name = $defaultNamespace->sess_ppage_name;
        if ($defaultNamespace->page_title) {
            $this->page_title = $defaultNamespace->page_title;
        } else {
            $this->page_title = $this->page_title;
        }

        require_once $this->deviceBasePath . 'library/Catabatic/MobileDetect.php';
        $this->mobile_detect = new Catabatic_MobileDetect();
    }

    /**
     * index() method is used
     * @param content_menu_link_id string
     * @return object 
     */
    public function indexAction() {
        //Start Code for quick menu     
        echo "Welcome lms";
        die;
    }

    /**
     * leaveYourNumber() method is used to submit leave your number lms form
     * @param page string
     * @return object 
     */
    public function leaveYourNumberAction() {
        //Call Model Here
        $menu = new Application_Model_Menu();

        //Start Code for quick 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
        //Start leave your number lms from code here
        $this->view->headTitle()->prepend($this->page_title);
        $this->view->headMeta()->appendName("description", $this->page_description);
        $this->view->headMeta()->appendName("keyword", $this->page_keywords);

        //Detect Mobile Browser or Web Browser
        if ($this->mobile_detect->isMobile() == "mobile") {
            $deviceType = "mobile";
        } else if ($this->mobile_detect->isTablet() == "tablet") {
            $deviceType = "mobile";
        } else {
            $deviceType = "desktop";
        }
        $this->view->mobile_detect = $deviceType;

        //Start code for check menu list
        $page_url = $this->sess_page_name;
        $ppage_url = $this->sess_ppage_name;
        $this->view->page_name = $this->sess_page_name;

        if ($page_url != "" && $ppage_url == "") {
            $fpage_url = $page_url;
        } else if ($page_url != "" && $ppage_url != "") {
            $fpage_url = $ppage_url;
        }
        //$page_content_data = $cms->getPageContentByPageUrl($page_url,$deviceType);
        $this->view->page_title = $this->page_title;

        //----------Get left menu by page url------------//
        if ($page_url) {
            $getMenuData = $menu->getMenuListByPageUrl($page_url); //10,9
            //echo '<pre>';print_r($getMenuData);exit;
            $this->view->parentId = $getMenuData;
            $parent_details = $menu->getAllParentDetailsArrayById($getMenuData['parent_id']);
            $this->view->parent_name = $parent_details['level'];
            $this->view->parent_url = $parent_details['url'];
            //echo '<pre>';print_r($parent_details);exit;

            $checkChileList = $menu->getChildListById($getMenuData['id']);
            //echo $checkChileList; 
            $this->view->checkChileList = $checkChileList;
        }

        if ($getMenuData['id'] != "" && ($getMenuData['parent_id'] == 0 && $getMenuData['parent_id'] != "")) {
            //echo "roort yes";die;
            $this->__getLeftMenuListById($getMenuData['id']);
        } else if (@$getMenuData['id'] != "" && @$getMenuData['parent_id'] != 0) {
            //echo "yes1"; die; //9,8
            //Second Lb menu id 
            $getParentIdData = $menu->getLastParentIdByParentId(@$getMenuData['parent_id']);
            //  echo "<pre>";print_r($getParentIdData); 
            if (@$getParentIdData['id'] != "" && @$getParentIdData['parent_id'] != 0) {
                //8,2
                //Third Lb menu id 
                $this->view->also_vist = "third";
                $getSubParentIdData = $menu->getLastParentIdByParentId(@$getParentIdData['parent_id']);
                // echo "<pre>";print_r($getSubParentIdData);
                if (@$getSubParentIdData['id'] != "" && @$getSubParentIdData['parent_id'] != 0) {
                    //2,0
                    //Fourth Lb menu id 
                    $this->view->also_vist = "fourth";
                    $getSubSubParentIdData = $menu->getLastParentIdByParentId($getSubParentIdData['parent_id']);
                    //echo "<pre>";print_r($getSubSubParentIdData);
                    if (@$getSubSubParentIdData['id'] != "" && @$getSubSubParentIdData['parent_id'] != 0) {
                        //echo "fifth"; die;
                    } else if (@$getSubSubParentIdData['id'] != "" && (@$getSubSubParentIdData['parent_id'] == 0 && @$getSubSubParentIdData['parent_id'] != "")) {
                        //echo "root yes";die;
                        $this->__getLeftMenuListById(@$getSubSubParentIdData['id']);
                    }
                } else if ($getSubParentIdData['id'] != "" && (@$getSubParentIdData['parent_id'] == 0 && @$getSubParentIdData['parent_id'] != "")) {
                    //echo "Third";die;
                    $this->__getLeftMenuListById($getSubParentIdData['id']);
                }
            } else if (@$getParentIdData['id'] != "" && (@$getParentIdData['parent_id'] == 0 && @$getParentIdData['parent_id'] != "")) {
                $this->__getLeftMenuListById(@$getParentIdData['id']);
            }
        }

        //end code for check menu list

        $form = new Application_Form_Leaveyournumber();
        $this->view->form = $form;
        $lms = new Application_Model_Lms();

        if ($this->getRequest()->isPost()) {
            $getData = $this->getRequest()->getPost();
            //echo "<pre>";print_r($getData);die;

            if ($form->isValid($getData)) {

                if (strtolower($getData['captcha']) != $_SESSION['captcha']) {
                    $this->view->errorMessage = "Captcha code invalid.";
                } else {
                    //Start code for section wise url and section name
                    if ($getData['url']) {
                        $reference_page_name = @end(@explode("/", $getData['url']));

                        $url_path = @explode($this->siteUrl, $getData['url']);
                        $reference_section_url = @$url_path[1];

                        if ($reference_section_url) {
                            $section_page_url = $reference_section_url;
                        } else {
                            $section_page_url = "";
                        }

                        $getMenuData = $menu->getMenuListByPageUrl($reference_page_name);
                        $getMenuDetails = null;
                        if ($getMenuData['id'] != "" && ($getMenuData['parent_id'] == 0 && $getMenuData['parent_id'] != "")) {
                            //echo "roort yes";die;
                            $getMenuDetails = $menu->getAllFirstLbMenuListById($getMenuData['id']);
                        } else if (@$getMenuData['id'] != "" && @$getMenuData['parent_id'] != 0) {
                            //echo "yes1"; die; //9,8
                            //Second Lb menu id 
                            $getParentIdData = $menu->getLastParentIdByParentId(@$getMenuData['parent_id']);
                            //  echo "<pre>";print_r($getParentIdData); 
                            if (@$getParentIdData['id'] != "" && @$getParentIdData['parent_id'] != 0) {
                                //8,2
                                //Third Lb menu id 
                                $getSubParentIdData = $menu->getLastParentIdByParentId(@$getParentIdData['parent_id']);
                                // echo "<pre>";print_r($getSubParentIdData);
                                if (@$getSubParentIdData['id'] != "" && @$getSubParentIdData['parent_id'] != 0) {
                                    //2,0
                                    //Fourth Lb menu id 
                                    $getSubSubParentIdData = $menu->getLastParentIdByParentId($getSubParentIdData['parent_id']);
                                    //echo "<pre>";print_r($getSubSubParentIdData);
                                    if (@$getSubSubParentIdData['id'] != "" && @$getSubSubParentIdData['parent_id'] != 0) {
                                        //echo "fifth"; die;
                                    } else if (@$getSubSubParentIdData['id'] != "" && (@$getSubSubParentIdData['parent_id'] == 0 && @$getSubSubParentIdData['parent_id'] != "")) {
                                        //echo "root yes";die;
                                        $getMenuDetails = $menu->getAllFirstLbMenuListById(@$getSubSubParentIdData['id']);
                                    }
                                } else if ($getSubParentIdData['id'] != "" && (@$getSubParentIdData['parent_id'] == 0 && @$getSubParentIdData['parent_id'] != "")) {
                                    //echo "Third";die;
                                    $getMenuDetails = $menu->getAllFirstLbMenuListById($getSubParentIdData['id']);
                                }
                            } else if (@$getParentIdData['id'] != "" && (@$getParentIdData['parent_id'] == 0 && @$getParentIdData['parent_id'] != "")) {
                                $getMenuDetails = $menu->getAllFirstLbMenuListById(@$getParentIdData['id']);
                            }
                        }

                        if ($getMenuDetails) {
                            $section_page_name = ucwords(strtolower($getMenuDetails[0]['level']));
                        } else {
                            $section_page_name = "";
                        }
                    } else {
                        $section_page_name = '';
                        $section_page_url = '';
                    }

                    $dataArray = array(
                        'application_type' => $deviceType,
                        'lms_type' => 'leave_your_number',
                        'title' => $this->sanitize_data($getData['title']),
                        'first_name' => $this->sanitize_data($getData['fname']),
                        'last_name' => $this->sanitize_data($getData['lname']),
                        'email' => $this->sanitize_data($getData['email']),
                        'state_id' => $this->sanitize_data($getData['state_id']),
                        'city_id' => $this->sanitize_data($getData['city_id']),
                        'area_code' => $this->sanitize_data($getData['area_code']),
                        'landline_no' => $this->sanitize_data($getData['landline_no']),
                        'mobile_no' => $this->sanitize_data($getData['mobile_no']),
                        'section_page_name' => $this->sanitize_data($section_page_name),
                        'section_page_url' => $this->sanitize_data($section_page_url),
                        'utm_content' => $this->sanitize_data(@$getData['utm_content']),
                        'utm_source' => $this->sanitize_data(@$getData['utm_source']),
                        'utm_medium' => $this->sanitize_data(@$getData['utm_medium']),
                        'utm_campaign' => $this->sanitize_data(@$getData['utm_campaign']),
                        'utm_term' => $this->sanitize_data(@$getData['utm_term']),
                        'status' => 'Deactive',
                        'createdOn' => date("Y-m-d H:i:s")
                    );

                    //Start code for send mail  
                    if ($this->sanitize_data($getData['email'])) {

                        if ($reference_page_name != "leave-your-number") {
                            if ($reference_page_name != '') {
                                $page_title_data = $lms->getPageTitleByPageUrl($reference_page_name);
                                $page_title = ucwords(strtolower($page_title_data));
                                $page_title = str_replace("Dcb", "DCB ", $page_title);
                                $page_title = str_replace("Sms", "SMS ", $page_title);
                                $page_title = str_replace("Bsbda", "BSBDA ", $page_title);
                            }
                        } else {
                            $page_title = "";
                        }

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

                        $state_details = $lms->getStateDetailsByStateId($getData['state_id']);
                        if ($getData['city_id']) {
                            $city_details = $lms->getAllCityListByCityId($getData['city_id']);
                            $city = ucfirst($city_details['city_name']);
                        }

                        $email = $this->sanitize_data($getData['email']);
                        $username = ucfirst($this->sanitize_data($getData['fname'])) . ' ' . ucfirst($this->sanitize_data($getData['lname']));
                        $mobile_no = $this->sanitize_data($getData['mobile_no']);
                        $landline_no = $this->sanitize_data($getData['landline_no']);
                        $area_code = $this->sanitize_data($getData['area_code']);
                        $state = $state_details['state_name'];
                        $utm_content = $this->sanitize_data(@$getData['utm_content']);
                        $utm_source = $this->sanitize_data(@$getData['utm_source']);
                        $utm_medium = $this->sanitize_data(@$getData['utm_medium']);
                        $utm_campaign = $this->sanitize_data(@$getData['utm_campaign']);
                        $utm_term = $this->sanitize_data(@$getData['utm_term']);
                        $url = $getData['url'];

                        if ($page_title != "") {
                            $subject = "Leave your number form" . ' - ' . $page_title;
                        } else {
                            $subject = "Leave your number form";
                        }

                        //Mail Send for dcb bank
                        $message = "Hi, <br><br>";
                        $message .= "Leave your number lms details:<br><br>";
                        $message .= "Username: $username <br>";
                        $message .= "Email: $email <br>";
                        if ($mobile_no != "" && $landline_no == "") {
                            $message .= "Mobile No.: $mobile_no <br>";
                        } else if ($landline_no != "" && $mobile_no != "") {
                            $message .= "Mobile No.: $mobile_no <br>";
                            $message .= "Landline No.: $landline_no <br>";
                            $message .= "Area Code: $area_code <br>";
                        } else if ($landline_no != "" && $mobile_no == "") {
                            $message .= "Landline No.: $landline_no <br>";
                            $message .= "Area Code: $area_code <br>";
                        }
                        $message .= "State: $state <br>";
                        $message .= "City: $city <br>";
                        if ($utm_content && $utm_source && $utm_medium && $utm_campaign && $utm_term) {
                            $message .= "UTM Content: $utm_content <br>";
                            $message .= "UTM Source: $utm_source <br>";
                            $message .= "UTM Medium: $utm_medium <br>";
                            $message .= "UTM Campaign: $utm_campaign <br>";
                            $message .= "UTM Term: $utm_term <br>";
                        }
                        $message .= "URL: $url <br><br>";
                        $message .= "Thanks,<br>";
                        $message .= "DCB Bank Team";

                        //Start code fot smtp mail details                         
                        $config_details = array(
                            'auth' => 'login',
                            'port' => $this->smtpPort,
                            'username' => $this->smtpUserName,
                            'password' => $this->smtpPassword
                        );

                        //echo "<pre>";print_r($config_details);
                        // echo $this->smtpHost; 
                        // echo $this->fromEmail;
                        // echo $this->fromName;
                        // echo $message;//die();
                        //require_once $this->deviceBasePath.'library/Zend/Mail.php';
                        //require_once $this->deviceBasePath.'library/Zend/Mail/Transport/Smtp.php';

                        $transport = new Zend_Mail_Transport_Smtp($this->smtpHost, $config_details);

                        $mail = new Zend_Mail("iso-8859-1");
                        $mail->setBodyHtml($message);
                        $mail->setFrom($this->fromEmail, $this->fromName);
                        $mail->addTo($this->fromEmail, $this->fromName);
                        $mail->setSubject($subject);

                        //$headers = "MIME-Version: 1.0 " ."\r\n";
                        //$headers .= "Content-type:text/html;charset=iso-8891-1" ."\r\n";
                        //$headers .= "From: DCB Bank <customercare@dcbbank.com>" ."\r\n";
                        // @mail("nwsupport@dcbbank.com",$subject,$message,$headers);
                        try {
                            $mail->send($transport);
                        } catch (Exception $ex) {
                            print_r($ex, true);
                        }

                        //Mail Send for dcb bank                       
                        $email_arr = array($this->fromEmail, $email);
                        $html = new Zend_View();
                        $html->setScriptPath('emailTemplate/');
                        $bodyText = $html->render('mailer.phtml');

                        foreach ($email_arr as $val) {

                            $mail_user = new Zend_Mail("utf-8");
                            if ($val == $this->fromEmail) {
                                $mail_user->setBodyHtml($message);
                                $username_mail = $this->fromName;
                            } else {
                                $mail_user->setBodyHtml($bodyText);
                                $username_mail = $username;
                            }

                            $mail_user->setFrom($this->fromEmail, $this->fromName);
                            $mail_user->addTo($val, "$username_mail");
                            // $mail_user->addCc("nwsupport@dcbbank.com","NW Support");
                            $mail_user->setSubject($subject);
                            //$mail_user->send($transport);

                            try {
                                $mail_user->send($transport);
                            } catch (Exception $ex) {
                                print_r($ex, true);
                            }
                        }
                    }

                    //echo "<pre>";print_r($dataArray);die;
                    //End code for send mail                 
                    // try { 
                    $lms->add($dataArray);
                    // } catch(Exception $e){
                    // print_r($e, true);
                    // }
                    $this->_redirect("lms/thankyou");
                }
            }
        }

        //End leave your number lms from code here
        //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 complaintFormAction() {
        //Call Model Here
        $menu = new Application_Model_Menu();

        //Start Code for quick 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
        //Start complaint lms from code here
        $this->view->headTitle()->prepend($this->page_title);
        $this->view->headMeta()->appendName("description", $this->page_description);
        $this->view->headMeta()->appendName("keyword", $this->page_keywords);

        //Detect Mobile Browser or Web Browser
        if ($this->mobile_detect->isMobile() == "mobile") {
            $deviceType = "mobile";
        } else if ($this->mobile_detect->isTablet() == "tablet") {
            $deviceType = "mobile";
        } else {
            $deviceType = "desktop";
        }

        $form = new Application_Form_Complaintform();
        $this->view->form = $form;
        $lms = new Application_Model_Lms();

        if ($this->getRequest()->isPost()) {
            $getData = $this->getRequest()->getPost();
            //echo "<pre>";print_r($getData);die;

            if ($form->isValid($getData)) {
                // echo "<pre>";print_r($getData);exit;
                if (strtolower($getData['captcha']) != $_SESSION['captcha']) {
                    $this->view->errorMessage = "Captcha code invalid.";
                } else {
                    $complaint_type_sub_custName = $complaint_type_subName = $complaint_typeName = '';
                    $complaint_typeID = $this->sanitize_data($getData['complaint_type']);
                    if ((int) $complaint_typeID > 0) {
                        $getComplaintCategoryFetchOne = $lms->getComplaintCategoryFetchOne($complaint_typeID);
                        $complaint_typeName = isset($getComplaintCategoryFetchOne[0]['name']) ? $getComplaintCategoryFetchOne[0]['name'] : '';
                    }
                    $complaint_type_subId = $this->sanitize_data($getData['complaint_type_sub']);
                    if ((int) $complaint_type_subId > 0) {
                        $getComplaintSubCategoryFetchOne = $lms->getComplaintSubCategoryFetchOne($complaint_type_subId);
                        $complaint_type_subName = isset($getComplaintSubCategoryFetchOne[0]['name']) ? $getComplaintSubCategoryFetchOne[0]['name'] : '';
                    }
                    $complaint_type_sub_custId = $this->sanitize_data($getData['complaint_type_sub_cust']);
                    if ((int) $complaint_type_sub_custId > 0) {
                        $getGrievanceDataFetchOne = $lms->getGrievanceDataFetchOne($complaint_type_sub_custId);
                        $complaint_type_sub_custName = isset($getGrievanceDataFetchOne[0]['name']) ? $getGrievanceDataFetchOne[0]['name'] : '';
                    }
                    $dataArray = array(
                        'application_type' => $deviceType,
                        'lms_type' => 'complaint_form',
                        'title' => $this->sanitize_data($getData['title']),
                        'first_name' => $this->sanitize_data($getData['fname']),
                        'last_name' => $this->sanitize_data($getData['lname']),
                        'email' => $this->sanitize_data($getData['email']),
                        'address' => $this->sanitize_data($getData['address']),
                        'country' => $this->sanitize_data($getData['country']),
                        'state_id' => $this->sanitize_data($getData['state_id']),
                        'city_id' => $this->sanitize_data($getData['city_id']),
                        'pin_code' => $this->sanitize_data($getData['pin_code']),
                        'country_code' => $this->sanitize_data($getData['country_code']),
                        'area_code' => $this->sanitize_data($getData['area_code']),
                        'landline_no' => $this->sanitize_data($getData['landline_no']),
                        'mobile_no' => $this->sanitize_data($getData['mobile_no']),
                        'complaint_type' => $complaint_typeName,
                        'complaint_sub_type' => $complaint_type_subName,
                        'complaint_type_sub_cust' => $complaint_type_sub_custName,
                        'account_no' => $this->sanitize_data($getData['account_no']),
                        'complaint_detail' => $this->sanitize_data($getData['complaint_detail']),
                        'status' => 'Deactive',
                        'createdOn' => date("Y-m-d H:i:s")
                    );

                    //echo "<pre>";print_r($dataArray);die;
                    //Start code for send mail  
                    if ($this->sanitize_data($getData['email'])) {

                        //Start code for reference page tilte
                        $reference_page_name = @end(@explode("/", $getData['url']));
                        if ($reference_page_name != "leave-your-number") {
                            if ($reference_page_name != '') {
                                $page_title_data = $lms->getPageTitleByPageUrl($reference_page_name);
                                $page_title = ucwords(strtolower($page_title_data));
                                $page_title = str_replace("Dcb", "DCB ", $page_title);
                                $page_title = str_replace("Sms", "SMS ", $page_title);
                                $page_title = str_replace("Bsbda", "BSBDA ", $page_title);
                            }
                        } else {
                            $page_title = "";
                        }

                        $state_details = $lms->getStateDetailsByStateId($getData['state_id']);
                        if ($getData['city_id']) {
                            $city_details = $lms->getAllCityListByCityId($getData['city_id']);
                            $city = ucfirst($city_details['city_name']);
                        }
                        $state = ucfirst($state_details['state_name']);

                        $mail_username = ucfirst($getData['fname']);
                        $username = $this->sanitize_data($getData['fname']) . ' ' . $this->sanitize_data($getData['lname']);
                        $email = $this->sanitize_data($getData['email']);
                        $address = $this->sanitize_data($getData['address']);
                        $country = $this->sanitize_data($getData['country']);
                        $pin_code = $this->sanitize_data($getData['pin_code']);
                        $country_code = $this->sanitize_data($getData['country_code']);
                        $area_code = $this->sanitize_data($getData['area_code']);
                        $landline_no = $this->sanitize_data($getData['landline_no']);
                        $mobile_no = $this->sanitize_data($getData['mobile_no']);
                        $complaint_type = $complaint_typeName;
                        $complaint_type_sub = $complaint_type_subName;
                        $complaint_type_sub_cust = $complaint_type_sub_custName;
                        $account_no = $this->sanitize_data($getData['account_no']);
                        $complaint_detail = $this->sanitize_data($getData['complaint_detail']);
                        $url = $this->sanitize_data($getData['url']);

                        if ($page_title != "") {
                            $subject = "Complaint form details" . ' - ' . $page_title;
                        } else {
                            $subject = "Complaint form details";
                        }

                        //Mail Send for dcb bank
                        $message = "Hi, <br><br>";
                        $message .= "Complaint Form Lms Details:<br><br>";
                        $message .= "Username: $username <br>";
                        $message .= "Email: $email <br>";
                        $message .= "Address: $address <br>";
                        $message .= "Country: $country <br>";
                        $message .= "State: $state <br>";
                        if ($city != "") {
                            $message .= "City: $city <br>";
                        }
                        $message .= "Pin Code: $pin_code <br>";
                        if ($country_code != "") {
                            $message .= "Country Code: $country_code <br>";
                        }
                        if ($area_code != "") {
                            $message .= "Area Code: $area_code <br>";
                        }
                        if ($mobile_no != "" && $landline_no == "") {
                            $message .= "Mobile No.: $mobile_no <br>";
                        } else if ($landline_no != "" && $mobile_no != "") {
                            $message .= "Mobile No.: $mobile_no <br>";
                            $message .= "Landline No.: $landline_no <br>";
                        } else if ($landline_no != "" && $mobile_no == "") {
                            $message .= "Landline No.: $landline_no <br>";
                        }

                        $message .= "Your complaint is regarding : $complaint_type <br>";
                        $message .= "Your complaint sub category : $complaint_type_sub <br>";
                        $message .= "Grievance : $complaint_type_sub_cust <br>";
                        $message .= "Account No.: $account_no <br>";
                        $message .= "Complaint Details: $complaint_detail <br>";
                        $message .= "URL: $url <br><br>";

                        $message .= "Thanks,<br>";
                        $message .= "DCB Bank Team";

                        //Start code fot smtp mail details                         
                        $config_details = array(
                            'auth' => 'login',
                            'port' => $this->smtpPort,
                            'username' => $this->smtpUserName,
                            'password' => $this->smtpPassword
                        );

                        //require_once $this->deviceBasePath.'library/Zend/Mail.php';
                        //require_once $this->deviceBasePath.'library/Zend/Mail/Transport/Smtp.php';

                        $transport = new Zend_Mail_Transport_Smtp($this->smtpHost, $config_details);
                        $mail = new Zend_Mail("iso-8859-1");
                        $mail->setBodyHtml($message);
                        $mail->setFrom($this->fromEmail, $this->fromName);
                        $mail->addTo($this->fromEmail, $this->fromName);
                        $mail->setSubject($subject);
                        // $mail->send($transport);

                        try {
                            $mail->send($transport);
                        } catch (Exception $ex) {
                            print_r($ex, true);
                        }


                        $email_arr = array($this->fromEmail, $email);

                        $html = new Zend_View();
                        $html->setScriptPath('emailTemplate/');
                        $bodyText = $html->render('mailer.phtml');

                        foreach ($email_arr as $val) {

                            $mail_user = new Zend_Mail("utf-8");
                            if ($val == $this->fromEmail) {
                                $mail_user->setBodyHtml($message);
                                $username_mail = $this->fromName;
                            } else {
                                $mail_user->setBodyHtml($bodyText);
                                $username_mail = $username;
                            }

                            $mail_user->setFrom($this->fromEmail, $this->fromName);
                            $mail_user->addTo($val, "$username_mail");
                            // $mail_user->addCc("nwsupport@dcbbank.com","NW Support");
                            $mail_user->setSubject($subject);
                            //$mail_user->send($transport);

                            try {
                                $mail_user->send($transport);
                            } catch (Exception $ex) {
                                print_r($ex, true);
                            }
                        }
                    }
                    //End code for send mail                 

                    $lms->add($dataArray);
                    $this->_redirect("lms/complaintthankyou");
                }
            }
        }

        //End complaint from lms code here
        //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
    }

    /**
     * emailStatement() method is used to submit email statement lms form
     * @param page string
     * @return object 
     */
    public function emailStatementAction() {
        //Call Model Here
        $menu = new Application_Model_Menu();

        //Start Code for quick 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
        //Start email statement lms from code here
        $this->view->headTitle()->prepend($this->page_title);
        $this->view->headMeta()->appendName("description", $this->page_description);
        $this->view->headMeta()->appendName("keyword", $this->page_keywords);

        //Detect Mobile Browser or Web Browser
        if ($this->mobile_detect->isMobile() == "mobile") {
            $deviceType = "mobile";
        } else if ($this->mobile_detect->isTablet() == "tablet") {
            $deviceType = "mobile";
        } else {
            $deviceType = "desktop";
        }

        $form = new Application_Form_Emailstatement();
        $this->view->form = $form;
        $lms = new Application_Model_Lms();
        $cms = new Application_Model_Cms();
        $page_url = "lms-email-statement";
        $this->view->page_content_data = $cms->getPageContentByPageUrl($page_url, $deviceType);

        if ($this->getRequest()->isPost()) {
            $getData = $this->getRequest()->getPost();
            //  echo "<pre>";print_r($getData);
            if ($form->isValid($getData)) {

                if (strtolower($getData['captcha']) != $_SESSION['captcha']) {
                    $this->view->errorMessage = "Captcha code invalid.";
                } else {
                    try {
                        $dataArray = array(
                            'application_type' => $deviceType,
                            'lms_type' => 'email_statement',
                            'customer_id' => $this->sanitize_data($getData['customer_id']),
                            'email' => $this->sanitize_data($getData['email']),
                            'plan_type' => $this->sanitize_data($getData['plan_type']),
                            'country_code' => $this->sanitize_data($getData['country_code']),
                            'area_code' => $this->sanitize_data($getData['area_code']),
                            'landline_no' => $this->sanitize_data($getData['landline_no']),
                            'mobile_no' => $this->sanitize_data($getData['mobile_no']),
                            'status' => 'Deactive',
                            'createdOn' => date("Y-m-d H:i:s")
                        );
                    } catch (Exception $ex) {
                        print_r($ex, true);
                    }


                    // echo "<pre>";print_r($dataArray);
                    //Start code for send mail  
                    if ($getData['email']) {

                        //Start code for reference page tilte
                        $reference_page_name = @end(@explode("/", $getData['url']));
                        if ($reference_page_name != "leave-your-number") {

                            if ($reference_page_name != '') {
                                $page_title_data = $lms->getPageTitleByPageUrl($reference_page_name);
                                $page_title = ucwords(strtolower($page_title_data));
                                $page_title = str_replace("Dcb", "DCB ", $page_title);
                                $page_title = str_replace("Sms", "SMS ", $page_title);
                                $page_title = str_replace("Bsbda", "BSBDA ", $page_title);
                            }
                        } else {
                            $page_title = "";
                        }

                        $mail_username = ''; // ucfirst($getData['fname']);
                        $email = $this->sanitize_data($getData['email']);
                        $customer_id = $this->sanitize_data($getData['customer_id']);
                        $mobile_no = $this->sanitize_data($getData['mobile_no']);
                        $url = $this->sanitize_data($getData['url']);
                        $landline_no = $this->sanitize_data($getData['landline_no']);
                        $country_code = $this->sanitize_data($getData['country_code']);
                        $area_code = $this->sanitize_data($getData['area_code']);

                        if ($page_title != "") {
                            $subject = "Email Statement form" . ' - ' . $page_title;
                        } else {
                            $subject = "Email Statement form";
                        }

                        //Mail Send for dcb bank
                        $message = "Hi, <br><br>";
                        $message .= "Email Statement lms details:<br><br>";
                        $message .= "Email: $email <br>";
                        $message .= "Customer ID: $customer_id <br>";
                        if ($country_code != "") {
                            $message .= "Country Code: $country_code <br>";
                        }
                        if ($area_code != "") {
                            $message .= "Area Code: $area_code <br>";
                        }
                        if ($mobile_no != "" && $landline_no == "") {
                            $message .= "Mobile No.: $mobile_no <br>";
                        } else if ($landline_no != "" && $mobile_no != "") {
                            $message .= "Mobile No.: $mobile_no <br>";
                            $message .= "Landline No.: $landline_no <br>";
                        } else if ($landline_no != "" && $mobile_no == "") {
                            $message .= "Landline No.: $landline_no <br>";
                        }

                        $message .= "URL: $url <br><br>";
                        $message .= "Thanks,<br>";
                        $message .= "DCB Bank Team";

                        //Start code fot smtp mail details                         
                        $config_details = array(
                            'auth' => 'login',
                            'port' => $this->smtpPort,
                            'username' => $this->smtpUserName,
                            'password' => $this->smtpPassword
                        );

                        //require_once $this->deviceBasePath.'library/Zend/Mail.php';
                        //require_once $this->deviceBasePath.'library/Zend/Mail/Transport/Smtp.php';                       

                        $transport = new Zend_Mail_Transport_Smtp($this->smtpHost, $config_details);
                        $mail = new Zend_Mail("iso-8859-1");
                        $mail->setBodyHtml($message);
                        $mail->setFrom($this->fromEmail, $this->fromName);
                        $mail->addTo($this->fromEmail, $this->fromName);
                        $mail->setSubject($subject);
                        //$mail->send($transport);

                        try {
                            $mail->send($transport);
                        } catch (Exception $ex) {
                            print_r($ex, true);
                        }

                        //start code for send mail for user
                        $email_arr = array($this->fromEmail, $email);
                        $html = new Zend_View();
                        $html->setScriptPath('emailTemplate/');
                        $bodyText = $html->render('mailer.phtml');

                        foreach ($email_arr as $val) {

                            $mail_user = new Zend_Mail("utf-8");
                            if ($val == $this->fromEmail) {
                                $mail_user->setBodyHtml($message);
                                $username_mail = $this->fromName;
                            } else {
                                $mail_user->setBodyHtml($bodyText);
                                $username_mail = $this->fromName;
                                ;
                            }

                            $mail_user->setFrom($this->fromEmail, $this->fromName);
                            $mail_user->addTo($val, "$username_mail");
                            // $mail_user->addCc("nwsupport@dcbbank.com","NW Support");
                            $mail_user->setSubject($subject);
                            //$mail_user->send($transport);

                            try {
                                $mail_user->send($transport);
                            } catch (Exception $ex) {
                                print_r($ex, true);
                            }
                            // echo "test sec mail";exit;
                        }
                    }
                    //End code for send mail

                    try {
                        $lms->add($dataArray);
                    } catch (Exception $ex) {
                        print_r($ex, true);
                    }
                    $this->_redirect("lms/emailthankyou");
                }
            }
        }
        //End email statement lms from code here
        //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
    }

    /**
     * nriBanking() method is used to submit nri banking lms form
     * @param page string
     * @return object 
     */
    public function nriBankingAction() {
        //Call Model Here
        $menu = new Application_Model_Menu();

        //Start Code for quick 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
        //Start nri banking lms from code here
        $this->view->headTitle()->prepend($this->page_title);
        $this->view->headMeta()->appendName("description", $this->page_description);
        $this->view->headMeta()->appendName("keyword", $this->page_keywords);

        //Detect Mobile Browser or Web Browser
        if ($this->mobile_detect->isMobile() == "mobile") {
            $deviceType = "mobile";
        } else if ($this->mobile_detect->isTablet() == "tablet") {
            $deviceType = "mobile";
        } else {
            $deviceType = "desktop";
        }

        $form = new Application_Form_Nribanking();
        $this->view->form = $form;
        $lms = new Application_Model_Lms();
        $cms = new Application_Model_Cms();
        $page_url = "lms-nri-banking";
        $this->view->page_content_data = $cms->getPageContentByPageUrl($page_url, $deviceType);

        if ($this->getRequest()->isPost()) {
            $getData = $this->getRequest()->getPost();
            //echo "<pre>";print_r($getData);die;
            if ($form->isValid($getData)) {

                if (strtolower($getData['captcha']) != $_SESSION['captcha']) {
                    $this->view->errorMessage = "Captcha code invalid.";
                } else {
                    $dataArray = array(
                        'application_type' => $deviceType,
                        'lms_type' => 'compaign_lending',
                        'title' => $this->sanitize_data($getData['title']),
                        'first_name' => $this->sanitize_data($getData['fname']),
                        'last_name' => $this->sanitize_data($getData['lname']),
                        'email' => $this->sanitize_data($getData['email']),
                        'country' => $this->sanitize_data($getData['country']),
                        'country_code' => $this->sanitize_data($getData['country_code']),
                        'area_code' => $this->sanitize_data($getData['area_code']),
                        'landline_no' => $this->sanitize_data($getData['landline_no']),
                        'mobile_no' => $this->sanitize_data($getData['mobile_no']),
                        'status' => 'Deactive',
                        'createdOn' => date("Y-m-d H:i:s")
                    );

                    //echo "<pre>";print_r($dataArray);die;
                    //Start code for send mail  
                    if ($getData['email']) {

                        //Start code for reference page tilte
                        $reference_page_name = @end(@explode("/", $getData['url']));
                        if ($reference_page_name != "leave-your-number") {

                            if ($reference_page_name != '') {
                                $page_title_data = $lms->getPageTitleByPageUrl($reference_page_name);
                                $page_title = ucwords(strtolower($page_title_data));
                                $page_title = str_replace("Dcb", "DCB ", $page_title);
                                $page_title = str_replace("Sms", "SMS ", $page_title);
                                $page_title = str_replace("Bsbda", "BSBDA ", $page_title);
                            }
                        } else {
                            $page_title = "";
                        }

                        $mail_username = ucfirst($getData['fname']);
                        $email = $this->sanitize_data($getData['email']);
                        $username = ucfirst($this->sanitize_data($getData['fname'])) . ' ' . ucfirst($this->sanitize_data($getData['lname']));
                        $country = $this->sanitize_data($getData['country']);
                        $mobile_no = $this->sanitize_data($getData['mobile_no']);
                        $url = $this->sanitize_data($getData['url']);
                        $landline_no = $this->sanitize_data($getData['landline_no']);
                        $country_code = $this->sanitize_data($getData['country_code']);
                        $area_code = $this->sanitize_data($getData['area_code']);

                        if ($page_title != "") {
                            $subject = "Compaign lending form" . ' - ' . $page_title;
                        } else {
                            $subject = "Compaign lending form";
                        }

                        //Mail Send for dcb bank
                        $message = "Hi, <br><br>";
                        $message .= "Compaign lending lms details:<br><br>";
                        $message .= "Username: $username <br>";
                        $message .= "Email: $email <br>";
                        $message .= "Country: $country <br>";
                        if ($country_code != "") {
                            $message .= "Country Code: $country_code <br>";
                        }
                        if ($area_code != "") {
                            $message .= "Area Code: $area_code <br>";
                        }
                        if ($mobile_no != "" && $landline_no == "") {
                            $message .= "Mobile No.: $mobile_no <br>";
                        } else if ($landline_no != "" && $mobile_no != "") {
                            $message .= "Mobile No.: $mobile_no <br>";
                            $message .= "Landline No.: $landline_no <br>";
                        } else if ($landline_no != "" && $mobile_no == "") {
                            $message .= "Landline No.: $landline_no <br>";
                        }
                        if ($url != "") {
                            $message .= "URL: $url ";
                        }
                        $message .= "<br><br>";
                        $message .= "Thanks,<br>";
                        $message .= "DCB Bank Team";

                        //Start code fot smtp mail details                         
                        $config_details = array(
                            'auth' => 'login',
                            'port' => $this->smtpPort,
                            'username' => $this->smtpUserName,
                            'password' => $this->smtpPassword
                        );

                        //require_once $this->deviceBasePath.'library/Zend/Mail.php';
                        //require_once $this->deviceBasePath.'library/Zend/Mail/Transport/Smtp.php';

                        $transport = new Zend_Mail_Transport_Smtp($this->smtpHost, $config_details);
                        $mail = new Zend_Mail("iso-8859-1");
                        $mail->setBodyHtml($message);
                        $mail->setFrom($this->fromEmail, $this->fromName);
                        $mail->addTo($this->fromEmail, $this->fromName);
                        $mail->setSubject($subject);
                        // $mail->send($transport);
                        try {
                            $mail->send($transport);
                        } catch (Exception $ex) {
                            print_r($ex, true);
                        }

                        //End code for send mail                 

                        $email_arr = array($this->fromEmail, $email);
                        $html = new Zend_View();
                        $html->setScriptPath('emailTemplate/');
                        $bodyText = $html->render('mailer.phtml');

                        foreach ($email_arr as $val) {
                            $mail_user = new Zend_Mail("utf-8");
                            if ($val == $this->fromEmail) {
                                $mail_user->setBodyHtml($message);
                                $username_mail = $this->fromName;
                            } else {
                                $mail_user->setBodyHtml($bodyText);
                                $username_mail = $username;
                            }

                            $mail_user->setFrom($this->fromEmail, $this->fromName);
                            $mail_user->addTo($val, "$username_mail");

                            $mail_user->setSubject($subject);
                            //$mail_user->send($transport);

                            try {
                                $mail_user->send($transport);
                            } catch (Exception $ex) {
                                print_r($ex, true);
                            }
                        }
                    }
                    //End code for send mail
                    $lms->add($dataArray);
                    $this->_redirect("lms/nrithankyou");
                }
            }
        }
        //End nri banking lms from code here
        //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
    }

    /**
     * thankyou() method is used to submit nri banking lms form
     * @param page string
     * @return object 
     */
    public function thankyouAction() {
        //Call Model Here
        $menu = new Application_Model_Menu();

        //Start Code for quick 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
        //Start nri banking lms from code here
        $this->view->headTitle()->prepend($this->page_title);
        $this->view->headMeta()->appendName("description", $this->page_description);
        $this->view->headMeta()->appendName("keyword", $this->page_keywords);

        //End nri banking lms from code here
        //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   
    }

    /**
     * complaintthankyou() method is used to submit nri banking lms form
     * @param page string
     * @return object 
     */
    public function complaintthankyouAction() {
        //Call Model Here
        $menu = new Application_Model_Menu();

        //Start Code for quick 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
        //Start nri banking lms from code here
        $this->view->headTitle()->prepend($this->page_title);
        $this->view->headMeta()->appendName("description", $this->page_description);
        $this->view->headMeta()->appendName("keyword", $this->page_keywords);

        //End nri banking lms from code here
        //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   
    }

    /**
     * emailthankyou() method is used to submit nri banking lms form
     * @param page string
     * @return object 
     */
    public function emailthankyouAction() {
        //Call Model Here
        $menu = new Application_Model_Menu();

        //Start Code for quick 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
        //Start nri banking lms from code here
        $this->view->headTitle()->prepend($this->page_title);
        $this->view->headMeta()->appendName("description", $this->page_description);
        $this->view->headMeta()->appendName("keyword", $this->page_keywords);

        //End nri banking lms from code here
        //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
    }

    /**
     * nrithankyou() method is used to submit nri banking lms form
     * @param page string
     * @return object 
     */
    public function nrithankyouAction() {
        //Call Model Here
        $menu = new Application_Model_Menu();

        //Start Code for quick 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
        //Start nri banking lms from code here
        $this->view->headTitle()->prepend($this->page_title);
        $this->view->headMeta()->appendName("description", $this->page_description);
        $this->view->headMeta()->appendName("keyword", $this->page_keywords);

        //End nri banking lms from code here
        //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
    }

    /**
     * nriLeaveYourNumber() method is used to submit nri leave your number lms form
     * @param page string
     * @return object 
     */
    public function nriLeaveYourNumberAction() {
        //Call Model Here
        $menu = new Application_Model_Menu();
        $lms = new Application_Model_Lms();

        //Start Code for quick 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
        //Start leave your number lms from code here
        $this->view->headTitle()->prepend($this->page_title);
        $this->view->headMeta()->appendName("description", $this->page_description);
        $this->view->headMeta()->appendName("keyword", $this->page_keywords);

        //Start Code for tracking code
        $url_utm_content = $this->getRequest()->getParam("utm_content");
        $url_utm_term = $this->getRequest()->getParam("utm_term");
        $url_ip_address = @$_SERVER['REMOTE_ADDR'];
        $tracking_details = $lms->getNriTrackingByIp($url_ip_address, strtolower($url_utm_term));
        if (empty($tracking_details)) {
            $tracking_arr = array(
                'ip_address' => $url_ip_address,
                'source_name' => strtolower($url_utm_term),
                'count_val' => '1',
                'status' => '1'
            );
            $lms->insertNriTracking($tracking_arr);
        }

        //Detect Mobile Browser or Web Browser
        if ($this->mobile_detect->isMobile() == "mobile") {
            $deviceType = "mobile";
        } else if ($this->mobile_detect->isTablet() == "tablet") {
            $deviceType = "mobile";
        } else {
            $deviceType = "desktop";
        }
        $this->view->mobile_detect = $deviceType;

        //Start code for check menu list
        $page_url = $this->sess_page_name;
        $ppage_url = $this->sess_ppage_name;
        $this->view->page_name = $this->sess_page_name;

        if ($page_url != "" && $ppage_url == "") {
            $fpage_url = $page_url;
        } else if ($page_url != "" && $ppage_url != "") {
            $fpage_url = $ppage_url;
        }
        $this->view->page_title = $this->page_title;

        //----------Get left menu by page url------------//
        if ($page_url) {
            $getMenuData = $menu->getMenuListByPageUrl($page_url); //10,9
            //echo '<pre>';print_r($getMenuData);exit;
            $this->view->parentId = $getMenuData;
            $parent_details = $menu->getAllParentDetailsArrayById($getMenuData['parent_id']);
            $this->view->parent_name = $parent_details['level'];
            $this->view->parent_url = $parent_details['url'];
            //echo '<pre>';print_r($parent_details);exit;
            $checkChileList = $menu->getChildListById($getMenuData['id']);
            //echo $checkChileList; 
            $this->view->checkChileList = $checkChileList;
        }

        if ($getMenuData['id'] != "" && ($getMenuData['parent_id'] == 0 && $getMenuData['parent_id'] != "")) {
            //echo "roort yes";die;
            $this->__getLeftMenuListById($getMenuData['id']);
        } else if (@$getMenuData['id'] != "" && @$getMenuData['parent_id'] != 0) {
            //echo "yes1"; die; //9,8
            //Second Lb menu id 
            $getParentIdData = $menu->getLastParentIdByParentId(@$getMenuData['parent_id']);
            //  echo "<pre>";print_r($getParentIdData); 
            if (@$getParentIdData['id'] != "" && @$getParentIdData['parent_id'] != 0) {
                //8,2
                //Third Lb menu id 
                $this->view->also_vist = "third";
                $getSubParentIdData = $menu->getLastParentIdByParentId(@$getParentIdData['parent_id']);
                // echo "<pre>";print_r($getSubParentIdData);
                if (@$getSubParentIdData['id'] != "" && @$getSubParentIdData['parent_id'] != 0) {
                    //2,0
                    //Fourth Lb menu id 
                    $this->view->also_vist = "fourth";
                    $getSubSubParentIdData = $menu->getLastParentIdByParentId($getSubParentIdData['parent_id']);
                    //echo "<pre>";print_r($getSubSubParentIdData);
                    if (@$getSubSubParentIdData['id'] != "" && @$getSubSubParentIdData['parent_id'] != 0) {
                        //echo "fifth"; die;
                    } else if (@$getSubSubParentIdData['id'] != "" && (@$getSubSubParentIdData['parent_id'] == 0 && @$getSubSubParentIdData['parent_id'] != "")) {
                        //echo "root yes";die;
                        $this->__getLeftMenuListById(@$getSubSubParentIdData['id']);
                    }
                } else if ($getSubParentIdData['id'] != "" && (@$getSubParentIdData['parent_id'] == 0 && @$getSubParentIdData['parent_id'] != "")) {
                    //echo "Third";die;
                    $this->__getLeftMenuListById($getSubParentIdData['id']);
                }
            } else if (@$getParentIdData['id'] != "" && (@$getParentIdData['parent_id'] == 0 && @$getParentIdData['parent_id'] != "")) {
                $this->__getLeftMenuListById(@$getParentIdData['id']);
            }
        }
        //end code for check menu list

        $form = new Application_Form_Nrileaveyournumber();
        $this->view->form = $form;

        if ($this->getRequest()->isPost()) {
            $getData = $this->getRequest()->getPost();
            //echo "<pre>";print_r($getData);die;

            if ($form->isValid($getData)) {

                if (strtolower($getData['captcha']) != $_SESSION['captcha']) {
                    $this->view->errorMessage = "Captcha code invalid.";
                } else {
                    //Start code for section wise url and section name
                    if ($getData['url']) {
                        $reference_page_name = @end(@explode("/", $getData['url']));

                        $url_path = @explode($this->siteUrl, $getData['url']);
                        $reference_section_url = @$url_path[1];

                        if ($reference_section_url) {
                            $section_page_url = $reference_section_url;
                        } else {
                            $section_page_url = "";
                        }

                        if ($reference_page_name) {
                            $sec_name = @explode("?", $reference_page_name);
                            $reference_page_name_det = $sec_name[0];
                        }

                        $getMenuData = $menu->getMenuListByPageUrl($reference_page_name_det);
                        $getMenuDetails = null;
                        if ($getMenuData['id'] != "" && ($getMenuData['parent_id'] == 0 && $getMenuData['parent_id'] != "")) {
                            //echo "roort yes";die;
                            $getMenuDetails = $menu->getAllFirstLbMenuListById($getMenuData['id']);
                        } else if (@$getMenuData['id'] != "" && @$getMenuData['parent_id'] != 0) {
                            //echo "yes1"; die; //9,8
                            //Second Lb menu id 
                            $getParentIdData = $menu->getLastParentIdByParentId(@$getMenuData['parent_id']);
                            //  echo "<pre>";print_r($getParentIdData); 
                            if (@$getParentIdData['id'] != "" && @$getParentIdData['parent_id'] != 0) {
                                //8,2
                                //Third Lb menu id 
                                $getSubParentIdData = $menu->getLastParentIdByParentId(@$getParentIdData['parent_id']);
                                // echo "<pre>";print_r($getSubParentIdData);
                                if (@$getSubParentIdData['id'] != "" && @$getSubParentIdData['parent_id'] != 0) {
                                    //2,0
                                    //Fourth Lb menu id 
                                    $getSubSubParentIdData = $menu->getLastParentIdByParentId($getSubParentIdData['parent_id']);
                                    //echo "<pre>";print_r($getSubSubParentIdData);
                                    if (@$getSubSubParentIdData['id'] != "" && @$getSubSubParentIdData['parent_id'] != 0) {
                                        //echo "fifth"; die;
                                    } else if (@$getSubSubParentIdData['id'] != "" && (@$getSubSubParentIdData['parent_id'] == 0 && @$getSubSubParentIdData['parent_id'] != "")) {
                                        //echo "root yes";die;
                                        $getMenuDetails = $menu->getAllFirstLbMenuListById(@$getSubSubParentIdData['id']);
                                    }
                                } else if ($getSubParentIdData['id'] != "" && (@$getSubParentIdData['parent_id'] == 0 && @$getSubParentIdData['parent_id'] != "")) {
                                    //echo "Third";die;
                                    $getMenuDetails = $menu->getAllFirstLbMenuListById($getSubParentIdData['id']);
                                }
                            } else if (@$getParentIdData['id'] != "" && (@$getParentIdData['parent_id'] == 0 && @$getParentIdData['parent_id'] != "")) {
                                $getMenuDetails = $menu->getAllFirstLbMenuListById(@$getParentIdData['id']);
                            }
                        }

                        if ($getMenuDetails) {
                            $section_page_name = ucwords(strtolower($getMenuDetails[0]['level']));
                        } else {
                            $section_page_name = "";
                        }
                    } else {
                        $section_page_name = '';
                        $section_page_url = '';
                    }

                    if ($getData['country_name'] != "") {
                        $country = $lms->getCountryCodeByCountry($getData['country_name']);
                        $country_code = $country['CountryCode'];
                    } else {
                        $country_code = "";
                    }

                    $dataArray = array(
                        'application_type' => $deviceType,
                        'lms_type' => 'nri_leave_your_number',
                        'title' => $this->sanitize_data($getData['title']),
                        'first_name' => $this->sanitize_data($getData['fname']),
                        'last_name' => $this->sanitize_data($getData['lname']),
                        'email' => $this->sanitize_data($getData['email']),
                        'country' => $this->sanitize_data($getData['country_name']),
                        'city_name' => $this->sanitize_data($getData['city_name']),
                        'country_code' => $country_code,
                        'area_code' => $this->sanitize_data($getData['area_code']),
                        'landline_no' => $this->sanitize_data($getData['landline_no']),
                        'mobile_no' => $this->sanitize_data($getData['mobile_no']),
                        'section_page_name' => $this->sanitize_data($section_page_name),
                        'section_page_url' => $this->sanitize_data($section_page_url),
                        'utm_content' => $this->sanitize_data($getData['utm_content']),
                        'utm_source' => $this->sanitize_data($getData['utm_source']),
                        'utm_medium' => $this->sanitize_data($getData['utm_medium']),
                        'utm_campaign' => $this->sanitize_data($getData['utm_campaign']),
                        'utm_term' => $this->sanitize_data($getData['utm_term']),
                        'status' => 'Deactive',
                        'createdOn' => date("Y-m-d H:i:s")
                    );

                    //Start code for send mail  
                    if ($this->sanitize_data($getData['email'])) {

                        if (($reference_page_name != "") && ($reference_page_name != "leave-your-number")) {
                            if ($reference_page_name != '') {
                                $page_title_data = $lms->getPageTitleByPageUrl($reference_page_name);
                                $page_title = ucwords(strtolower($page_title_data));
                                $page_title = str_replace("Dcb", "DCB ", $page_title);
                                $page_title = str_replace("Sms", "SMS ", $page_title);
                                $page_title = str_replace("Bsbda", "BSBDA ", $page_title);
                            }
                        } else {
                            $page_title = "";
                        }

                        //Get users details
                        $username = ucfirst($this->sanitize_data($getData['fname'])) . ' ' . ucfirst($this->sanitize_data($getData['lname']));
                        $email = $this->sanitize_data($getData['email']);
                        $country = $getData['country_name'];
                        $city = $this->sanitize_data($getData['city_name']);
                        $mobile_no = $this->sanitize_data($getData['mobile_no']);
                        $landline_no = $this->sanitize_data($getData['landline_no']);
                        $area_code = $this->sanitize_data($getData['area_code']);
                        $utm_content = $this->sanitize_data($getData['utm_content']);
                        $utm_source = $this->sanitize_data($getData['utm_source']);
                        $utm_medium = $this->sanitize_data($getData['utm_medium']);
                        $utm_campaign = $this->sanitize_data($getData['utm_campaign']);
                        $utm_term = $this->sanitize_data($getData['utm_term']);
                        $url = $getData['url'];

                        if ($page_title != "") {
                            $subject = "Nri leave your number form" . ' - ' . $page_title;
                        } else {
                            $subject = "Nri leave your number form";
                        }

                        //Mail Send for dcb bank
                        $message = "Hi, <br><br>";
                        $message .= "Nri leave your number lms details:<br><br>";
                        $message .= "Username: $username <br>";
                        $message .= "Email: $email <br>";
                        if ($mobile_no != "" && $landline_no == "") {
                            $message .= "Mobile No.: $mobile_no <br>";
                        } else if ($landline_no != "" && $mobile_no != "") {
                            $message .= "Mobile No.: $mobile_no <br>";
                            $message .= "Landline No.: $landline_no <br>";
                            $message .= "Area Code: $area_code <br>";
                        } else if ($landline_no != "" && $mobile_no == "") {
                            $message .= "Landline No.: $landline_no <br>";
                            $message .= "Area Code: $area_code <br>";
                        }
                        $message .= "Country: $country <br>";
                        $message .= "City: $city <br>";
                        if ($utm_content && $utm_source && $utm_medium && $utm_campaign && $utm_term) {
                            $message .= "UTM Content: $utm_content <br>";
                            $message .= "UTM Source: $utm_source <br>";
                            $message .= "UTM Medium: $utm_medium <br>";
                            $message .= "UTM Campaign: $utm_campaign <br>";
                            $message .= "UTM Term: $utm_term <br>";
                        }

                        $message .= "URL: $url <br><br>";
                        $message .= "Thanks,<br>";
                        $message .= "DCB Bank Team";
                        //Start code fot smtp mail details                         
                        $config_details = array(
                            'auth' => 'login',
                            'port' => $this->smtpPort,
                            'username' => $this->smtpUserName,
                            'password' => $this->smtpPassword
                        );

                        //require_once '/var/www/html/dcbwebsite/library/Zend/Mail.php';
                        //require_once '/var/www/html/dcbwebsite/library/Zend/Mail/Transport/Smtp.php';

                        $transport = new Zend_Mail_Transport_Smtp($this->smtpHost, $config_details);

                        $mail = new Zend_Mail("iso-8859-1");
                        $mail->setBodyHtml($message);
                        $mail->setFrom($this->nriFromEmail, $this->fromName);
                        $mail->addTo($this->nriFromEmail, $this->fromName);
                        $mail->setSubject($subject);

                        try {
                            $mail->send($transport);
                        } catch (Exception $ex) {
                            print_r($ex, true);
                        }

                        //Mail Send for dcb bank                       
                        $email_arr = array($this->nriFromEmail, $email);
                        $html = new Zend_View();
                        $html->setScriptPath('emailTemplate/');
                        $bodyText = $html->render('mailer.phtml');

                        foreach ($email_arr as $val) {

                            $mail_user = new Zend_Mail("utf-8");
                            if ($val == $this->nriFromEmail) {
                                $mail_user->setBodyHtml($message);
                                $username_mail = $this->fromName;
                            } else {
                                $mail_user->setBodyHtml($bodyText);
                                $username_mail = $username;
                            }

                            $mail_user->setFrom($this->nriFromEmail, $this->fromName);
                            $mail_user->addTo($val, "$username_mail");
                            $mail_user->setSubject($subject);

                            try {
                                $mail_user->send($transport);
                            } catch (Exception $ex) {
                                print_r($ex, true);
                            }
                        }
                    }
                    //End code for send mail                 
                    try {
                        $lms->add($dataArray);
                    } catch (Exception $e) {
                        print_r($e, true);
                    }
                    $this->_redirect("lms/nrilthankyou");
                }
            }
        }
        //End leave your number lms from code here
        //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
    }

    /**
     * nrilthankyou() method is used to submit nri leave your number lms form
     * @param page string
     * @return object 
     */
    public function nrilthankyouAction() {
        //Call Model Here
        $menu = new Application_Model_Menu();

        //Start Code for quick 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
        //Start nri banking lms from code here
        $this->view->headTitle()->prepend($this->page_title);
        $this->view->headMeta()->appendName("description", $this->page_description);
        $this->view->headMeta()->appendName("keyword", $this->page_keywords);
        //End nri banking lms from code here
        //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 getCityAction() {

        $this->_helper->layout()->disableLayout('');
        if ($this->_request->isXmlHttpRequest()) {
            $sid = $this->getRequest()->getParam('sid');

            $state = new Application_Model_State();
            $city_list = $state->getAllCitiesListByStateId($sid);
            //echo "<pre>";print_r($city_list);die;

            $select = '<option value="">--Select City * --</option>';
            if (count($city_list) > 0) {
                foreach ($city_list as $val) {
                    $select .= '<option value="' . $val['id'] . '">' . $val['city_name'] . '</option>';
                }
            }
            //$select .= '</select>';

            echo $select;
        }
        exit;
    }

    /**
     * termsConditions() method is used to send email
     * @param Null
     * @return Array 
     */
    public function termsConditionsAction() {
        $this->_helper->layout()->disableLayout('');
    }

    /**
     * __getLeftMenuListById() method is used to get all menu list by page url
     * @param page string
     * @return object
     */
    private function __getLeftMenuListById($menu_id) {
        //Start Code for quick menu
        $menu = new Application_Model_Menu();
        $firstlb_menus = $menu->getAllFirstLbMenuListById($menu_id);

        $all_menu_list_arr = array();
        foreach ($firstlb_menus as $firstlb_menus_list) {
            $secondlb_menus = $menu->getAllSecondORThirdOrFourthLbMenuListById($firstlb_menus_list['id']);

            $secondlb_menus_list_arr = array();
            foreach ($secondlb_menus as $secondlb_menus_list) {
                $thirdlb_menus = $menu->getAllSecondORThirdOrFourthLbMenuListById($secondlb_menus_list['id']);
                $allthirdlb_menusarr = $menu->getAllThirdOrFourthLbMenuListArrayById($secondlb_menus_list['id']);
                $allseclb_parentarr = $menu->getAllParentDetailsArrayById($secondlb_menus_list['parent_id']);

                $thirdlb_menus_list_arr = array();
                foreach ($thirdlb_menus as $thirdlb_menus_list) {
                    $fourthlb_menus = $menu->getAllSecondORThirdOrFourthLbMenuListById($thirdlb_menus_list['id']);
                    $allfourthlb_menusarr = $menu->getAllThirdOrFourthLbMenuListArrayById($thirdlb_menus_list['id']);
                    $allthirdlb_parentarr = $menu->getAllParentDetailsArrayById($thirdlb_menus_list['parent_id']);

                    $fourthlb_menus_list_arr = array();

                    foreach ($fourthlb_menus as $fourthlb_menus_list) {
                        $allfifthlb_menusarr = $menu->getAllThirdOrFourthLbMenuListArrayById($fourthlb_menus_list['id']);
                        $allfourthlb_parentarr = $menu->getAllParentDetailsArrayById($fourthlb_menus_list['parent_id']);

                        $fifthlb_menus_list_arr = array('life-term-plans', 'life-endowment-plans');
                        $fourthlb_menus_list_arr[] = array(
                            'id' => $fourthlb_menus_list['id'],
                            'parent_id' => $fourthlb_menus_list['parent_id'],
                            'level_name' => $fourthlb_menus_list['level'],
                            'sub_level_name' => $fourthlb_menus_list['sub_level_name'],
                            'url' => $fourthlb_menus_list['url'],
                            'external_url' => $fourthlb_menus_list['external_url'],
                            'image' => $fourthlb_menus_list['image'],
                            'fourthlb_parent_url' => $allfourthlb_parentarr['url'],
                            'fifthlb_menu_count' => 0,
                            'fifthlb_menu' => $fifthlb_menus_list_arr,
                            'fifthlb_submenu_url' => $allfifthlb_menusarr
                        );
                    }

                    $thirdlb_menus_list_arr[] = array(
                        'id' => $thirdlb_menus_list['id'],
                        'parent_id' => $thirdlb_menus_list['parent_id'],
                        'level_name' => $thirdlb_menus_list['level'],
                        'sub_level_name' => $thirdlb_menus_list['sub_level_name'],
                        'url' => $thirdlb_menus_list['url'],
                        'external_url' => $thirdlb_menus_list['external_url'],
                        'image' => $thirdlb_menus_list['image'],
                        'thirdlb_parent_url' => $allthirdlb_parentarr['url'],
                        'fourthlb_menu_count' => count($fourthlb_menus_list_arr),
                        'fourthlb_menu' => $fourthlb_menus_list_arr,
                        'fourthlb_submenu_url' => $allfourthlb_menusarr['sub_url']
                    );
                }

                $secondlb_menus_list_arr[] = array(
                    'id' => $secondlb_menus_list['id'],
                    'parent_id' => $secondlb_menus_list['parent_id'],
                    'level_name' => $secondlb_menus_list['level'],
                    'sub_level_name' => $secondlb_menus_list['sub_level_name'],
                    'url' => $secondlb_menus_list['url'],
                    'external_url' => $secondlb_menus_list['external_url'],
                    'image' => $secondlb_menus_list['image'],
                    'seclb_parent_url' => $allseclb_parentarr['url'],
                    'thirdlb_menu_count' => count($thirdlb_menus_list_arr),
                    'thirdlb_menu' => $thirdlb_menus_list_arr,
                    'thirdlb_submenu_url' => $allthirdlb_menusarr['sub_url']
                );
            }

            $all_menu_list_arr[] = array(
                'id' => $firstlb_menus_list['id'],
                'parent_id' => $firstlb_menus_list['parent_id'],
                'level_name' => $firstlb_menus_list['level'],
                'sub_level_name' => $firstlb_menus_list['sub_level_name'],
                'url' => $firstlb_menus_list['url'],
                'external_url' => $firstlb_menus_list['external_url'],
                'image' => $firstlb_menus_list['image'],
                'secondlb_menu_count' => count($secondlb_menus_list_arr),
                'secondlb_menu' => $secondlb_menus_list_arr
            );
        }
        //echo "<pre>";print_r($all_menu_list_arr);die;
        $this->view->all_leftmenu_list = $all_menu_list_arr;
    }

    public function sanitize_data($input_data) {
        $searchArr = array("document", "write", "alert", "%", "$", ";", "+", "|", "#", "<", ">", ")", "(", "'", "\'", ",", "AND", "JAVASCRIPT");
        $input_data = str_replace("script", "", $input_data);
        $input_data = str_replace("iframe", "", $input_data);
        $input_data = str_replace($searchArr, "", $input_data);
        return htmlentities(stripslashes($input_data), ENT_QUOTES);
    }

    public function getComplaineSubCatAction() {
//        $subCatId = array(
//            1 => array(
//                1 => 'Customer Disputes',
//                2 => 'Documents Related',
//                3 => 'Insurance Policy',
//                4 => 'Misselling',
//                5 => 'Payments Related',
//                6 => 'Pradhan Mantri Awas Yojna'
//            ),
//            2 => array(
//                1 => 'Discrepancy in Transaction',
//                2 => 'SMS Alerts'
//            ),
//            3 => array(
//                1 => 'Card Hotlist',
//                2 => 'Card Not Working',
//                3 => 'Card PIN',
//                4 => 'Charges Related',
//                5 => 'Deliverables ',
//                6 => 'Discrepancy in Transaction',
//                7 => 'Misuse of Debit Card'
//            ),
//            4 => array(
//                1 => 'Customer Disputes'
//            ),
//            5 => array(
//                1 => 'Balance Enquirys',
//                2 => 'Cheque Book',
//                3 => 'Customer Disputes',
//                4 => 'Email Statement for Last 1 month',
//                5 => 'Mini Statement'
//            ),
//            6 => array(
//                1 => 'Discrepancy in Transaction',
//                2 => 'Technical Issue'
//            ),
//            7 => array(
//                1 => 'Technical Issue'
//            ),
//            8 => array(
//                1 => 'Card Not Working',
//                2 => 'Card PIN',
//                3 => 'Charges Related',
//                4 => 'Customer Disputes ',
//                5 => 'Deliverables',
//                6 => 'Discrepancy in Transaction',
//                7 => 'Leads',
//                8 => 'Misuse of Card'
//            ),
//            9 => array(
//                1 => 'Discrepancy in Transaction',
//                2 => 'Email Alerts',
//                3 => 'Misuse of Internet Banking',
//                4 => 'Online Request',
//                5 => 'Password Generation Issue',
//                6 => 'PIB Log In-Issues',
//                7 => 'Registration Not Done',
//                8 => 'Utility Bill Payment'
//            ),
//            10 => array(
//                1 => 'Bajaj Allianz Card',
//                2 => 'Belstar',
//                3 => 'Cinqo',
//                4 => 'DCB Direct - GPR Card',
//                5 => 'DCB Meal Card (YAP)',
//                6 => 'Fullerton',
//                7 => 'IIFL',
//                8 => 'Jana Card',
//                9 => 'Madura',
//                10 => 'Midland Microfinance',
//                11 => 'Muthoot Finance - Ambassador',
//                12 => 'Muthoot Finance - Gold',
//                13 => 'Muthoot Forex - Royal Money',
//                14 => 'NiYo Card',
//                15 => 'Paysack',
//                16 => 'SKS',
//                17 => 'Slonkit Card',
//                18 => 'Stashfin',
//                19 => 'Thomas Cook'
//            ),
//            11 => array(
//                1 => 'Email Alerts',
//                2 => 'SMS Alerts'
//            ),
//            12 => array(
//                1 => 'Updation / Modification - Not Done'
//            ),
//            13 => array(
//                1 => 'Transaction Details'
//            ),
//            14 => array(
//                1 => 'Cheque Book',
//                2 => 'Courier Related Complaints',
//                3 => 'DCA',
//                4 => 'DKD Certificate / Passbook',
//                5 => 'Internet Banking Pin',
//                6 => 'Statement Of Account',
//                7 => 'Statement Of Account - Consolidated',
//                8 => 'TDS Certificate',
//                9 => 'Welcome Kit'
//            ),
//            15 => array(
//                1 => 'Cancellation',
//                2 => 'Customer Disputes'
//            ),
//            16 => array(
//                1 => 'Technical Issue',
//                2 => 'Transaction Related'
//            ),
//            17 => array(
//                1 => 'Technical Issue'
//            ),
//            18 => array(
//                1 => 'Misuse of Internet Banking',
//                2 => 'Online Request',
//                3 => 'Registration Not Done',
//                4 => 'Technical Issue',
//                5 => 'Utility Bill Payment'
//            ),
//            19 => array(
//                1 => 'Collection',
//                2 => 'Payments'
//            ),
//            20 => array(
//                1 => 'Documents Related',
//                2 => 'Insurance Policy',
//                3 => 'Misselling',
//                4 => 'Payments Related'
//            ),
//            21 => array(
//                1 => 'Atal Pension Yojna',
//                2 => 'General Insurance (Other Than GPA)',
//                3 => 'GPA',
//                4 => 'Health Insurance',
//                5 => 'Life Insurance',
//                6 => 'PMJJBY',
//                7 => 'PMSBY'
//            ),
//            22 => array(
//                1 => 'Bank Guarantee',
//                2 => 'Inward Remittance',
//                3 => 'Letter of Credit',
//                4 => 'Outward Remittance'
//            ),
//            23 => array(
//                1 => 'Customer Disputes',
//                2 => 'Documents Related',
//                3 => 'Misselling',
//                4 => 'Payments Related'
//            ),
//            24 => array(
//                1 => 'Customer Disputes ',
//                2 => 'Documents Related',
//                3 => 'Misselling',
//                4 => 'Payments Related'
//            ),
//            25 => array(
//                1 => 'Application',
//                2 => 'Customer Disputes ',
//                3 => 'Deliverables',
//                4 => 'Technical Issue'
//            ),
//            26 => array(
//                1 => 'Current Account',
//                2 => 'Savings Account'
//            ),
//            27 => array(
//                1 => 'FCNR Deposit',
//                2 => 'FCNR Suraksha Deposit',
//                3 => 'Fixed Deposit',
//                4 => 'NRE Recurring Deposit',
//                5 => 'NRE Suraksha Deposit',
//                6 => 'NRE Term Deposit',
//                7 => 'NRO Recurring Deposit',
//                8 => 'NRO Suraksha Deposit',
//                9 => 'NRO Term Deposit',
//                10 => 'Recurring Deposit',
//                11 => 'Suraksha Deposit',
//                12 => 'TAX Saver Deposit',
//                13 => 'Zippi Deposit'
//            ),
//            28 => array(
//                1 => 'Demat',
//                2 => 'Gold Bond',
//                3 => 'Mutual Fund'
//            ),
//            29 => array(
//                1 => 'Technical Issue'
//            )
//        );

        $html = '';
        $this->_helper->layout()->disableLayout('');
        if ($this->_request->isXmlHttpRequest()) {
            $getData = $this->getRequest()->getPost();
            $catId = $this->sanitize_data($getData['catId']);
            $lmsModel = new Application_Model_Lms();
            $complaintSubCatData = $lmsModel->getComplaintSubCategory($catId);
            if (!empty($complaintSubCatData) && is_array($complaintSubCatData)) {
                $html .= "<option value = ''>Select</option>";
                foreach ($complaintSubCatData as $key => $val) {
                    $html .= "<option value='" . $val['id'] . "'>" . $val['name'] . "</option>";
                }
            }
        }
        echo $html;
        exit;
    }

    public function getComplaineSubCatCustomerAction() {
//        $subCatId =  array(
//            1 => array(
//                1 => array(
//                    1 => 'Loan Not Sanctioned',
//                    2 => 'Settlement Related',
//                    3 => 'Reason for EMI bounce',
//                    4 => 'Non Updation of EMI',
//                    5 => 'EMI/TENURE/ROI DISPUTE',
//                    6 => 'CIBIL Report Updation',
//                    7 => 'Disbursal amount not received'
//                ),
//                2 => array(
//                    1 => 'Discharge letter Not Received',
//                    2 => 'List of Documents not received',
//                    3 => 'Welcome/Sanction letter not received',
//                    4 => 'Interest Certificate not received',
//                    5 => 'Unused PDC not received - Loan closed',
//                    6 => 'GST Invoice Not Received',
//                    7 => 'Settlement NOC not received',
//                    8 => 'Statement of Account not received',
//                    //9 => 'Drop',
//                    10 => 'Copy of Loan Documents Not Received'
//                ),
//                3 => array(
//                    1 => 'Insurance Policy Documents Not Received',
//                    2 => 'Misselling of Insurance Policy'
//                ),
//                4 => array(
//                    1 => 'Bribery',
//                    2 => 'Incorrect / Incomplete Product Info',
//                    3 => 'Loan Cancellation'
//                ),
//                5 => array(
//                    1 => 'EMI Debited twice',
//                    2 => 'Part Payment done but not reflecting',
//                    3 => 'EMI Debited but Not Reflecting',
//                    4 => 'Over-Due Charges paid but not reflecting',
//                    5 => 'Cheque bounce charges paid but not reflecting',
//                    6 => 'Late Payment charges paid but not reflecting',
//                    7 => 'Gap interest paid but not reflecting',
//                    8 => 'Foreclosure Payment done but Not Reflecting',
//                    9 => 'Payment for Physical Copy of Sanction Letter Not Reflecting',
//                    //  10 => 'Drop',
//                    11 => 'Payment for Copy of Property Documents Not Reflecting'
//                ),
//                6 => array(
//                    1 => 'Subsidy Not Received',
//                ),
//            ),
//            2 => array(
//                1 => array(
//                    1 => 'Amount Not Credited',
//                ),
//                2 => array(
//                    2 => 'Not Received'
//                ),
//            ),
//            3 => array(
//                1 => array(
//                    1 => 'Reason for Hotlist'
//                ),
//                2 => array(
//                    1 => 'At ATM/POS'
//                ),
//                3 => array(
//                    1 => 'Pin not received'
//                ),
//                4 => array(
//                    1 => 'Cash Back not received'
//                ),
//                5 => array(
//                    1 => 'Card Not Received'
//                ),
//                6 => array(
//                    1 => 'CND/Partial CND at DCB ATM',
//                    2 => 'CND/Partial CND at Non DCB ATM',
//                    3 => 'Online/Internet',
//                    4 => 'POS Machine',
//                    5 => 'Request for 2nd Chargeback',
//                    6 => 'VISA Card to Card Transfer'
//                ),
//                7 => array(
//                    1 => 'PIN Not Shared',
//                    2 => 'PIN Shared'
//                ),
//            ),
//            4 => array(
//                1 => array(
//                    1 => 'Amount Not Credited',
//                    2 => 'EDC Machine Not Working',
//                    3 => 'Machine Not Installed',
//                    4 => 'Service Charges'
//                ),
//            ),
//            5 => array(
//                1 => array(
//                    1 => 'Not Received'
//                ),
//                2 => array(
//                    1 => 'Not Processed'
//                ),
//                3 => array(
//                    1 => 'Not Registered'
//                ),
//                4 => array(
//                    1 => 'Alert Not Received',
//                    2 => 'Delay in Receiving Alert'
//                ),
//                5 => array(
//                    1 => 'Not Received'
//                ),
//            ),
//            6 => array(
//                1 => array(
//                    1 => 'IMPS Not Credited',
//                    2 => 'Transfer Done Not Cedited'
//                ),
//                2 => array(
//                    1 => 'Cannot Initiate Cheque Book Request',
//                    2 => 'Cannot Initiate SOA Request',
//                    3 => 'MPIN Link Not Received',
//                    4 => 'OTP Not Received',
//                    5 => 'Stop Cheque Request Not Processed',
//                    6 => 'Unable To Add Beneficiary',
//                    7 => 'Unable To Register'
//                ),
//            ),
//            7 => array(
//                1 => array(
//                    1 => 'Unable To Login',
//                    2 => 'Unable To Register'
//                ),
//            ),
//            8 => array(
//                1 => array(
//                    1 => 'At ATM/POS'
//                ),
//                2 => array(
//                    1 => 'Not Working',
//                    2 => 'Update Status'
//                ),
//                3 => array(
//                    1 => 'Cash Back not Received'
//                ),
//                4 => array(
//                    1 => 'CIBIL Related',
//                    2 => 'Delay in Account Opening',
//                    3 => 'Incorrect Details Captured',
//                    4 => 'Misselling'
//                ),
//                5 => array(
//                    1 => 'Card Not Received/Update Status'
//                ),
//                6 => array(
//                    1 => 'CND/Partial CND at DCB ATM',
//                    2 => 'CND/Partial CND at Non DCB ATM',
//                    3 => 'Online/Internet',
//                    4 => 'POS Machine',
//                    5 => 'Request for 2nd Chargeback ',
//                    6 => 'VISA Card to Card Transfer'
//                ),
//                7 => array(
//                    1 => 'No Response To Leads'
//                ),
//                8 => array(
//                    1 => 'PIN Not Shared',
//                    2 => 'PIN Shared'
//                ),
//            ),
//            9 => array(
//                1 => array(
//                    1 => 'DCB to DCB Transaction Dispute',
//                    2 => 'Erroneous Fund tranfer -  IMPS',
//                    3 => 'Erroneous Fund tranfer -  NEFT',
//                    4 => 'Erroneous Fund tranfer -  RTGS',
//                    5 => 'Error in Adding benificiary/IFSC Code not Mapped',
//                    6 => 'IMPS Related',
//                    7 => 'NEFT Related',
//                    8 => 'PG Transaction Dispute',
//                    9 => 'RTGS Related'
//                ),
//                2 => array(
//                    1 => 'OTP alerts not received',
//                    //  2 => 'Drop',
//                    3 => 'Transaction Alerts not Received'
//                ),
//                3 => array(
//                    1 => 'PIN/OTP not Shared',
//                    2 => 'PIN/OTP Shared'
//                ),
//                4 => array(
//                    1 => 'Account Statement Request not getting generated / not processed / Error',
//                    2 => 'Cheque Book not processed / Error',
//                    3 => 'Debit Card hotlist not processed / Error',
//                    4 => 'Demand Draft not Processed / Error',
//                    5 => 'FD/RD Details Wrongly Booked',
//                    6 => 'Incorrect Auto renewal',
//                    7 => 'Interest Certificate Request not Processed / Error',
//                    8 => 'Stop Payment not processed / Error'
//                ),
//                5 => array(
//                    1 => 'OTP is not getting generated/delivered to handset or any OTP related issue for online password generation',
//                    2 => 'Unable to generate password for any technical issue'
//                ),
//                6 => array(
//                    1 => 'Internet Banking PIN-Issues'
//                ),
//                7 => array(
//                    1 => 'Registration not Done'
//                ),
//                8 => array(
//                    1 => 'Account number not mapped',
//                    2 => 'Error in Addition / Deletion of biller or Payee',
//                    3 => 'Error in application-Tech Proce',
//                    4 => 'Registration not done',
//                    5 => 'Stop Payment not processed / Error'
//                ),
//            ),
//            10 => array(
//                1 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS',
//                    4 => 'Load/ Reload / Balance Transfer Not Done',
//                    5 => 'Other Card related issues',
//                    6 => 'PIN Not Working'
//                ),
//                2 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS',
//                    4 => 'Load/ Reload / Balance Transfer Not Done',
//                    5 => 'Other Card Related Issues',
//                    6 => 'PIN Not Working'
//                ),
//                3 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS',
//                    4 => 'Load/ Reload / Balance Transfer Not Done',
//                    5 => 'Other Card Related Issues',
//                    6 => 'PIN Not Working'
//                ),
//                4 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS',
//                    4 => 'Load/ Reload / Balance Transfer Not Done',
//                    5 => 'Other Card Related Issues',
//                    6 => 'PIN Not Working'
//                ),
//                5 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS'
//                ),
//                6 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS',
//                    4 => 'Load/ Reload / Balance Transfer Not Done',
//                    5 => 'Other Card Related Issues',
//                    6 => 'PIN Not Working'
//                ),
//                7 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS',
//                    4 => 'Load/ Reload / Balance Transfer Not Done',
//                    5 => 'Other Card Related Issues',
//                    6 => 'PIN Not Working'
//                ),
//                8 => array(
//                    //   1 => 'Drop'
//                ),
//                9 => array(
//                    // 1 => 'Drop'
//                ),
//                10 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS',
//                    4 => 'Load/ Reload / Balance Transfer Not Done',
//                    5 => 'Other Card Related Issues',
//                    6 => 'PIN Not Working'
//                ),
//                11 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS',
//                    4 => 'Load/ Reload / Balance Transfer Not Done',
//                    5 => 'Other Card Related Issues',
//                    6 => 'PIN Not Working'
//                ),
//                12 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS',
//                    4 => 'Load/ Reload / Balance Transfer Not Done',
//                    5 => 'Other Card Related Issues',
//                    6 => 'PIN Not Working'
//                ),
//                13 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS',
//                    4 => 'Load/ Reload / Balance Transfer Not Done',
//                    5 => 'Other Card Related Issues',
//                    6 => 'PIN Not Working'
//                ),
//                14 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS',
//                    4 => 'Load/ Reload / Balance Transfer Not Done',
//                    5 => 'Other Card Related Issues',
//                    6 => 'PIN Not Working'
//                ),
//                15 => array(
//                    //  1 => 'Drop'
//                ),
//                16 => array(
//                    // 1 => 'Drop'
//                ),
//                17 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS',
//                    4 => 'Load/ Reload / Balance Transfer Not Done',
//                    5 => 'Other Card Related Issues',
//                    6 => 'PIN Not Working'
//                ),
//                18 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS',
//                    4 => 'Load/ Reload / Balance Transfer Not Done',
//                    5 => 'Other Card Related Issues',
//                    6 => 'PIN Not Working'
//                ),
//                19 => array(
//                    1 => 'Card Not Working',
//                    2 => 'Cash Not Dispensed',
//                    3 => 'Disputed / Declined Transaction - POS',
//                    4 => 'Load/ Reload / Balance Transfer Not Done',
//                    5 => 'Other Card Related Issues',
//                    6 => 'PIN Not Working'
//                ),
//            ),
//            11 => array(
//                1 => array(
//                    1 => 'Email alerts Not Received',
//                    2 => 'Email alerts Received By Non DCB Customer'
//                ),
//                2 => array(
//                    1 => 'SMS Alerts Not Received',
//                    2 => 'SMS alerts Received By Non DCB Customer'
//                ),
//            ),
//            12 => array(
//                1 => array(
//                    1 => 'Instruction Not Processed',
//                    2 => 'Delay in Processing of Instruction',
//                    3 => 'Details Captured Incorrectly'
//                ),
//            ),
//            13 => array(
//                1 => array(
//                    1 => 'Require Beneficiary Details',
//                    2 => 'Require Beneficiary Details(Bulk)',
//                    3 => 'Require Payee Details'
//                ),
//            ),
//            14 => array(
//                1 => array(
//                    1 => 'Chq book not received'
//                ),
//                2 => array(
//                    1 => 'Blue Dart',
//                    2 => 'First Flight',
//                    3 => 'Mail Express',
//                    4 => 'Maruti Couriers',
//                    5 => 'Other ',
//                    6 => 'Professional'
//                ),
//                3 => array(
//                    1 => 'FD advice not received'
//                ),
//                4 => array(
//                    1 => 'RD certificate not received'
//                ),
//                5 => array(
//                    1 => 'PIN not received'
//                ),
//                6 => array(
//                    1 => 'Statement not received',
//                ),
//                7 => array(
//                    // 1 => 'Drop'
//                ),
//                8 => array(
//                    1 => 'TDS Certificate not received'
//                ),
//                9 => array(
//                    1 => 'Welcome kit not received'
//                ),
//            ),
//            15 => array(
//                1 => array(
//                    1 => 'Request Not Processed'
//                ),
//                2 => array(
//                    1 => 'Clarity On Charges Levied',
//                    2 => 'Return Reason'
//                ),
//            ),
//            16 => array(
//                1 => array(
//                    1 => 'Not Able to do transaction',
//                    2 => 'Not Able to Login',
//                    3 => 'Page stuck-does not move forward',
//                    4 => 'Unable to Register'
//                ),
//                2 => array(
//                    1 => 'Amount Not Credited',
//                    2 => 'Difference in Amount Credited to Beneficiary',
//                    3 => 'Swift code is invalid'
//                ),
//            ),
//            17 => array(
//                1 => array(
//                    1 => 'Card Decline/ Not Working'
//                ),
//            ),
//            18 => array(
//                1 => array(
//                    1 => 'PIN Not Shared',
//                    2 => 'PIN Shared'
//                ),
//                2 => array(
//                    1 => 'Account Statement Request Not Getting Generated / Error Via Net Banking',
//                    2 => 'Cheque Book Not Processed / Error',
//                    3 => 'Debit Card hotlist Not Processed / Error',
//                    4 => 'Demand Draft Not Processed / Error',
//                    5 => 'FD/RD Details Wrongly Booked',
//                    6 => 'Incorrect Auto Renewal',
//                    7 => 'Interest Certificate Request Not Processed / Error',
//                    8 => 'Stop Payment Not Processed / Error'
//                ),
//                3 => array(
//                    1 => 'Request Given at Branch'
//                ),
//                4 => array(
//                    1 => 'Error in Adding Beneficiary',
//                    2 => 'IFSC Code Not Mapped',
//                    3 => 'Internet Banking PIN-Issues',
//                    4 => 'Unable to Generate Password for any Technical Issue'
//                ),
//                5 => array(
//                    1 => 'Account number not mapped in Utility Bill Payment',
//                    2 => 'Error in Addition Utility bill payment',
//                    3 => 'Error in Application-Tech Process',
//                    4 => 'Registration Not Done',
//                    5 => 'Stop Payment Not Processed / Error'
//                ),
//            ),
//            19 => array(
//                1 => array(
//                    1 => 'Charges Dispute',
//                    2 => 'Cheques Pick Up Issues',
//                    3 => 'Cheques Pick Up vendor behavior',
//                    4 => 'Credit Not Received / Incorrect Debit / Credit',
//                    5 => 'Document Dispute',
//                    6 => 'Original documents not received'
//                ),
//                2 => array(
//                    1 => 'Charges Dispute'
//                )
//            ),
//            20 => array(
//                1 => array(
//                    // 1 => 'Drop'
//                ),
//                2 => array(
//                    // 1 => 'Drop'
//                ),
//                3 => array(
//                    //1 => 'Drop'
//                ),
//                4 => array(
//                    //1 => 'Drop'
//                ),
//            ),
//            21 => array(
//                1 => array(
//                    1 => 'Policy Not Renewed',
//                    2 => 'Premium Debited Twice ',
//                    3 => 'Premium Not Debited '
//                ),
//                2 => array(
//                    1 => 'Claims Settlement Dispute',
//                    2 => 'Customer Sales Dispute',
//                    3 => 'Policy Documents Not Received',
//                    4 => 'Policy payouts Not received'
//                ),
//                3 => array(
//                    1 => 'Claims Settlement Dispute',
//                    2 => 'Customer Sales Dispute',
//                    3 => 'Policy Not Renewed',
//                    4 => 'Premium Debited Twice ',
//                    5 => 'Premium Not Debited '
//                ),
//                4 => array(
//                    1 => 'Claims Settlement Dispute'
//                ),
//                5 => array(
//                    1 => 'Claims Settlement Dispute',
//                    2 => 'Customer Sales Dispute',
//                    3 => 'Policy Documents Not Received'
//                ),
//                6 => array(
//                    1 => 'Claims related Dispute',
//                    2 => 'Premium Debited Twice'
//                ),
//                7 => array(
//                    1 => 'Policy Not Renewed',
//                    2 => 'Premium Debited Twice',
//                    3 => 'Premium Not Debited'
//                ),
//            ),
//            22 => array(
//                1 => array(
//                    1 => 'Not Extended'
//                ),
//                2 => array(
//                    1 => 'Discrepancy In Funds Received',
//                    2 => 'Funds Not Credited',
//                    3 => 'Transaction Details'
//                ),
//                3 => array(
//                    1 => 'Not Discounted'
//                ),
//                4 => array(
//                    1 => 'Amount Not Credited to Beneficiary',
//                    2 => 'Charges Not Informed - Reversal',
//                    3 => 'Discrepancy In Funds Credited to Beneficiary'
//                ),
//            ),
//            23 => array(
//                1 => array(
//                    1 => 'CIBIL Updation',
//                    2 => 'Disbursal Amount Not Received',
//                    3 => 'Gold Damaged',
//                    4 => 'Gold Not Released',
//                    5 => 'Loan Not Sanction',
//                    6 => 'Renewal Not Done'
//                ),
//                2 => array(
//                    1 => 'Copy of Loan Documents Not Received',
//                    2 => 'GST Invoice Not Received',
//                    3 => 'Interest Certificate not received',
//                    // 4 => 'Drop',
//                    5 => 'Statement not received',
//                    6 => 'Welcome letter/sanction letter not received'
//                ),
//                3 => array(
//                    1 => 'Insurance Policy Documents Not Received',
//                    2 => 'Misselling of Insurance Policy'
//                ),
//                4 => array(
//                    1 => 'Foreclosure Payment done but Not Reflecting',
//                    2 => 'Over-Due Charges paid but not reflecting',
//                    3 => 'Part Payment done but not reflecting'
//                ),
//            ),
//            24 => array(
//                1 => array(
//                    1 => 'CIBIL Updation',
//                    2 => 'Disbursal Amount not Received',
//                    3 => 'Loan Not Sanction',
//                    4 => 'Non Updation of EMI',
//                    5 => 'Reason For EMI Bouned',
//                    6 => 'Settlement Related'
//                ),
//                2 => array(
//                    1 => 'Copy of Loan Documents Not Received',
//                    2 => 'Discharge Letter Not Received',
//                    3 => 'GST Invoice Not Received',
//                    //   4 => 'Drop',
//                    5 => 'Statement not Received',
//                    6 => 'Unused PDC not Receiced',
//                    7 => 'Welcome Letter/Sanction Letter not Received'
//                ),
//                3 => array(
//                    1 => 'Bribery',
//                    2 => 'Incorrect / Incomplete Product Info'
//                ),
//                4 => array(
//                    1 => 'Cheque bounce charges paid but not reflecting',
//                    2 => 'EMI Debited twice',
//                    3 => 'EMI Payment done but not reflecting',
//                    4 => 'Foreclosure Payment done but Not Reflecting',
//                    5 => 'Gap interest paid but not reflecting',
//                    6 => 'Late Payment charges paid but not reflecting',
//                    7 => 'Over-Due Charges paid but not reflecting',
//                    8 => 'Part Payment done but not reflecting'
//                ),
//            ),
//            25 => array(
//                1 => array(
//                    1 => 'Cibil Related Issue'
//                ),
//                2 => array(
//                    1 => 'Chages Reversal',
//                    2 => 'Debit Card Issue',
//                    3 => 'Others Issue',
//                ),
//                3 => array(
//                    1 => 'Welcome Kit Not Received'
//                ),
//                4 => array(
//                    1 => 'PIB Not Working',
//                    2 => 'Unable To Apply Online -Smart Credit'
//                ),
//            ),
//            26 => array(
//                1 => array(
//                    1 => 'Account Not Closed',
//                    2 => 'Account Wrongly Closed',
//                    3 => 'Alternate Channel Registration not done',
//                    4 => 'Account Opening Refund cheque not recd ',
//                    5 => 'Cheque series not uploaded',
//                    6 => 'Closure DD not received',
//                    7 => 'Closure request not processed',
//                    8 => 'Customer details captured incorrectly',
//                    9 => 'Funding not done/ incorrectly done',
//                    10 => 'Not Opened - Request Submitted at Branch',
//                    11 => 'Incorrect type of account'
//                ),
//                2 => array(
//                    //  1 => 'Drop'
//                ),
//            ),
//            27 => array(
//                1 => array(
//                    1 => 'Customer details captured incorrectly',
//                    2 => 'FCNR Not Created',
//                    3 => 'Interest incorrect',
//                    4 => 'Maturity proceeds not/incorrect credited',
//                    5 => 'Premature Closure Not Processed',
//                    6 => 'Premature Closure Request via Registered Email',
//                    7 => 'TD not renewed/incorrect renewal',
//                    8 => 'Value date incorrect'
//                ),
//                2 => array(
//                    1 => 'Customer details captured incorrectly',
//                    2 => 'FCNR Suraksha Deposit Not Created',
//                    3 => 'Interest incorrect',
//                    4 => 'Maturity proceeds not/incorrect credited',
//                    5 => 'Premature Closure Not Processed',
//                    6 => 'TD not renewed/incorrect renewal',
//                    7 => 'Value date incorrect'
//                ),
//                3 => array(
//                    1 => 'Customer details captured incorrectly',
//                    2 => 'Form 15G/15H not updated',
//                    3 => 'Interest incorrect',
//                    4 => 'Invalid Form 15H/G',
//                    5 => 'Maturity proceeds not/incorrect credited',
//                    6 => 'Premature Closure Not Processed',
//                    7 => 'TD not linked',
//                    8 => 'TD not renewed/incorrect renewal',
//                    9 => 'TD/RD Not Created',
//                    10 => 'TDS certificate - incorrect',
//                    11 => 'TDS claim not processed',
//                    12 => 'Value date incorrect'
//                ),
//                4 => array(
//                    1 => 'Customer details captured incorrectly',
//                    2 => 'Interest incorrect',
//                    3 => 'Maturity proceeds not/incorrect credited',
//                    4 => 'NRE RD Not Created',
//                    5 => 'NRE RD over phone',
//                    6 => 'Premature Closure Not Processed',
//                    7 => 'Value date incorrect'
//                ),
//                5 => array(
//                    1 => 'Customer details captured incorrectly',
//                    2 => 'Interest incorrect',
//                    3 => 'Maturity proceeds not/incorrect credited',
//                    4 => 'NRE SFD Over the Phone',
//                    5 => 'Premature Closure Not Processed',
//                    6 => 'SFD Not Created',
//                    7 => 'Value date incorrect'
//                ),
//                6 => array(
//                    1 => 'Customer details captured incorrectly',
//                    2 => 'Interest incorrect',
//                    3 => 'Maturity proceeds not/incorrect credited',
//                    4 => 'Premature Closure Not Processed',
//                    5 => 'TD not linked',
//                    6 => 'TD not renewed/incorrect renewal',
//                    7 => 'TD/RD Not Created',
//                    8 => 'Value date incorrect'
//                ),
//                7 => array(
//                    1 => 'Customer details captured incorrectly',
//                    2 => 'Interest incorrect',
//                    3 => 'Maturity proceeds not/incorrect credited',
//                    4 => 'NRO RD Not Created',
//                    5 => 'Premature Closure Not Processed',
//                    6 => 'TDS certificate - incorrect',
//                    7 => 'TDS claim not processed',
//                    8 => 'Value date incorrect'
//                ),
//                8 => array(
//                    1 => 'Customer details captured incorrectly',
//                    2 => 'Interest incorrect',
//                    3 => 'Maturity proceeds not/incorrect credited',
//                    4 => 'NRO SFD Not Created',
//                    5 => 'Premature Closure Not Processed',
//                    6 => 'TDS certificate - incorrect',
//                    7 => 'TDS claim not processed',
//                    8 => 'Value date incorrect'
//                ),
//                9 => array(
//                    1 => 'Customer details captured incorrectly',
//                    2 => 'Interest incorrect',
//                    3 => 'Maturity proceeds not/incorrect credited',
//                    4 => 'Premature Closure Not Processed',
//                    5 => 'TD not linked',
//                    6 => 'TD not renewed/incorrect renewal',
//                    7 => 'TD/RD Not Created',
//                    8 => 'TDS certificate - incorrect',
//                    9 => 'TDS claim not processed',
//                    10 => 'Value date incorrect'
//                ),
//                10 => array(
//                    1 => 'Customer details captured incorrectly',
//                    2 => 'Form 15G/15H not updated',
//                    3 => 'Interest incorrect',
//                    4 => 'Invalid Form 15H/G',
//                    5 => 'Maturity proceeds not/incorrect credited',
//                    6 => 'Premature Closure Not Processed',
//                    7 => 'RD Not Created',
//                    8 => 'TDS certificate - incorrect',
//                    9 => 'TDS claim not processed',
//                    10 => 'Value date incorrect'
//                ),
//                11 => array(
//                    1 => 'Customer details captured incorrectly',
//                    2 => 'Form 15G/15H not updated',
//                    3 => 'Interest incorrect',
//                    4 => 'Invalid Form 15H/G',
//                    5 => 'Maturity proceeds not/incorrect credited',
//                    6 => 'Premature Closure Not Processed',
//                    7 => 'SFD Not Created',
//                    8 => 'TD not renewed/incorrect renewal',
//                    9 => 'TDS certificate - incorrect',
//                    10 => 'TDS claim not processed',
//                    11 => 'Value date incorrect'
//                ),
//                12 => array(
//                    1 => 'Customer details captured incorrectly',
//                    2 => 'Form 15G/15H not updated',
//                    3 => 'Interest incorrect',
//                    4 => 'Invalid Form 15H/G',
//                    5 => 'Maturity proceeds not/incorrect credited',
//                    6 => 'Premature Closure Not Processed',
//                    7 => 'TAX Saver FD Not Created',
//                    8 => 'TD not renewed/incorrect renewal',
//                    9 => 'TDS certificate - incorrect',
//                    10 => 'TDS claim not processed',
//                    11 => 'Value date incorrect'
//                ),
//                13 => array(
//                    1 => 'Customer details captured incorrectly',
//                    2 => 'Form 15G/15H not updated',
//                    3 => 'Interest incorrect',
//                    4 => 'Invalid Form 15H/G',
//                    5 => 'Maturity proceeds not/incorrect credited',
//                    6 => 'Premature Closure Not Processed',
//                    7 => 'TD not renewed/incorrect renewal',
//                    8 => 'TDS certificate - incorrect',
//                    9 => 'TDS claim not processed',
//                    10 => 'Value date incorrect',
//                    11 => 'Zippi FD Not Created'
//                ),
//            ),
//            28 => array(
//                1 => array(
//                    1 => 'Customer Sales Dispute',
//                    2 => 'Greivance'
//                ),
//                2 => array(
//                    1 => 'Certificate Not Received',
//                    2 => 'Interest Not Received'
//                ),
//                3 => array(
//                    1 => 'Customer Sales Dispute'
//                ),
//            ),
//            29 => array(
//                1 => array(
//                    1 => 'Unable to Transact',
//                    2 => 'Unable To Add Beneficiary',
//                    3 => 'Unable To Register',
//                    4 => 'Unable To Login'
//                ),
//            ),
//        );


        $html = '';
        $this->_helper->layout()->disableLayout('');
        if ($this->_request->isXmlHttpRequest()) {
            $getData = $this->getRequest()->getPost();
            $catId = $this->sanitize_data($getData['catId']);
            $catSubId = $this->sanitize_data($getData['catSubId']);
            $lmsModel = new Application_Model_Lms();
            $complaintSubCatData = $lmsModel->getGrievanceData($catSubId);
            if (!empty($complaintSubCatData) && is_array($complaintSubCatData)) {
                $html .= "<option value = ''>Select</option>";
                foreach ($complaintSubCatData as $key => $val) {
                    $html .= "<option value='" . $val['id'] . "'>" . $val['name'] . "</option>";
                }
            }
        }
        echo $html;
        exit;
    }

    public function chatboxAction() {
        $this->_helper->layout()->disableLayout('');
        if ($this->_request->isXmlHttpRequest()) {
            $getData = $this->getRequest()->getPost();
            $fname = $this->sanitize_data($getData['First_Name']);
            $lname = $this->sanitize_data($getData['Last_Name']);
            $Email1 = $this->sanitize_data($getData['Email']);
            $Mobile1 = $this->sanitize_data($getData['Mobile']);
            $passwordKey = 'dcbaspectchat';
            $method = 'aes-256-cbc';
            $password = substr(hash('sha256', $passwordKey, true), 0, 32);
            $iv = chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0);
            $First_Name = base64_encode(openssl_encrypt($fname, $method, $password, OPENSSL_RAW_DATA, $iv));
            $Last_Name = base64_encode(openssl_encrypt($lname, $method, $password, OPENSSL_RAW_DATA, $iv));
            $Email = base64_encode(openssl_encrypt($Email1, $method, $password, OPENSSL_RAW_DATA, $iv));
            $Mobile = base64_encode(openssl_encrypt($Mobile1, $method, $password, OPENSSL_RAW_DATA, $iv));
            $this->postFields = "";
            $this->postFields .= "First_Name=$First_Name";
            $this->postFields .= "&Last_Name=$Last_Name";
            $this->postFields .= "&Email=$Email";
            $this->postFields .= "&Mobile=$Mobile";
            echo $url = "https://chatuat.dcbindia.com/chatuat/CPChatRequest.jsp?" . $this->postFields;
            // header("Location: " . $url);
            exit;
            //$chatResponse = $this->sendInfo($this->postFields,'https://chatuat.dcbindia.com/chatuat/CPChatRequest.jsp?');
            //echo "<pre>";print_r($chatResponse);exit;
        }
    }

    public function sendInfo($data, $url) {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_PORT, 443);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
        $returnData = curl_exec($ch);
        curl_close($ch);
        return $returnData;
    }

    public function checkEncyptAction() {
        $fname = "Prashant";
        $passwordKey = 'casa@2018';
        $method = 'aes-256-cbc';
        $password = substr(hash('sha256', $passwordKey, true), 0, 32);

        $ivlen = openssl_cipher_iv_length($method);
        $isCryptoStrong = true; // Will be set to true by the function if the algorithm used was cryptographically secure
        $iv = openssl_random_pseudo_bytes($ivlen, $isCryptoStrong);
        //echo $iv;exit;
        //$iv = chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0);
        echo $First_Name = base64_encode(openssl_encrypt($fname, $method, $password, OPENSSL_RAW_DATA, $iv));
        exit;
    }

    public function checkDecyptAction() {
        $fname = 'H1rlXG8GqrcaVyBrS/tpdQ==';
        $passwordKey = 'casa@2018';
        $method = 'aes-256-cbc';
        $password = substr(hash('sha256', $passwordKey, true), 0, 32);
        // $iv = chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0);
        $ivlen = openssl_cipher_iv_length($method);
        $isCryptoStrong = false; // Will be set to true by the function if the algorithm used was cryptographically secure
        $iv = openssl_random_pseudo_bytes($ivlen, $isCryptoStrong);
        echo $First_Name = openssl_decrypt(base64_decode($fname), $method, $password, OPENSSL_RAW_DATA, $iv);
        exit;
    }

    function encrypt_decrypt($action, $string) {
        $output = false;
        $encrypt_method = "AES-256-CBC";
        $secret_key = 'TALLY';
        // $secret_iv = 'This is my secret iv';
        $secret_iv = chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0);
        // hash
        $key = hash('sha256', $secret_key);

        // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning
        $iv = substr(hash('sha256', $secret_iv), 0, 16);
        if ($action == 'encrypt') {
            $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
            $output = base64_encode($output);
        } else if ($action == 'decrypt') {
            $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);
        }
        return $output;
    }

    public function insertAction() {
//        $subCatId = array(
////            1 => array(
////                1 => 'Customer Disputes',
////                2 => 'Documents Related',
////                3 => 'Insurance Policy',
////                4 => 'Misselling',
////                5 => 'Payments Related',
////                6 => 'Pradhan Mantri Awas Yojna'
////            ),
//            2 => array(
//                1 => 'Discrepancy in Transaction',
//                2 => 'SMS Alerts'
//            ),
//            3 => array(
//                1 => 'Card Hotlist',
//                2 => 'Card Not Working',
//                3 => 'Card PIN',
//                4 => 'Charges Related',
//                5 => 'Deliverables ',
//                6 => 'Discrepancy in Transaction',
//                7 => 'Misuse of Debit Card'
//            ),
//            4 => array(
//                1 => 'Customer Disputes'
//            ),
//            5 => array(
//                1 => 'Balance Enquirys',
//                2 => 'Cheque Book',
//                3 => 'Customer Disputes',
//                4 => 'Email Statement for Last 1 month',
//                5 => 'Mini Statement'
//            ),
//            6 => array(
//                1 => 'Discrepancy in Transaction',
//                2 => 'Technical Issue'
//            ),
//            7 => array(
//                1 => 'Technical Issue'
//            ),
//            8 => array(
//                1 => 'Card Not Working',
//                2 => 'Card PIN',
//                3 => 'Charges Related',
//                4 => 'Customer Disputes ',
//                5 => 'Deliverables',
//                6 => 'Discrepancy in Transaction',
//                7 => 'Leads',
//                8 => 'Misuse of Card'
//            ),
//            9 => array(
//                1 => 'Discrepancy in Transaction',
//                2 => 'Email Alerts',
//                3 => 'Misuse of Internet Banking',
//                4 => 'Online Request',
//                5 => 'Password Generation Issue',
//                6 => 'PIB Log In-Issues',
//                7 => 'Registration Not Done',
//                8 => 'Utility Bill Payment'
//            ),
//            10 => array(
//                1 => 'Bajaj Allianz Card',
//                2 => 'Belstar',
//                3 => 'Cinqo',
//                4 => 'DCB Direct - GPR Card',
//                5 => 'DCB Meal Card (YAP)',
//                6 => 'Fullerton',
//                7 => 'IIFL',
//                8 => 'Jana Card',
//                9 => 'Madura',
//                10 => 'Midland Microfinance',
//                11 => 'Muthoot Finance - Ambassador',
//                12 => 'Muthoot Finance - Gold',
//                13 => 'Muthoot Forex - Royal Money',
//                14 => 'NiYo Card',
//                15 => 'Paysack',
//                16 => 'SKS',
//                17 => 'Slonkit Card',
//                18 => 'Stashfin',
//                19 => 'Thomas Cook'
//            ),
//            11 => array(
//                1 => 'Email Alerts',
//                2 => 'SMS Alerts'
//            ),
//            12 => array(
//                1 => 'Updation / Modification - Not Done'
//            ),
//            13 => array(
//                1 => 'Transaction Details'
//            ),
//            14 => array(
//                1 => 'Cheque Book',
//                2 => 'Courier Related Complaints',
//                3 => 'DCA',
//                4 => 'DKD Certificate / Passbook',
//                5 => 'Internet Banking Pin',
//                6 => 'Statement Of Account',
//                7 => 'Statement Of Account - Consolidated',
//                8 => 'TDS Certificate',
//                9 => 'Welcome Kit'
//            ),
//            15 => array(
//                1 => 'Cancellation',
//                2 => 'Customer Disputes'
//            ),
//            16 => array(
//                1 => 'Technical Issue',
//                2 => 'Transaction Related'
//            ),
//            17 => array(
//                1 => 'Technical Issue'
//            ),
//            18 => array(
//                1 => 'Misuse of Internet Banking',
//                2 => 'Online Request',
//                3 => 'Registration Not Done',
//                4 => 'Technical Issue',
//                5 => 'Utility Bill Payment'
//            ),
//            19 => array(
//                1 => 'Collection',
//                2 => 'Payments'
//            ),
////            20 => array(
////                1 => 'Documents Related',
////                2 => 'Insurance Policy',
////                3 => 'Misselling',
////                4 => 'Payments Related'
////            ),
//            20 => array(
//                1 => 'Atal Pension Yojna',
//                2 => 'General Insurance (Other Than GPA)',
//                3 => 'GPA',
//                4 => 'Health Insurance',
//                5 => 'Life Insurance',
//                6 => 'PMJJBY',
//                7 => 'PMSBY'
//            ),
//            21 => array(
//                1 => 'Bank Guarantee',
//                2 => 'Inward Remittance',
//                3 => 'Letter of Credit',
//                4 => 'Outward Remittance'
//            ),
//            22 => array(
//                1 => 'Customer Disputes',
//                2 => 'Documents Related',
//                3 => 'Misselling',
//                4 => 'Payments Related'
//            ),
//            23 => array(
//                1 => 'Customer Disputes ',
//                2 => 'Documents Related',
//                3 => 'Misselling',
//                4 => 'Payments Related'
//            ),
//            24 => array(
//                1 => 'Application',
//                2 => 'Customer Disputes ',
//                3 => 'Deliverables',
//                4 => 'Technical Issue'
//            ),
//            25 => array(
//                1 => 'Current Account',
//                2 => 'Savings Account'
//            ),
//            26 => array(
//                1 => 'FCNR Deposit',
//                2 => 'FCNR Suraksha Deposit',
//                3 => 'Fixed Deposit',
//                4 => 'NRE Recurring Deposit',
//                5 => 'NRE Suraksha Deposit',
//                6 => 'NRE Term Deposit',
//                7 => 'NRO Recurring Deposit',
//                8 => 'NRO Suraksha Deposit',
//                9 => 'NRO Term Deposit',
//                10 => 'Recurring Deposit',
//                11 => 'Suraksha Deposit',
//                12 => 'TAX Saver Deposit',
//                13 => 'Zippi Deposit'
//            ),
//            27 => array(
//                1 => 'Demat',
//                2 => 'Gold Bond',
//                3 => 'Mutual Fund'
//            ),
//            28 => array(
//                1 => 'Technical Issue'
//            )
//        );

        $subCatId = array(
//                1 => array(
//                    1 => 'Loan Not Sanctioned',
//                    2 => 'Settlement Related',
//                    3 => 'Reason for EMI bounce',
//                    4 => 'Non Updation of EMI',
//                    5 => 'EMI/TENURE/ROI DISPUTE',
//                    6 => 'CIBIL Report Updation',
//                    7 => 'Disbursal amount not received'
//                ),
                2 => array(
                    1 => 'Discharge letter Not Received',
                    2 => 'List of Documents not received',
                    3 => 'Welcome/Sanction letter not received',
                    4 => 'Interest Certificate not received',
                    5 => 'Unused PDC not received - Loan closed',
                    6 => 'GST Invoice Not Received',
                    7 => 'Settlement NOC not received',
                    8 => 'Statement of Account not received',
                    //9 => 'Drop',
                    10 => 'Copy of Loan Documents Not Received'
                ),
                3 => array(
                    1 => 'Insurance Policy Documents Not Received',
                    2 => 'Misselling of Insurance Policy'
                ),
                4 => array(
                    1 => 'Bribery',
                    2 => 'Incorrect / Incomplete Product Info',
                    3 => 'Loan Cancellation'
                ),
                5 => array(
                    1 => 'EMI Debited twice',
                    2 => 'Part Payment done but not reflecting',
                    3 => 'EMI Debited but Not Reflecting',
                    4 => 'Over-Due Charges paid but not reflecting',
                    5 => 'Cheque bounce charges paid but not reflecting',
                    6 => 'Late Payment charges paid but not reflecting',
                    7 => 'Gap interest paid but not reflecting',
                    8 => 'Foreclosure Payment done but Not Reflecting',
                    9 => 'Payment for Physical Copy of Sanction Letter Not Reflecting',
                    //  10 => 'Drop',
                    11 => 'Payment for Copy of Property Documents Not Reflecting'
                ),
                6 => array(
                    1 => 'Subsidy Not Received',
                ),
                7 => array(
                    1 => 'Amount Not Credited',
                ),
                8 => array(
                    2 => 'Not Received'
                ),
           
                9 => array(
                    1 => 'Reason for Hotlist'
                ),
                10 => array(
                    1 => 'At ATM/POS'
                ),
                11 => array(
                    1 => 'Pin not received'
                ),
                12 => array(
                    1 => 'Cash Back not received'
                ),
                13 => array(
                    1 => 'Card Not Received'
                ),
                14 => array(
                    1 => 'CND/Partial CND at DCB ATM',
                    2 => 'CND/Partial CND at Non DCB ATM',
                    3 => 'Online/Internet',
                    4 => 'POS Machine',
                    5 => 'Request for 2nd Chargeback',
                    6 => 'VISA Card to Card Transfer'
                ),
                15 => array(
                    1 => 'PIN Not Shared',
                    2 => 'PIN Shared'
                ),
           
            
                16 => array(
                    1 => 'Amount Not Credited',
                    2 => 'EDC Machine Not Working',
                    3 => 'Machine Not Installed',
                    4 => 'Service Charges'
                ),
            
            
                17 => array(
                    1 => 'Not Received'
                ),
                18 => array(
                    1 => 'Not Processed'
                ),
                19 => array(
                    1 => 'Not Registered'
                ),
                20 => array(
                    1 => 'Alert Not Received',
                    2 => 'Delay in Receiving Alert'
                ),
                21 => array(
                    1 => 'Not Received'
                ),
           
            
                22 => array(
                    1 => 'IMPS Not Credited',
                    2 => 'Transfer Done Not Cedited'
                ),
                23 => array(
                    1 => 'Cannot Initiate Cheque Book Request',
                    2 => 'Cannot Initiate SOA Request',
                    3 => 'MPIN Link Not Received',
                    4 => 'OTP Not Received',
                    5 => 'Stop Cheque Request Not Processed',
                    6 => 'Unable To Add Beneficiary',
                    7 => 'Unable To Register'
                ),
           
           
                24 => array(
                    1 => 'Unable To Login',
                    2 => 'Unable To Register'
                ),
           
           
                25 => array(
                    1 => 'At ATM/POS'
                ),
                26 => array(
                    1 => 'Not Working',
                    2 => 'Update Status'
                ),
                27 => array(
                    1 => 'Cash Back not Received'
                ),
                28 => array(
                    1 => 'CIBIL Related',
                    2 => 'Delay in Account Opening',
                    3 => 'Incorrect Details Captured',
                    4 => 'Misselling'
                ),
                29 => array(
                    1 => 'Card Not Received/Update Status'
                ),
                30 => array(
                    1 => 'CND/Partial CND at DCB ATM',
                    2 => 'CND/Partial CND at Non DCB ATM',
                    3 => 'Online/Internet',
                    4 => 'POS Machine',
                    5 => 'Request for 2nd Chargeback ',
                    6 => 'VISA Card to Card Transfer'
                ),
                31 => array(
                    1 => 'No Response To Leads'
                ),
                32 => array(
                    1 => 'PIN Not Shared',
                    2 => 'PIN Shared'
                ),
           
           
                33 => array(
                    1 => 'DCB to DCB Transaction Dispute',
                    2 => 'Erroneous Fund tranfer -  IMPS',
                    3 => 'Erroneous Fund tranfer -  NEFT',
                    4 => 'Erroneous Fund tranfer -  RTGS',
                    5 => 'Error in Adding benificiary/IFSC Code not Mapped',
                    6 => 'IMPS Related',
                    7 => 'NEFT Related',
                    8 => 'PG Transaction Dispute',
                    9 => 'RTGS Related'
                ),
                34 => array(
                    1 => 'OTP alerts not received',
                    //  2 => 'Drop',
                    3 => 'Transaction Alerts not Received'
                ),
                35 => array(
                    1 => 'PIN/OTP not Shared',
                    2 => 'PIN/OTP Shared'
                ),
                36 => array(
                    1 => 'Account Statement Request not getting generated / not processed / Error',
                    2 => 'Cheque Book not processed / Error',
                    3 => 'Debit Card hotlist not processed / Error',
                    4 => 'Demand Draft not Processed / Error',
                    5 => 'FD/RD Details Wrongly Booked',
                    6 => 'Incorrect Auto renewal',
                    7 => 'Interest Certificate Request not Processed / Error',
                    8 => 'Stop Payment not processed / Error'
                ),
                37=> array(
                    1 => 'OTP is not getting generated/delivered to handset or any OTP related issue for online password generation',
                    2 => 'Unable to generate password for any technical issue'
                ),
                38=> array(
                    1 => 'Internet Banking PIN-Issues'
                ),
                39=> array(
                    1 => 'Registration not Done'
                ),
                40=> array(
                    1 => 'Account number not mapped',
                    2 => 'Error in Addition / Deletion of biller or Payee',
                    3 => 'Error in application-Tech Proce',
                    4 => 'Registration not done',
                    5 => 'Stop Payment not processed / Error'
                ),
           
            
                41 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS',
                    4 => 'Load/ Reload / Balance Transfer Not Done',
                    5 => 'Other Card related issues',
                    6 => 'PIN Not Working'
                ),
                42 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS',
                    4 => 'Load/ Reload / Balance Transfer Not Done',
                    5 => 'Other Card Related Issues',
                    6 => 'PIN Not Working'
                ),
                43 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS',
                    4 => 'Load/ Reload / Balance Transfer Not Done',
                    5 => 'Other Card Related Issues',
                    6 => 'PIN Not Working'
                ),
                44 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS',
                    4 => 'Load/ Reload / Balance Transfer Not Done',
                    5 => 'Other Card Related Issues',
                    6 => 'PIN Not Working'
                ),
                45 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS'
                ),
                46 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS',
                    4 => 'Load/ Reload / Balance Transfer Not Done',
                    5 => 'Other Card Related Issues',
                    6 => 'PIN Not Working'
                ),
                47 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS',
                    4 => 'Load/ Reload / Balance Transfer Not Done',
                    5 => 'Other Card Related Issues',
                    6 => 'PIN Not Working'
                ),
                48 => array(
                //   1 => 'Drop'
                ),
                49 => array(
                // 1 => 'Drop'
                ),
                50 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS',
                    4 => 'Load/ Reload / Balance Transfer Not Done',
                    5 => 'Other Card Related Issues',
                    6 => 'PIN Not Working'
                ),
                51 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS',
                    4 => 'Load/ Reload / Balance Transfer Not Done',
                    5 => 'Other Card Related Issues',
                    6 => 'PIN Not Working'
                ),
                52 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS',
                    4 => 'Load/ Reload / Balance Transfer Not Done',
                    5 => 'Other Card Related Issues',
                    6 => 'PIN Not Working'
                ),
                53 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS',
                    4 => 'Load/ Reload / Balance Transfer Not Done',
                    5 => 'Other Card Related Issues',
                    6 => 'PIN Not Working'
                ),
                54 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS',
                    4 => 'Load/ Reload / Balance Transfer Not Done',
                    5 => 'Other Card Related Issues',
                    6 => 'PIN Not Working'
                ),
                55 => array(
                //  1 => 'Drop'
                ),
                56 => array(
                // 1 => 'Drop'
                ),
                57 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS',
                    4 => 'Load/ Reload / Balance Transfer Not Done',
                    5 => 'Other Card Related Issues',
                    6 => 'PIN Not Working'
                ),
                58 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS',
                    4 => 'Load/ Reload / Balance Transfer Not Done',
                    5 => 'Other Card Related Issues',
                    6 => 'PIN Not Working'
                ),
                59 => array(
                    1 => 'Card Not Working',
                    2 => 'Cash Not Dispensed',
                    3 => 'Disputed / Declined Transaction - POS',
                    4 => 'Load/ Reload / Balance Transfer Not Done',
                    5 => 'Other Card Related Issues',
                    6 => 'PIN Not Working'
                ),
            
            
                60 => array(
                    1 => 'Email alerts Not Received',
                    2 => 'Email alerts Received By Non DCB Customer'
                ),
                61 => array(
                    1 => 'SMS Alerts Not Received',
                    2 => 'SMS alerts Received By Non DCB Customer'
                ),
            
            
                62 => array(
                    1 => 'Instruction Not Processed',
                    2 => 'Delay in Processing of Instruction',
                    3 => 'Details Captured Incorrectly'
                ),
           
            
                63 => array(
                    1 => 'Require Beneficiary Details',
                    2 => 'Require Beneficiary Details(Bulk)',
                    3 => 'Require Payee Details'
                ),
           
           
                64 => array(
                    1 => 'Chq book not received'
                ),
                65 => array(
                    1 => 'Blue Dart',
                    2 => 'First Flight',
                    3 => 'Mail Express',
                    4 => 'Maruti Couriers',
                    5 => 'Other ',
                    6 => 'Professional'
                ),
                66 => array(
                    1 => 'FD advice not received'
                ),
                67 => array(
                    1 => 'RD certificate not received'
                ),
                68 => array(
                    1 => 'PIN not received'
                ),
                69 => array(
                    1 => 'Statement not received',
                ),
                70 => array(
                // 1 => 'Drop'
                ),
                71 => array(
                    1 => 'TDS Certificate not received'
                ),
                72 => array(
                    1 => 'Welcome kit not received'
                ),
           
                73 => array(
                    1 => 'Request Not Processed'
                ),
                74 => array(
                    1 => 'Clarity On Charges Levied',
                    2 => 'Return Reason'
                ),
           
                75 => array(
                    1 => 'Not Able to do transaction',
                    2 => 'Not Able to Login',
                    3 => 'Page stuck-does not move forward',
                    4 => 'Unable to Register'
                ),
                76 => array(
                    1 => 'Amount Not Credited',
                    2 => 'Difference in Amount Credited to Beneficiary',
                    3 => 'Swift code is invalid'
                ),
           
            
                77 => array(
                    1 => 'Card Decline/ Not Working'
                ),
           
           
                78 => array(
                    1 => 'PIN Not Shared',
                    2 => 'PIN Shared'
                ),
                79 => array(
                    1 => 'Account Statement Request Not Getting Generated / Error Via Net Banking',
                    2 => 'Cheque Book Not Processed / Error',
                    3 => 'Debit Card hotlist Not Processed / Error',
                    4 => 'Demand Draft Not Processed / Error',
                    5 => 'FD/RD Details Wrongly Booked',
                    6 => 'Incorrect Auto Renewal',
                    7 => 'Interest Certificate Request Not Processed / Error',
                    8 => 'Stop Payment Not Processed / Error'
                ),
                80 => array(
                    1 => 'Request Given at Branch'
                ),
                81 => array(
                    1 => 'Error in Adding Beneficiary',
                    2 => 'IFSC Code Not Mapped',
                    3 => 'Internet Banking PIN-Issues',
                    4 => 'Unable to Generate Password for any Technical Issue'
                ),
                82 => array(
                    1 => 'Account number not mapped in Utility Bill Payment',
                    2 => 'Error in Addition Utility bill payment',
                    3 => 'Error in Application-Tech Process',
                    4 => 'Registration Not Done',
                    5 => 'Stop Payment Not Processed / Error'
                ),
          
                83 => array(
                    1 => 'Charges Dispute',
                    2 => 'Cheques Pick Up Issues',
                    3 => 'Cheques Pick Up vendor behavior',
                    4 => 'Credit Not Received / Incorrect Debit / Credit',
                    5 => 'Document Dispute',
                    6 => 'Original documents not received'
                ),
                84 => array(
                    1 => 'Charges Dispute'
                ),
          
                85 => array(
                    1 => 'Policy Not Renewed',
                    2 => 'Premium Debited Twice ',
                    3 => 'Premium Not Debited '
                ),
                86 => array(
                    1 => 'Claims Settlement Dispute',
                    2 => 'Customer Sales Dispute',
                    3 => 'Policy Documents Not Received',
                    4 => 'Policy payouts Not received'
                ),
                87 => array(
                    1 => 'Claims Settlement Dispute',
                    2 => 'Customer Sales Dispute',
                    3 => 'Policy Not Renewed',
                    4 => 'Premium Debited Twice ',
                    5 => 'Premium Not Debited '
                ),
                88 => array(
                    1 => 'Claims Settlement Dispute'
                ),
                89 => array(
                    1 => 'Claims Settlement Dispute',
                    2 => 'Customer Sales Dispute',
                    3 => 'Policy Documents Not Received'
                ),
                90 => array(
                    1 => 'Claims related Dispute',
                    2 => 'Premium Debited Twice'
                ),
                91 => array(
                    1 => 'Policy Not Renewed',
                    2 => 'Premium Debited Twice',
                    3 => 'Premium Not Debited'
                ),
           
                92 => array(
                    1 => 'Not Extended'
                ),
                93 => array(
                    1 => 'Discrepancy In Funds Received',
                    2 => 'Funds Not Credited',
                    3 => 'Transaction Details'
                ),
                94 => array(
                    1 => 'Not Discounted'
                ),
                95 => array(
                    1 => 'Amount Not Credited to Beneficiary',
                    2 => 'Charges Not Informed - Reversal',
                    3 => 'Discrepancy In Funds Credited to Beneficiary'
                ),
           
                96 => array(
                    1 => 'CIBIL Updation',
                    2 => 'Disbursal Amount Not Received',
                    3 => 'Gold Damaged',
                    4 => 'Gold Not Released',
                    5 => 'Loan Not Sanction',
                    6 => 'Renewal Not Done'
                ),
                97 => array(
                    1 => 'Copy of Loan Documents Not Received',
                    2 => 'GST Invoice Not Received',
                    3 => 'Interest Certificate not received',
                    // 4 => 'Drop',
                    5 => 'Statement not received',
                    6 => 'Welcome letter/sanction letter not received'
                ),
                98 => array(
                    1 => 'Insurance Policy Documents Not Received',
                    2 => 'Misselling of Insurance Policy'
                ),
                99 => array(
                    1 => 'Foreclosure Payment done but Not Reflecting',
                    2 => 'Over-Due Charges paid but not reflecting',
                    3 => 'Part Payment done but not reflecting'
                ),
           
                100 => array(
                    1 => 'CIBIL Updation',
                    2 => 'Disbursal Amount not Received',
                    3 => 'Loan Not Sanction',
                    4 => 'Non Updation of EMI',
                    5 => 'Reason For EMI Bouned',
                    6 => 'Settlement Related'
                ),
                101 => array(
                    1 => 'Copy of Loan Documents Not Received',
                    2 => 'Discharge Letter Not Received',
                    3 => 'GST Invoice Not Received',
                    //   4 => 'Drop',
                    5 => 'Statement not Received',
                    6 => 'Unused PDC not Receiced',
                    7 => 'Welcome Letter/Sanction Letter not Received'
                ),
                102 => array(
                    1 => 'Bribery',
                    2 => 'Incorrect / Incomplete Product Info'
                ),
                103 => array(
                    1 => 'Cheque bounce charges paid but not reflecting',
                    2 => 'EMI Debited twice',
                    3 => 'EMI Payment done but not reflecting',
                    4 => 'Foreclosure Payment done but Not Reflecting',
                    5 => 'Gap interest paid but not reflecting',
                    6 => 'Late Payment charges paid but not reflecting',
                    7 => 'Over-Due Charges paid but not reflecting',
                    8 => 'Part Payment done but not reflecting'
                ),
           
                104 => array(
                    1 => 'Cibil Related Issue'
                ),
                105 => array(
                    1 => 'Chages Reversal',
                    2 => 'Debit Card Issue',
                    3 => 'Others Issue',
                ),
                106 => array(
                    1 => 'Welcome Kit Not Received'
                ),
                107 => array(
                    1 => 'PIB Not Working',
                    2 => 'Unable To Apply Online -Smart Credit'
                ),
                108 => array(
                    1 => 'Account Not Closed',
                    2 => 'Account Wrongly Closed',
                    3 => 'Alternate Channel Registration not done',
                    4 => 'Account Opening Refund cheque not recd ',
                    5 => 'Cheque series not uploaded',
                    6 => 'Closure DD not received',
                    7 => 'Closure request not processed',
                    8 => 'Customer details captured incorrectly',
                    9 => 'Funding not done/ incorrectly done',
                    10 => 'Not Opened - Request Submitted at Branch',
                    11 => 'Incorrect type of account'
                ),
                109 => array(
                //  1 => 'Drop'
                ),
                110 => array(
                    1 => 'Customer details captured incorrectly',
                    2 => 'FCNR Not Created',
                    3 => 'Interest incorrect',
                    4 => 'Maturity proceeds not/incorrect credited',
                    5 => 'Premature Closure Not Processed',
                    6 => 'Premature Closure Request via Registered Email',
                    7 => 'TD not renewed/incorrect renewal',
                    8 => 'Value date incorrect'
                ),
                111 => array(
                    1 => 'Customer details captured incorrectly',
                    2 => 'FCNR Suraksha Deposit Not Created',
                    3 => 'Interest incorrect',
                    4 => 'Maturity proceeds not/incorrect credited',
                    5 => 'Premature Closure Not Processed',
                    6 => 'TD not renewed/incorrect renewal',
                    7 => 'Value date incorrect'
                ),
                112 => array(
                    1 => 'Customer details captured incorrectly',
                    2 => 'Form 15G/15H not updated',
                    3 => 'Interest incorrect',
                    4 => 'Invalid Form 15H/G',
                    5 => 'Maturity proceeds not/incorrect credited',
                    6 => 'Premature Closure Not Processed',
                    7 => 'TD not linked',
                    8 => 'TD not renewed/incorrect renewal',
                    9 => 'TD/RD Not Created',
                    10 => 'TDS certificate - incorrect',
                    11 => 'TDS claim not processed',
                    12 => 'Value date incorrect'
                ),
                113 => array(
                    1 => 'Customer details captured incorrectly',
                    2 => 'Interest incorrect',
                    3 => 'Maturity proceeds not/incorrect credited',
                    4 => 'NRE RD Not Created',
                    5 => 'NRE RD over phone',
                    6 => 'Premature Closure Not Processed',
                    7 => 'Value date incorrect'
                ),
                114 => array(
                    1 => 'Customer details captured incorrectly',
                    2 => 'Interest incorrect',
                    3 => 'Maturity proceeds not/incorrect credited',
                    4 => 'NRE SFD Over the Phone',
                    5 => 'Premature Closure Not Processed',
                    6 => 'SFD Not Created',
                    7 => 'Value date incorrect'
                ),
                115 => array(
                    1 => 'Customer details captured incorrectly',
                    2 => 'Interest incorrect',
                    3 => 'Maturity proceeds not/incorrect credited',
                    4 => 'Premature Closure Not Processed',
                    5 => 'TD not linked',
                    6 => 'TD not renewed/incorrect renewal',
                    7 => 'TD/RD Not Created',
                    8 => 'Value date incorrect'
                ),
                116 => array(
                    1 => 'Customer details captured incorrectly',
                    2 => 'Interest incorrect',
                    3 => 'Maturity proceeds not/incorrect credited',
                    4 => 'NRO RD Not Created',
                    5 => 'Premature Closure Not Processed',
                    6 => 'TDS certificate - incorrect',
                    7 => 'TDS claim not processed',
                    8 => 'Value date incorrect'
                ),
                117 => array(
                    1 => 'Customer details captured incorrectly',
                    2 => 'Interest incorrect',
                    3 => 'Maturity proceeds not/incorrect credited',
                    4 => 'NRO SFD Not Created',
                    5 => 'Premature Closure Not Processed',
                    6 => 'TDS certificate - incorrect',
                    7 => 'TDS claim not processed',
                    8 => 'Value date incorrect'
                ),
                118 => array(
                    1 => 'Customer details captured incorrectly',
                    2 => 'Interest incorrect',
                    3 => 'Maturity proceeds not/incorrect credited',
                    4 => 'Premature Closure Not Processed',
                    5 => 'TD not linked',
                    6 => 'TD not renewed/incorrect renewal',
                    7 => 'TD/RD Not Created',
                    8 => 'TDS certificate - incorrect',
                    9 => 'TDS claim not processed',
                    10 => 'Value date incorrect'
                ),
                119 => array(
                    1 => 'Customer details captured incorrectly',
                    2 => 'Form 15G/15H not updated',
                    3 => 'Interest incorrect',
                    4 => 'Invalid Form 15H/G',
                    5 => 'Maturity proceeds not/incorrect credited',
                    6 => 'Premature Closure Not Processed',
                    7 => 'RD Not Created',
                    8 => 'TDS certificate - incorrect',
                    9 => 'TDS claim not processed',
                    10 => 'Value date incorrect'
                ),
                120 => array(
                    1 => 'Customer details captured incorrectly',
                    2 => 'Form 15G/15H not updated',
                    3 => 'Interest incorrect',
                    4 => 'Invalid Form 15H/G',
                    5 => 'Maturity proceeds not/incorrect credited',
                    6 => 'Premature Closure Not Processed',
                    7 => 'SFD Not Created',
                    8 => 'TD not renewed/incorrect renewal',
                    9 => 'TDS certificate - incorrect',
                    10 => 'TDS claim not processed',
                    11 => 'Value date incorrect'
                ),
                121 => array(
                    1 => 'Customer details captured incorrectly',
                    2 => 'Form 15G/15H not updated',
                    3 => 'Interest incorrect',
                    4 => 'Invalid Form 15H/G',
                    5 => 'Maturity proceeds not/incorrect credited',
                    6 => 'Premature Closure Not Processed',
                    7 => 'TAX Saver FD Not Created',
                    8 => 'TD not renewed/incorrect renewal',
                    9 => 'TDS certificate - incorrect',
                    10 => 'TDS claim not processed',
                    11 => 'Value date incorrect'
                ),
                122 => array(
                    1 => 'Customer details captured incorrectly',
                    2 => 'Form 15G/15H not updated',
                    3 => 'Interest incorrect',
                    4 => 'Invalid Form 15H/G',
                    5 => 'Maturity proceeds not/incorrect credited',
                    6 => 'Premature Closure Not Processed',
                    7 => 'TD not renewed/incorrect renewal',
                    8 => 'TDS certificate - incorrect',
                    9 => 'TDS claim not processed',
                    10 => 'Value date incorrect',
                    11 => 'Zippi FD Not Created'
                ),
           
                123 => array(
                    1 => 'Customer Sales Dispute',
                    2 => 'Greivance'
                ),
                124 => array(
                    1 => 'Certificate Not Received',
                    2 => 'Interest Not Received'
                ),
                125 => array(
                    1 => 'Customer Sales Dispute'
                ),
                126 => array(
                    1 => 'Unable to Transact',
                    2 => 'Unable To Add Beneficiary',
                    3 => 'Unable To Register',
                    4 => 'Unable To Login'
                ),
        );






        $lms = new Application_Model_Lms();
        foreach ($subCatId as $key => $value) {
            foreach ($value as $val) {
                $insertArray = array(
                    'pid' => $key,
                    'name' => $val
                );
                $lms->addData($insertArray, 'tbl_grievance');
            }
        }

        echo "task";
        exit;
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit