Subversion Repositories SmartDukaan

Rev

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

Rev 12732 Rev 12763
Line 140... Line 140...
140
			}
140
			}
141
			setCache($configdata['module'],$cachemodule,$data['response']);
141
			setCache($configdata['module'],$cachemodule,$data['response']);
142
			$this->layout->view(strtolower(__CLASS__).'/login',$data);
142
			$this->layout->view(strtolower(__CLASS__).'/login',$data);
143
		}
143
		}
144
	}
144
	}
145
 
145
/*
146
	function logout() {
146
	function logout() {
147
		$fosauthorized = $this->session->userdata('fosauthorized');
147
		$fosauthorized = $this->session->userdata('fosauthorized');
148
		if(isset($fosauthorized) and !empty($fosauthorized))
148
		if(isset($fosauthorized) and !empty($fosauthorized))
149
		{
149
		{
150
			$this->session->unset_userdata('fosauthorized');
150
			$this->session->unset_userdata('fosauthorized');
Line 155... Line 155...
155
			$this->session->unset_userdata('userId');
155
			$this->session->unset_userdata('userId');
156
			$this->session->unset_userdata('captcha');
156
			$this->session->unset_userdata('captcha');
157
			redirect(base_url().'home');
157
			redirect(base_url().'home');
158
		}
158
		}
159
	}
159
	}
-
 
160
*/
-
 
161
	function changeuser() {
-
 
162
		$authorized = $this->session->userdata('authorized');
-
 
163
		if(isset($authorized) and !empty($authorized))
-
 
164
		{
-
 
165
			$this->session->unset_userdata('authorized');
-
 
166
			$this->session->unset_userdata('addressId');
-
 
167
			$this->session->unset_userdata('hotspotId');
-
 
168
			$this->session->unset_userdata('cod');
-
 
169
			$this->session->unset_userdata('userId');
-
 
170
			$this->session->unset_userdata('captcha');
-
 
171
			redirect(base_url().'fos/searchcounter');
-
 
172
		}
-
 
173
	}
160
 
174
 
161
    function signupcounter() {
175
    function signupcounter() {
162
    	$data = array();    	
176
    	$data = array();    	
163
		if (isset($_SERVER['HTTP_REFERER'])) {
177
		if (isset($_SERVER['HTTP_REFERER'])) {
164
			if ((strpos($_SERVER['HTTP_REFERER'],'login') == false) && (strpos($_SERVER['HTTP_REFERER'],'register') == false)) {
178
			if ((strpos($_SERVER['HTTP_REFERER'],'login') == false) && (strpos($_SERVER['HTTP_REFERER'],'register') == false)) {
Line 278... Line 292...
278
		    $data['response']=$this->fos_model->getSearch($this->input->get(),$this->input->post(),$this->config->item('fos_dashboard'));
292
		    $data['response']=$this->fos_model->getSearch($this->input->get(),$this->input->post(),$this->config->item('fos_dashboard'));
279
			$this->layout->view(strtolower(__CLASS__).'/searchuser',$data);	
293
			$this->layout->view(strtolower(__CLASS__).'/searchuser',$data);	
280
		}
294
		}
281
	}     
295
	}     
282
 
296
 
283
	function loginas($userid,$cartId) {
297
	function loginas($userid,$cartId,$email) {
284
		$auth = array('Id'=>$userid,'isLoggedIn'=>1,'cartId'=>$cartId,'isPrivateDealUser'=>1);
298
		$auth = array('Id'=>$userid,'isLoggedIn'=>1,'cartId'=>$cartId,'isPrivateDealUser'=>1,'email'=>$email);
285
		$this->session->set_userdata('authorized',$auth);
299
		$this->session->set_userdata('authorized',$auth);
286
		redirect('/search');
300
		redirect('/search');
287
	}
301
	}
288
 
302
 
289
	function getusers($id) {
303
	function getusers($id) {