Subversion Repositories SmartDukaan

Rev

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

Rev 19116 Rev 19121
Line 517... Line 517...
517
	}
517
	}
518
 
518
 
519
	public function notificationactive(){
519
	public function notificationactive(){
520
		session_write_close();
520
		session_write_close();
521
		$cid = $this->request->query('cid');
521
		$cid = $this->request->query('cid');
522
		$cidVals = explode("_", $cid);
522
		/*$cidVals = explode("_", $cid);
523
		$cid = $cidVals[0];
523
		$cid = $cidVals[0];
524
		$this->log("cid $cid",'notificationactive');
524
		$this->log("cid $cid",'notificationactive');
525
		$options = array('conditions' => array('id'=> $cid,'status'=>'active','expiresat >'=>date('Y-m-d H:i:s',time())),'recursive'=>-1);
525
		$options = array('conditions' => array('id'=> $cid,'status'=>'active','expiresat >'=>date('Y-m-d H:i:s',time())),'recursive'=>-1);
526
		$count = $this->NotificationCampaign->find('count',$options);
526
		$count = $this->NotificationCampaign->find('count',$options);
527
		$this->log("count ".print_r($count,1),'notificationactive');
527
		$this->log("count ".print_r($count,1),'notificationactive');
528
		if(!$count){
528
		if(!$count){
529
			$result = array('success'=>false);
529
			$result = array('success'=>false);
530
		}else{
530
		}else{
531
			$result = array('success'=>true);
531
			$result = array('success'=>true);
532
		}
532
		}*/
533
		
-
 
-
 
533
		$urlPush = Configure::read('nodeurl')."/getCampaignStatus?".$cid;
-
 
534
		$result = $this->make_request($urlPush,json_encode($message,JSON_NUMERIC_CHECK));
534
		$this->response->type('json');
535
		$this->response->type('json');
535
		$this->layout = 'ajax';
536
		$this->layout = 'ajax';
536
		$this->set(array(
537
		$this->set(array(
537
		    'result' => $result,
538
		    'result' => $result,
538
		    '_serialize' => array('result')
539
		    '_serialize' => array('result')