Rev 416 | Rev 798 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php
// In : utf8
// Out : utf8
// Liste des communes par utilisateur
Class InventoryLocationList extends DBAccessor {
var $config;
function InventoryLocationList($config) {
$this->config=$config;
}
function getElement($uid){
// Controle detournement utilisateur
session_start();
$this->controleUtilisateur($uid[0]);
$DB=$this->connectDB($this->config,'database_cel');
$value=array();
$query = 'SELECT DISTINCT id_location, location, lieudit, station FROM cel_inventory
WHERE identifiant="'.$DB->escapeSimple($uid[0]).'" ORDER BY id_location ASC, location ASC, lieudit ASC, station ASC' ;
//print $query
$res =& $DB->query($query);
if (DB::isError($res)) {
die($res->getMessage());
}
while ($row =& $res->fetchrow(DB_FETCHMODE_ORDERED)) {
$value[] = $row;
}
$output = json_encode($value);
print($output);
return true;
}
}
/* +--Fin du code ---------------------------------------------------------------------------------------+
* $Log$
* Revision 1.6 2008-01-30 08:57:28 ddelon
* fin mise en place mygwt
*
* Revision 1.5 2007-05-22 12:54:09 ddelon
* Securisation acces utilisateur
*
*
*
*/
?>