Subversion Repositories SmartDukaan

Rev

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

Rev 15927 Rev 17571
Line 209... Line 209...
209
		}
209
		}
210
		setCache($configdata['module'],$cachemodule,$data['response']);
210
		setCache($configdata['module'],$cachemodule,$data['response']);
211
		if(isset($data['response']['response']['wallet'][0]) && !empty($data['response']['response']['wallet'][0])){
211
		if(isset($data['response']['response']['wallet'][0]) && !empty($data['response']['response']['wallet'][0])){
212
			$this->lessphp->object()->ccompile('assets/css/profile.less','assets/css/profile.css');
212
			$this->lessphp->object()->ccompile('assets/css/profile.less','assets/css/profile.css');
213
			$data['stylesheet'] = 'profile.css';
213
			$data['stylesheet'] = 'profile.css';
-
 
214
			if(isset($authorized['isPrivateDealUser']) && !empty($authorized['isPrivateDealUser'])) {
-
 
215
		        	$userId = $this->session->userdata['authorized']['Id'];
-
 
216
		        	$ch = curl_init();
-
 
217
					$url = 'http://shop2020.in:8080/mobileapi/private-deals/1/?userId=7445884&isLoggedIn=true&privateDealUser=true';
-
 
218
					// Set the url, number of POST vars, POST data
-
 
219
					curl_setopt($ch, CURLOPT_URL, $url);
-
 
220
					curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
-
 
221
					
-
 
222
					// Disabling SSL Certificate support temporarly
-
 
223
					curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
-
 
224
					
-
 
225
					// Execute post
-
 
226
					$result = curl_exec($ch);
-
 
227
					if ($result === FALSE) {
-
 
228
						die('Curl failed: ' . curl_error($ch));
-
 
229
					}
-
 
230
					$res = json_decode($result,1);
-
 
231
		        	$data['privatedeals']=$res;
-
 
232
		    }
214
			$this->layout->view('myaccount/account_view',$data);
233
			$this->layout->view('myaccount/account_view',$data);
215
		}else{
234
		}else{
216
			redirect(base_url());
235
			redirect(base_url());
217
		}
236
		}
218
	}
237
	}