Subversion Repositories SmartDukaan

Rev

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

Rev 15762 Rev 15767
Line 25... Line 25...
25
    }
25
    }
26
    
26
    
27
	public function oneringcb() {
27
	public function oneringcb() {
28
		$this->log(print_r($_REQUEST,1),'onering');
28
		$this->log(print_r($_REQUEST,1),'onering');
29
		$this->layout = "ajax";
29
		$this->layout = "ajax";
30
        $this->response->type('json');
30
		$this->response->type('json');
31
        $this->set(array(
31
		$this->set(array(
32
            'result' => $result,
32
		    'result' => $result,
33
            '_serialize' => array('result')
33
		    '_serialize' => array('result')
34
        ));
34
		)); 
35
        $this->render('/Elements/json');
35
		$this->render('/Elements/json');
36
	}
36
	}
37
 
37
 
38
	public function mywallet() {
38
	public function mywallet() {
39
		$userId = $this->request->query('user_id');
39
		$userId = $this->request->query('user_id');
40
		$tokenValidated = $this->checkToken($userId);
40
		$tokenValidated = $this->checkToken($userId);
Line 43... Line 43...
43
			$redirectUrl = $this->getAutoLoginUrl($userId,$next);
43
			$redirectUrl = $this->getAutoLoginUrl($userId,$next);
44
			$this->log($redirectUrl,'headers');
44
			$this->log($redirectUrl,'headers');
45
			$this->layout = 'innerpages';
45
			$this->layout = 'innerpages';
46
			$this->set(compact('redirectUrl'));
46
			$this->set(compact('redirectUrl'));
47
		}else{
47
		}else{
-
 
48
			$this->redirect(array('controller'=>'special','action'=>'native','login'));
48
			if($tokenValidated == 0){
49
			/*if($tokenValidated == 0){
49
				$this->redirect(array('controller'=>'special','action'=>'native','login'));
50
				$this->redirect(array('controller'=>'special','action'=>'native','login'));
50
			}elseif($tokenValidated == -1){
51
			}elseif($tokenValidated == -1){
51
				$this->redirect(array('controller'=>'abouts','action'=>'askforupdate'));
52
				$this->redirect(array('controller'=>'abouts','action'=>'askforupdate'));
52
			}
53
			}*/
53
		}
54
		}
54
	}
55
	}
55
 
56
 
56
	public function socialauth() {
57
	public function socialauth() {
57
		$this->layout = "ajax";
58
		$this->layout = "ajax";
Line 537... Line 538...
537
                $this->log("For $user_id ".$registatoin_ids[0]." ".print_r($result,1),'pushnotifications');
538
                $this->log("For $user_id ".$registatoin_ids[0]." ".print_r($result,1),'pushnotifications');
538
        }
539
        }
539
 
540
 
540
	public function admin_index() {
541
	public function admin_index() {
541
		$this->User->recursive = 0;
542
		$this->User->recursive = 0;
542
		$options = array('limit'=>100,'order'=>array('id'=>'desc'));
543
		$options = array('limit'=>20,'order'=>array('id'=>'desc'));
543
		$this->Paginator->settings = $options;
544
		$this->Paginator->settings = $options;
544
		$users = $this->Paginator->paginate();
545
		$users = $this->Paginator->paginate();
545
 
546
 
546
		$groups = $this->User->Group->find('list');
547
		$groups = $this->User->Group->find('list');
547
		
548