Subversion Repositories eFlore/Applications.cel

Rev

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

<?php

// In : utf8
// out : utf8
// Transmission observation vers Tela


Class InventoryTransmit extends DBAccessor  {


        var $config;
        
        function InventoryTransmit($config) {

                $this->config=$config;
        }
        


        function updateElement($uid,$pairs) {
                
                 // Controle detournement utilisateur 
                    session_start();
                $this->controleUtilisateur($uid[0]);

                $DB=$this->connectDB($this->config,'database_cel');
                                                        
                if (isset($uid[1])) {
                        $query="UPDATE cel_inventory " .
                        "SET transmission = '".$DB->escapeSimple($pairs['transmission'])."',".
                                "date_modification = now(), date_transmission = now() ". 
                        "WHERE identifiant='".$DB->escapeSimple($uid[0])."' AND ordre in (".$DB->escapeSimple($uid[1]) .")";
                } 

        $res =& $DB->query($query);
                
        if (PEAR::isError($res)) {
                die($res->getMessage());
        }
        
        return true;
                
        }
                        


}

/* +--Fin du code ---------------------------------------------------------------------------------------+
* $Log$
* Revision 1.3  2008-01-30 08:57:28  ddelon
* fin mise en place mygwt
*
* Revision 1.2  2007-05-22 12:54:09  ddelon
* Securisation acces utilisateur
*
*
* 
*/

 
?>