2010-07-06 14:15:55 +00:00

41 lines
1.3 KiB
PHP

<?php
isset($_REQUEST['q']) ? $q = $_REQUEST['q'] : $q = '';
$params = explode('/', $q);
$action = $params[0];
switch ( $action ) {
case 'rs':
try {
$O = $client->getIdentite($_REQUEST['siren'], 0, false);
echo $O['result']['Nom'];
} catch (SoapFault $fault) {
require_once 'soaperror.php';
processSoapFault($client,$fault,$tabInfo);
}
break;
case 'comment':
//Enregistrement du commentaire
if ( isset($_REQUEST['submit']) && $_REQUEST['submit']=='comment' ){
require_once 'dbbootstrap.php';
setDbConn('sdv1');
$q = Doctrine_Query::create()
->update('Commandes')
->set('statutCommande', '?', $_REQUEST['statutCommande'])
->set('commentaire', '?', $_REQUEST['commentaire'])
->where('idCommande = ?', $_REQUEST['idCommande']);
//echo $q->getSql();
//print_r($q->getFlattenedParams());
echo $rows = $q->execute();
} else {
?>
<form name="formComment" id="formComment" action="/?page=greffescmd&q=comment" method="post">
<span id="message"></span><br/>
<input type="hidden" name="idCommande" value="<?=$_REQUEST['id']?>"/>
<input type="hidden" name="statutCommande" value="<?=$_REQUEST['erreur']?>"/>
Commentaire sur la commande G<?=$_REQUEST['id']?><br/>
<textarea name="commentaire" cols="40" rows="3"></textarea>
</form>
<?php
}
break;
}