Subversion Repositories SmartDukaan

Rev

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

Rev 16271 Rev 16308
Line 99... Line 99...
99
			} elseif($storeId == 4){
99
			} elseif($storeId == 4){
100
				$urlparts = parse_url($url);
100
				$urlparts = parse_url($url);
101
				$url = $urlparts['path'];
101
				$url = $urlparts['path'];
102
				if(!empty($urlparts['query'])){
102
				if(!empty($urlparts['query'])){
103
					$url .= '?'.$urlparts['query'];	
103
					$url .= '?'.$urlparts['query'];	
104
					$this->log(print_r($url,1),'headers');
-
 
105
				}		
104
				}		
106
				$tokenValidated = $this->checkToken($userId);
105
				$tokenValidated = $this->checkToken($userId);
107
				if(isset($userId) && !empty($userId) && $tokenValidated==1){			
106
				if(isset($userId) && !empty($userId) && $tokenValidated==1){			
108
					$url = $this->getAutoLoginUrl($userId,$url);
107
					$url = $this->getAutoLoginUrl($userId,$url);
109
					$this->log(print_r($url,1),'headers');
-
 
110
				} else{
108
				} else{					
111
					$url = '/special/native/login';
109
					if($tokenValidated == 0){
112
					//if($tokenValidated == 0){
110
						$url = '/special/native/login';
113
						//}elseif($tokenValidated == -1){
111
					}elseif($tokenValidated == -1){
114
						//$url = '/abouts/askforupdate';
112
						$url = '/abouts/askforupdate';
115
					//}
113
					}
116
				}
114
				}
-
 
115
				$this->log(print_r($url,1),'headers');
117
			} elseif($storeId==5){
116
			} elseif($storeId==5){
118
				$url = "http://clk.omgt5.com/?PID=10314&r=$url";
117
				$url = "http://clk.omgt5.com/?PID=10314&r=$url";
119
			} /*elseif($storeId==1){
118
			} /*elseif($storeId==1){
120
				$url = "http://clk.omgt5.com/?PID=13092&r=$url";
119
				$url = "http://clk.omgt5.com/?PID=13092&r=$url";
121
			}*/
120
			}*/
Line 164... Line 163...
164
			$redirectUrl = $this->getAutoLoginUrl($userId,$next);
163
			$redirectUrl = $this->getAutoLoginUrl($userId,$next);
165
			header('location:'.$redirectUrl);
164
			header('location:'.$redirectUrl);
166
			exit();
165
			exit();
167
		} else{
166
		} else{
168
			$this->redirect(array('controller'=>'special','action'=>'native','login'));
167
			$this->redirect(array('controller'=>'special','action'=>'native','login'));
169
			/*if($tokenValidated == 0){
168
			if($tokenValidated == 0){
170
				$this->redirect(array('controller'=>'special','action'=>'native','login'));
169
				$this->redirect(array('controller'=>'special','action'=>'native','login'));
171
			}elseif($tokenValidated == -1){
170
			}elseif($tokenValidated == -1){
172
				$this->redirect(array('controller'=>'abouts','action'=>'askforupdate'));
171
				$this->redirect(array('controller'=>'abouts','action'=>'askforupdate'));
173
			}*/
172
			}
174
		}
173
		}
175
	}	
174
	}	
176
 
175
 
177
/**
176
/**
178
 * edit method
177
 * edit method