Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 416 Rev 423
Line 25... Line 25...
25
 
25
 
Line 26... Line 26...
26
	     	$DB=$this->connectDB($this->config,'database_cel');
26
	     	$DB=$this->connectDB($this->config,'database_cel');
Line 27... Line -...
27
 
-
 
28
			$value=array();
-
 
29
 
-
 
30
	     	// cmc_mot_cle, cmc_id_mot_cle_utilisateur, cmc_id_parent
-
 
31
 
-
 
32
 
-
 
33
	     	/*$query0="SELECT \"racine_entite\"  ,  MD5(\"racine_entite\"), MD5(\"000null\") ".
-
 
34
	    			" FROM cel_inventory WHERE 1 " ;
-
 
35
 
-
 
36
	    	$query1="SELECT DISTINCT id_location   , MD5(CONCAT(id_location,\"racine_entite\")), MD5(\"racine_entite\") ".
-
 
37
	    			" FROM cel_inventory WHERE identifiant='".$DB->escapeSimple($uid[0])."' " .
-
 
38
	           		" ORDER BY id_location";
-
 
39
 
-
 
40
	        $query2="SELECT DISTINCT location  , MD5(CONCAT(location,id_location)), MD5(CONCAT(id_location,\"racine_entite\")) ".
-
 
41
	    			" FROM cel_inventory WHERE identifiant='".$DB->escapeSimple($uid[0])."' " .
-
 
42
	           		" ORDER BY location";
-
 
43
 
-
 
44
	        $query3="SELECT DISTINCT lieudit,  MD5(CONCAT(lieudit,location)), MD5(CONCAT(location,id_location)) ".
-
 
45
	    			" FROM cel_inventory WHERE identifiant='".$DB->escapeSimple($uid[0])."' " .
-
 
46
	           		" ORDER BY lieudit";
-
 
47
	        */
-
 
48
	      /*
-
 
49
	        $query4="SELECT DISTINCT station,  MD5(station), MD5(lieudit) ".
-
 
50
	    			" FROM cel_inventory WHERE identifiant='".$DB->escapeSimple($uid[0])."' " .
-
 
51
	           		" ORDER BY station";
-
 
52
	        */
-
 
53
 
-
 
54
	        //$query="(".$query0.") UNION (". $query1.") UNION (".$query2.") UNION (".$query3 .") UNION (".$query4 .")" ;
-
 
55
 
27
 
56
	        //$query="(".$query0.") UNION (". $query1.") UNION (".$query2.") UNION (".$query3 .") " ;
28
			$value=array();
Line 57... Line 29...
57
 
29
 
Line 69... Line 41...
69
 
41
 
70
            while ($row =& $res->fetchrow(DB_FETCHMODE_ORDERED)) {
42
            while ($row =& $res->fetchrow(DB_FETCHMODE_ORDERED)) {
71
            	$value[] = $row;
43
            	$value[] = $row;
Line 72... Line -...
72
    	    }
-
 
73
 
44
    	    }
Line 74... Line 45...
74
			$json = new Services_JSON();
45
 
Line 75... Line 46...
75
			$output = $json->encode($value);
46
			$output = json_encode($value);
Line 76... Line -...
76
 
-
 
77
			print($output);
47
 
Line 78... Line 48...
78
 
48
			print($output);