Пример #1
0
    $where1 = ' AND cus.is_deleted = 0 AND cus.is_default = 1';
    $where2 = ' where cus.is_deleted = 0 AND cus.is_default = 1';
}
 
$columns = array(
    array( 'db' => 'cus.id', 'dt' => 0 , 'field' => 'id'),
    array( 'db' => 'cus.customername',  'dt' => 1 , 'field' => 'customername'),
	array( 'db' => 'cus.phone',   'dt' => 2 , 'field' => 'phone'),
    array( 'db' => 'cus.customertype',  'dt' => 3 , 'field' => 'customertype'),
	array( 'db' => 'ins.industryname',     'dt' => 4, 'field' => 'industryname' ),
	array( 'db' => 'loc.locationname',     'dt' => 5, 'field' => 'locationname'),
    array( 'db' => 'cus.id', 'dt' => 6 , 'field' => 'id','formatter' => function ( $d, $row) {
            
            global $base_url;
			
            $val = SSP::get_customers_details($d);
			
            //$cn = '<div class="btn-group">'; 
			$cn = ' '; 
            
			/*if($val[0]['status']== 1){  
			$cn .= '<span class="label label-success">Active</span>'; } else {  $cn .= '<span class="label label-danger">In Active</span>'; }
			*/
			
			if(!$val[0]['is_deleted'])
            {
				
			if($val[0]['is_approved'] == 1)
            {
                if($_GET['instrument']==1){