Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1769 Rev 1773
Line 190... Line 190...
190
	$result = curl_exec($ch);
190
	$result = curl_exec($ch);
191
	curl_close($ch);
191
	curl_close($ch);
192
	return $result;
192
	return $result;
193
}
193
}
Line 194... Line 194...
194
 
194
 
195
function export($cols = array("standard", "avance")) {
195
function export($cols = "standard,avance") {
Line 196... Line 196...
196
	if(!defined('COOKIE')) return FALSE;
196
	if(!defined('COOKIE')) return FALSE;
197
 
197
 
198
	$URL = DOMAIN . '/jrest/CelWidgetExport/export?';
198
	$URL = DOMAIN . '/jrest/CelWidgetExport/export?';
199
	$URL .= http_build_query(array('colonnes' => implode(',', $cols),
199
	$URL .= http_build_query(array('colonnes' => $cols,
200
								   'id_utilisateur' => USER,
200
								   'id_utilisateur' => USER,
Line 201... Line 201...
201
								   'format' => 'csv'));
201
								   'format' => 'csv'));
202
	$ch = curl_init();
202
	$ch = curl_init();
Line -... Line 203...
-
 
203
 
-
 
204
	curl_setopt($ch,CURLOPT_URL, $URL);
203
 
205
	curl_setopt($ch,CURLOPT_COOKIE, 'PHPSESSID=' . COOKIE);
204
	curl_setopt($ch,CURLOPT_URL, $URL);
206
 
205
	curl_setopt($ch,CURLOPT_COOKIE, 'PHPSESSID=' . COOKIE);
207
	if(DEBUG) fwrite(STDERR, "curl -b PHPSESSID=" . COOKIE . ' "' . $URL ."\"\n");
206
 
208
 
207
	curl_setopt($ch,CURLOPT_RETURNTRANSFER, TRUE);
209
	curl_setopt($ch,CURLOPT_RETURNTRANSFER, TRUE);