Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 885 Rev 996
Line 55... Line 55...
55
	* uid[4] : si absent : valeur 'all' (station)
55
	* uid[4] : si absent : valeur 'all' (station)
56
	*/
56
	*/
57
	function getElement($uid){
57
	function getElement($uid){
Line 58... Line 58...
58
		
58
		
59
	   // Controle detournement utilisateur 
-
 
60
	    session_start();
59
	   // Controle detournement utilisateur 
Line 61... Line 60...
61
	 	$this->controleUtilisateur($uid[0]);
60
	 	$this->controleUtilisateur($uid[0]);
62
	 				 
61
	 				 
63
		if (!isset($uid[1]) || $uid[1]=="" || $uid[1]=="all" ) {
62
		if (!isset($uid[1]) || $uid[1]=="" || $uid[1]=="all" ) {
Line 139... Line 138...
139
					$obs[$k]=utf8_decode($v);
138
					$obs[$k]=utf8_decode($v);
140
				}
139
				}
141
			} 
140
			} 
Line 142... Line 141...
142
			
141
			
143
		  	if ($obs['date_observation']!="0000-00-00 00:00:00") {
142
		  	if ($obs['date_observation']!="0000-00-00 00:00:00") {
144
                list($year,$month,$day)= split ('-',$obs['date_observation']);
143
                list($year,$month,$day)= explode('-',$obs['date_observation']);
145
	            list($day)= split (' ',$day);
144
	            list($day)= explode(' ',$day);
146
                $obs['date_observation']=$day."/".$month."/".$year;
145
                $obs['date_observation']=$day."/".$month."/".$year;
147
        	}
146
        	}
148
        	else {
147
        	else {
149
                $obs['date_observation']="00/00/0000";
148
                $obs['date_observation']="00/00/0000";
Line 174... Line 173...
174
					}
173
					}
175
				}
174
				}
176
			}
175
			}
Line 177... Line 176...
177
 
176
 
178
			if ($url_miniature!='') {				
177
			if ($url_miniature!='') {				
179
				list($debut,$ext)=split("\.",basename($url_miniature));
178
				list($debut,$ext)=explode("\.",basename($url_miniature));
180
       		    $temp = fopen($tempfn, "w");
179
       		    $temp = fopen($tempfn, "w");
181
				$buf=file_get_contents($url_miniature);
180
				$buf=file_get_contents($url_miniature);
182
				fwrite($temp,$buf);
181
				fwrite($temp,$buf);
183
    			fclose($temp);
182
    			fclose($temp);