Subversion Repositories eFlore/Applications.cel

Rev

Rev 416 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php


Class InventoryContributionList extends DBAccessor {


        protected $config;

        function InventoryContributionList($config) {

                $this->config=$config;
        }

        function getRessource() {
                echo '';
        }


        function getElement($uid){

                if(!isset($uid[0])) {
                        echo '';
                }

                $DB=$this->connectDB($this->config,'database_cel');

                $query="SELECT * FROM cel_inventory ".
                "WHERE identifiant = '".$DB->escapeSimple($uid[0])."' ".
                "ORDER BY date_modification DESC LIMIT 0,5";

            $res =& $DB->query($query);

        if (DB::isError($res)) {
                die($res->getMessage());
        }

        $resume = "";


           while ($row =& $res->fetchrow(DB_FETCHMODE_ASSOC)) {
       $row['nom_sel'] = htmlspecialchars($row['nom_sel']);
       $row['identifiant'] = htmlspecialchars($row['identifiant']);
       $row['location'] = htmlspecialchars($row['location']);
       $row['id_location'] = htmlspecialchars($row['id_location']);
       $row['station'] = htmlspecialchars($row['station']);
       $row['milieu'] = htmlspecialchars($row['milieu']);
       $row['commentaire'] = htmlspecialchars($row['commentaire']);
       $row['transmission'] = htmlspecialchars($row['transmission']);


       $resume.= '<p>'.$row['nom_sel'] ." (".$row['num_nom_sel'].") ".
                        'Location : '. $row['location'].",". $row['station'] . "," . $row['milieu'] . "," . $row['commentaire'] . "," . $row['transmission'] .
                        '</p>';

       }


        header("Content-Type: text/html; charset=ISO-8859-1");
        print $resume;
        exit;
    }

}


/* +--Fin du code ---------------------------------------------------------------------------------------+
* $Log$
* Revision 1.5  2008-11-13 11:29:12  ddelon
* Reecriture gwt-ext
*
* Revision 1.4  2007-06-06 13:31:16  ddelon
* v0.09
*
* Revision 1.3  2007-05-22 12:54:09  ddelon
* Securisation acces utilisateur
*
*
*
*/

?>