Subversion Repositories eFlore/Applications.cel

Rev

Rev 416 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 416 Rev 765
1
<?php
1
<?php
2
// CRUD ligne d'inventaire :
-
 
3
// In get : utf8
-
 
4
// In post : utf8
-
 
5
// out : utf8
-
 
6
 
-
 
7
Class CodeAsync extends DBAccessor {
2
Class CodeAsync extends Cel {
8
 
-
 
9
	function Inventory($config) {
-
 
10
 
-
 
11
		$this->config=$config;
-
 
12
	}
-
 
13
 
-
 
14
 
3
 
15
	function getElement($uid){
4
	function getElement($uid){
16
 
5
 
17
	   // Controle detournement utilisateur
6
	   // Controle detournement utilisateur
18
	    session_start();
7
	    session_start();
19
		$value=array();
8
		$value=array();
20
 
9
 
21
		$cle = urldecode($uid[0]);
10
		$cle = urldecode($uid[0]);
22
		
11
		
23
		$addr = "http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true&amp;key=".$cle;
12
		$addr = "http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true&amp;key=".$cle;
24
		
13
		
25
		$script = file_get_contents($addr) ;
14
		$script = file_get_contents($addr) ;
26
		header("Content-Type: text/plain; charset=UTF-8");
15
		header("Content-Type: text/plain; charset=UTF-8");
27
		$value = json_encode($script) ;
16
		$value = json_encode($script) ;
28
 
17
 
29
		echo $value;
18
		echo $value;
30
	}
19
	}
31
}
20
}
32
?>
21
?>