Subversion Repositories SmartDukaan

Rev

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

Rev 11805 Rev 11811
Line 87... Line 87...
87
		$responses = $this->parser->parse_response($responses,$module);
87
		$responses = $this->parser->parse_response($responses,$module);
88
	
88
	
89
		
89
		
90
		return $responses;
90
		return $responses;
91
	}
91
	}
-
 
92
	
92
function curlURL($configurl=null,$methodtype='get',$parameter=array(),$userId=null)
93
	function curlURL($configurl=null,$methodtype='get',$parameter=array(),$userId=null)	{		
93
{
-
 
94
		
-
 
95
		$params ='';
94
		$params ='';
96
		$display='';
95
		$display='';
97
		$url = $this->config->item('curl_base_url');
96
		$url = $this->config->item('curl_base_url');
98
		$productsurl =$this->config->item($configurl);
97
		$productsurl =$this->config->item($configurl);
99
		if(isset($productsurl['url']) and !empty($productsurl['url']))
98
		if(isset($productsurl['url']) and !empty($productsurl['url']))
100
			{
-
 
101
				$url .=$productsurl['url'];
-
 
102
				if($productsurl['display'])
-
 
103
				{$display=$productsurl['display'];}
-
 
104
			if(empty($parameter)){$parameter=$productsurl['params'];}
-
 
105
			
-
 
106
 
-
 
107
		if(isset($parameter) and !empty($parameter) and $methodtype=='get')
-
 
108
		{
-
 
109
			$params = $this->parser->prepareParams($parameter,$display,$configurl);
-
 
110
 
-
 
111
		}
-
 
112
		if(isset($parameter) and !empty($parameter) and $methodtype=='post')
-
 
113
		{
99
		{
114
			$params = $this->parser->prepareParams($parameter,$display,$configurl);
100
			$url .=$productsurl['url'];
115
			$methodtype ='post';
101
			if($productsurl['display']) {
-
 
102
				$display=$productsurl['display'];
116
		}
103
			}
117
		if(!isset($parameter) || empty($parameter))
104
			if(empty($parameter)) {
118
			{$params =$this->parser->prepareParams('',$display,$configurl);}
105
				$parameter=$productsurl['params'];
-
 
106
			}			
-
 
107
			/*
119
		if(isset($userId) && $userId != null){
108
			if(isset($parameter) and !empty($parameter) and $methodtype=='get')
120
			$url .= '/?isLoggedIn=true&userId='.$userId;
-
 
121
		}
109
			{
122
		if(isset($query) && $query != null){
110
				$params = $this->parser->prepareParams($parameter,$display,$configurl);
123
 
111
 
-
 
112
			}
-
 
113
			if(isset($parameter) and !empty($parameter) and $methodtype=='post')
-
 
114
			{
-
 
115
				$params = $this->parser->prepareParams($parameter,$display,$configurl);
-
 
116
				$methodtype ='post';
-
 
117
			}
-
 
118
			if(!isset($parameter) || empty($parameter))
-
 
119
				{$params =$this->parser->prepareParams('',$display,$configurl);}
-
 
120
			*/
-
 
121
			if(isset($userId) && $userId != null){
-
 
122
				$url .= '/?isLoggedIn=true&userId='.$userId;
-
 
123
			}
-
 
124
			/*
-
 
125
			if(isset($query) && $query != null){
124
			$params = $query;
126
				$params = $query;
-
 
127
			}		
-
 
128
			return $this->mcurl->add_call($configurl,$methodtype,$url,$params);
-
 
129
			*/
-
 
130
			return $this->mcurl->add_call($configurl,$methodtype,$url);
-
 
131
		} else {
-
 
132
			return '';
125
		}
133
		}
126
		return $this->mcurl->add_call($configurl,$methodtype,$url,$params);
-
 
127
	}
-
 
128
	else
-
 
129
		{return '';}
-
 
130
 
-
 
131
	}
134
	}
132
}
135
}