Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 540 Rev 617
Line 73... Line 73...
73
		$xml .= '	xmlns:dc="http://purl.org/dc/elements/1.1/"'."\n";
73
		$xml .= '	xmlns:dc="http://purl.org/dc/elements/1.1/"'."\n";
74
		$xml .= '	xmlns:dcterms="http://purl.org/dc/terms">'."\n";
74
		$xml .= '	xmlns:dcterms="http://purl.org/dc/terms">'."\n";
Line 75... Line 75...
75
			
75
			
76
 
-
 
77
        while ($picture =& $result->fetchrow(DB_FETCHMODE_ASSOC)) {
-
 
78
 
76
 
Line 79... Line 77...
79
			
77
        while ($picture =& $result->fetchrow(DB_FETCHMODE_ASSOC)) {
80
        	// Calcul du chemin sur le serveur en fonction de l'identifiant (id)
78
        	// Calcul du chemin sur le serveur en fonction de l'identifiant (id)
81
        	
79
        	
Line 99... Line 97...
99
			$xml .= '		dc:title="'.$picture['nom_sel'].'"'."\n";
97
			$xml .= '		dc:title="'.$picture['nom_sel'].'"'."\n";
100
			$xml .= '		dc:description="'.$picture['nom_sel']." - [fichier_origine:".$picture['ci_nom_original'].'][image_identifiant:'.$picture['ci_id_image'].']';
98
			$xml .= '		dc:description="'.$picture['nom_sel']." - [fichier_origine:".$picture['ci_nom_original'].'][image_identifiant:'.$picture['ci_id_image'].']';
101
			$xml .= '[image_ordre:'.$picture['ci_ordre'].']';
99
			$xml .= '[image_ordre:'.$picture['ci_ordre'].']';
102
			$xml .= '[observation_identifiant:'.$picture['id'].']';
100
			$xml .= '[observation_identifiant:'.$picture['id'].']';
103
			$xml .= '[observation_ordre:'.$picture['ordre'].']'.'"'."\n";
101
			$xml .= '[observation_ordre:'.$picture['ordre'].']'.'"'."\n";
104
			
-
 
105
			list($identifiant) = split("@", $picture['identifiant']);
-
 
106
			$creator=$identifiant."@...";
-
 
107
			
-
 
108
			$xml .= '		dc:creator="'.$creator.'"'."\n";
102
			$xml .= '		dc:creator="'.$picture['identifiant'].'"'."\n";
109
			$xml .= '		dc:publisher="CEL"'."\n";
103
			$xml .= '		dc:publisher="CEL"'."\n";
110
			$xml .= '		dcterms:spatial="'.utf8_decode($picture['location'])." (".$picture['id_location'].")".'"'."\n";
104
			$xml .= '		dcterms:spatial="'.utf8_decode($picture['location'])." (".$picture['id_location'].")".'"'."\n";
Line 111... Line 105...
111
			
105
			
112
	        if ($picture['date_observation'] != '0000-00-00 00:00:00') {
106
	        if ($picture['date_observation'] != '0000-00-00 00:00:00') {
Line 125... Line 119...
125
		echo utf8_encode(str_replace(' & ', ' & ', $xml));
119
		echo utf8_encode(str_replace(' & ', ' & ', $xml));
Line 126... Line 120...
126
		
120
		
Line -... Line 121...
-
 
121
 
-
 
122
      }
-
 
123
 
-
 
124
	function envoyerRequete($url) {
-
 
125
		$contenu = false;
-
 
126
		$contexte = stream_context_create(array(
-
 
127
				'http' => array(
-
 
128
      			'method' => 'GET',
-
 
129
			    'header' => "Content-type: application/x-www-form-urlencoded\r\n")));
-
 
130
		      	
-
 
131
		$flux = @fopen($url, 'r', false, $contexte);
-
 
132
		$contenu = json_decode(stream_get_contents($flux));
Line 127... Line 133...
127
 
133
		fclose($flux);
128
      }
134
		return $contenu;