Subversion Repositories SmartDukaan

Rev

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

Rev 19864 Rev 20051
Line 14... Line 14...
14
 * @var array
14
 * @var array
15
 */
15
 */
16
	public $components = array('Paginator');
16
	public $components = array('Paginator');
17
		    public function beforeFilter() {
17
		    public function beforeFilter() {
18
		    	parent::beforeFilter();
18
		    	parent::beforeFilter();
19
		    	$this->Auth->allow('admin_activations');
19
		    	$this->Auth->allow('admin_activations','admin_index');
20
		    }
20
		    }
21
 
21
 
22
/**
22
/**
23
 * admin_index method
23
 * admin_index method
24
 *
24
 *
25
 * @return void
25
 * @return void
26
 */
26
 */
27
	public function admin_index() {
27
	public function admin_index() {
28
		throw new NotFoundException(__('Unauthorized access'));
28
// 		throw new NotFoundException(__('Unauthorized access'));
29
		if ($this->request->is('post')) {
29
		if ($this->request->is('post')) {
30
			alert('Clicked');
30
			alert('Clicked');
31
		}
31
		}
32
		$this->Callhistory->recursive = 0;
32
		$this->Callhistory->recursive = 0;
33
		$this->Paginator->settings = array('order' => array('id'=>'desc'));
33
		$this->Paginator->settings = array('order' => array('id'=>'desc'),'conditions' => array('call_time'=>'CURDATE()'));
34
 
34
 
35
		$this->set('callhistories', $this->Paginator->paginate());
35
		$this->set('callhistories', $this->Paginator->paginate());
36
	}
36
	}
37
 
37
 
38
/**
38
/**