Subversion Repositories eFlore/Applications.cel

Rev

Rev 762 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
416 aurelien 1
<?php
2
 
3
// In : utf8
4
// out : utf8
5
// Transmission observation vers Tela
6
 
7
 
8
Class InventoryTransmit extends DBAccessor  {
9
 
10
 
11
	var $config;
12
 
13
	function InventoryTransmit($config) {
14
 
15
		$this->config=$config;
16
	}
17
 
18
 
19
 
20
	function updateElement($uid,$pairs) {
21
 
22
		 // Controle detournement utilisateur
23
		    session_start();
24
 	        $this->controleUtilisateur($uid[0]);
25
 
26
		$DB=$this->connectDB($this->config,'database_cel');
27
 
28
		if (isset($uid[1])) {
29
	           	$query="UPDATE cel_inventory " .
30
	           	"SET transmission = '".$DB->escapeSimple($pairs['transmission'])."',".
31
				"date_modification = now(), date_transmission = now() ".
32
	        	"WHERE identifiant='".$DB->escapeSimple($uid[0])."' AND ordre in (".$DB->escapeSimple($uid[1]) .")";
33
		}
34
 
35
    	$res =& $DB->query($query);
36
 
37
        if (PEAR::isError($res)) {
38
        	die($res->getMessage());
39
        }
40
 
41
        return true;
42
 
43
	}
44
 
45
 
46
 
47
}
48
 
49
/* +--Fin du code ---------------------------------------------------------------------------------------+
50
* $Log$
51
* Revision 1.3  2008-01-30 08:57:28  ddelon
52
* fin mise en place mygwt
53
*
54
* Revision 1.2  2007-05-22 12:54:09  ddelon
55
* Securisation acces utilisateur
56
*
57
*
58
*
59
*/
60
 
61
 
62
?>