Subversion Repositories SmartDukaan

Rev

Rev 12700 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12700 Rev 12732
Line 63... Line 63...
63
						}
63
						}
64
					}
64
					}
65
				}
65
				}
66
			}			
66
			}			
67
		}
67
		}
68
		
68
			
69
		//add_call( KEY, METHOD, URL, array of PARAMS, array of CURL_OPTS )
-
 
70
		//$this->curlURL('products','get',$get);
-
 
71
		$responses = $this->mcurl->execute();
69
		$responses = $this->mcurl->execute();
72
		if(isset($responses) and !empty($responses))
70
		if(isset($responses) and !empty($responses))
73
		$responses = $this->parser->parse_response($responses,$module);
71
		$responses = $this->parser->parse_response($responses,$module);
74
		// if(isset($head) && !empty($head)){
-
 
75
		// 	foreach($head['header'] as $key=>$value){
-
 
76
		// 		$responses['header'][$key] = $value;
-
 
77
		// 	}
-
 
78
		// }
72
	
79
		// if(isset($foot) && !empty($foot)){
-
 
80
		// 	foreach($foot['footer'] as $key=>$value){
-
 
81
		// 		$responses['footer'][$key] = $value;
-
 
82
		// 	}
-
 
83
		// }
-
 
84
		return $responses;
73
		return $responses;
85
	}
74
	}
86
	
75
	
87
	function getSignup($get=array(),$post=array(),$module=array())
76
	function getSignup($get=array(),$post=array(),$module=array())
88
	{		
77
	{		
Line 169... Line 158...
169
		if(isset($responses) and !empty($responses))
158
		if(isset($responses) and !empty($responses))
170
		$responses = $this->parser->parse_response($responses,$module);    
159
		$responses = $this->parser->parse_response($responses,$module);    
171
		return $responses;
160
		return $responses;
172
	}
161
	}
173
 
162
 
-
 
163
	function getSearch($get=array(),$post=array(),$module=array())
-
 
164
	{	
-
 
165
		$output =array();
-
 
166
		if(isset($module) and !empty($module))
-
 
167
		{
-
 
168
			if(isset($module['header']) and !empty($module['header']))
-
 
169
			{
-
 
170
				foreach($module['header'] as $header)
-
 
171
				{
-
 
172
					$this->curlURL($header,'get');	
-
 
173
 
-
 
174
				}
-
 
175
			}
-
 
176
			if(isset($module['footer']) and !empty($module['footer']))
-
 
177
			{
-
 
178
				foreach($module['footer'] as $footer)
-
 
179
				{
-
 
180
 
-
 
181
					$this->curlURL($footer,'get');	
-
 
182
				}
-
 
183
			}
-
 
184
			if(isset($module['response']) and !empty($module['response']))
-
 
185
			{
-
 
186
				foreach($module['response'] as $response)
-
 
187
				{
-
 
188
					if(isset($post) and !empty($post))
-
 
189
					{
-
 
190
						if($this->current_client=='prestashop' || $this->current_client=='magento' ){
-
 
191
							$this->curlURL($response,'get',$post);
-
 
192
						} else{							
-
 
193
							$this->curlURL($response,'get',$post);
-
 
194
						}
-
 
195
					}
-
 
196
				}
-
 
197
			}			
-
 
198
		}
-
 
199
			
-
 
200
		$responses = $this->mcurl->execute();		
-
 
201
		if(isset($responses) and !empty($responses))
-
 
202
		$responses = $this->parser->parse_response($responses,$module);
-
 
203
	
-
 
204
		return $responses;
-
 
205
	}
-
 
206
 
-
 
207
	function getUser($get=array(),$post=array(),$module=array())
-
 
208
	{			
-
 
209
		$output =array();
-
 
210
		if(isset($module) and !empty($module))
-
 
211
		{
-
 
212
			if(isset($module['header']) and !empty($module['header']))
-
 
213
			{
-
 
214
				foreach($module['header'] as $header)
-
 
215
				{
-
 
216
					$this->curlURL($header,'get');	
-
 
217
 
-
 
218
				}
-
 
219
			}
-
 
220
			if(isset($module['footer']) and !empty($module['footer']))
-
 
221
			{
-
 
222
				foreach($module['footer'] as $footer)
-
 
223
				{
-
 
224
 
-
 
225
					$this->curlURL($footer,'get');	
-
 
226
				}
-
 
227
			}
-
 
228
			if(isset($module['response']) and !empty($module['response']))
-
 
229
			{
-
 
230
				foreach($module['response'] as $response)
-
 
231
				{
-
 
232
					if(isset($post) and !empty($post))
-
 
233
					{
-
 
234
						if($this->current_client=='prestashop' || $this->current_client=='magento' ){							
-
 
235
							$this->curlURL($response,'get',$post);
-
 
236
						} else{							
-
 
237
							$this->curlURL($response,'get',$post);
-
 
238
						}
-
 
239
					}
-
 
240
				}
-
 
241
			}			
-
 
242
		}
-
 
243
			
-
 
244
		$responses = $this->mcurl->execute();		
-
 
245
		if(isset($responses) and !empty($responses))
-
 
246
		$responses = $this->parser->parse_response($responses,$module);
-
 
247
	
-
 
248
		return $responses;
-
 
249
	}
-
 
250
 
174
	function curlURL($configurl=null,$methodtype='get',$parameter=array()) {		
251
	function curlURL($configurl=null,$methodtype='get',$parameter=array()) {		
175
		$params ='';
252
		$params ='';
176
		$display='';
253
		$display='';
177
		$url = $this->config->item('curl_base_url');
254
		$url = $this->config->item('curl_base_url');
178
		$productsurl =$this->config->item($configurl);
255
		$productsurl =$this->config->item($configurl);