Subversion Repositories SmartDukaan

Rev

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

Rev 15669 Rev 15767
Line 197... Line 197...
197
 
197
 
198
	public function notificationactive(){
198
	public function notificationactive(){
199
		session_write_close();
199
		session_write_close();
200
		$cid = $this->request->query('cid');
200
		$cid = $this->request->query('cid');
201
		$this->log("cid $cid",'notificationactive');
201
		$this->log("cid $cid",'notificationactive');
202
		$options = array('conditions' => array('id'=> $cid,'status'=>'active','expiresAt >'=>date('Y-m-d H:i:s',time())),'recursive'=>-1);
202
		$options = array('conditions' => array('id'=> $cid,'status'=>'active','expiresat >'=>date('Y-m-d H:i:s',time())),'recursive'=>-1);
203
		$count = $this->NotificationCampaign->find('count',$options);
203
		$count = $this->NotificationCampaign->find('count',$options);
204
		$this->log("count ".print_r($count,1),'notificationactive');
204
		$this->log("count ".print_r($count,1),'notificationactive');
205
		if(!$count){
205
		if(!$count){
206
			$result = array('success'=>false);
206
			$result = array('success'=>false);
207
		}else{
207
		}else{
Line 245... Line 245...
245
				$this->Session->setFlash(__('Push notification scheduled for '.sizeof($users).' users'));
245
				$this->Session->setFlash(__('Push notification scheduled for '.sizeof($users).' users'));
246
				return $this->redirect(array('controller' => 'administration', 'action' => 'dashboard', 'admin' => false));
246
				return $this->redirect(array('controller' => 'administration', 'action' => 'dashboard', 'admin' => false));
247
			}
247
			}
248
		}
248
		}
249
	}
249
	}
250
}
-
 
251
250
}
-
 
251