New file |
0,0 → 1,67 |
<?php |
// ATTENTION ! Classe compatible uniquement avec nouveau format de bdd du cel // |
|
/** |
* PHP Version 5 |
* |
* @category PHP |
* @package jrest |
* @author David Delon <david.delon@clapas.net> |
* @copyright 2010 Tela-Botanica |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL |
* @version SVN: <svn_id> |
* @link /doc/jrest/ |
*/ |
|
/** |
* |
* in : utf8 |
* out : utf8 |
* |
* |
* Transmission observation vers Tela |
*/ |
class InventoryTransmit extends Cel { |
|
function updateElement($uid,$pairs) { |
|
// Controle detournement utilisateur |
session_start(); |
$this->controleUtilisateur($uid[0]); |
|
if (isset($uid[1]) && $this->estUneSuiteIdentifiantsObservation($uid[1])) { |
$requete_transmission = 'UPDATE cel_obs '. |
'SET transmission = '.$pairs['transmission'].','. |
'date_modification = now(), date_transmission = now() '. |
'WHERE ce_utilisateur = '.$this->proteger($uid[0]).' AND ordre in ('.$uid[1].')'; |
} |
|
$resultat_transmission = $this->executer($requete_transmission); |
|
if (!$resultat_transmission) { |
return false; |
} |
|
return true; |
} |
|
private function estUneSuiteIdentifiantsObservation($chaine) { |
|
// un ensemble d'identifiants est une suite d'identifiants séparés par des virgules |
// sans virgule terminale |
$reg_exp = "/^(([0-9])+,)*([0-9])+$/"; |
|
return preg_match($reg_exp, $chaine); |
|
} |
} |
/* +--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 |
* |
*/ |
?> |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |