Subversion Repositories SmartDukaan

Rev

Rev 19825 | Rev 19845 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19825 Rev 19841
Line 329... Line 329...
329
			$retailer = $this->Retailer->find('first',$opt);
329
			$retailer = $this->Retailer->find('first',$opt);
330
			$this->set(compact('retailer'));
330
			$this->set(compact('retailer'));
331
			
331
			
332
		}
332
		}
333
	}
333
	}
-
 
334
	
-
 
335
	public function admin_filterretailer(){
-
 
336
		
-
 
337
		if($this->request->is('post')){
-
 
338
			$filter = $this->request->data['Retailer']['searchReatailerBy'];
-
 
339
// 			debug($retdet);
-
 
340
			if($filter == '0'){
-
 
341
				$cnaquery ="select rl.* from retailers r join profitmandi_sms p on r.id=p.identifier join retailerlinks rl on r.id= rl.retailer_id; and rl.user_id is not null ";
-
 
342
			}else if($filter == '1') {
-
 
343
				$cnaquery ="select rl.* from retailers r join profitmandi_sms p on r.id=p.identifier join retailerlinks rl on r.id= rl.retailer_id; and rl.user_id is null ";
-
 
344
			}else if($filter == '2') {
-
 
345
				$cnaquery ="select * from retailers where status = 'not_verified'";
-
 
346
			}
-
 
347
 
-
 
348
			$result = $this->Retailer->query($cnaquery);
-
 
349
			debug($result);
-
 
350
			$this->set(compact('result'));
-
 
351
		}		
-
 
352
			
-
 
353
		
-
 
354
		
-
 
355
	}
334
}
356
}