update('CommandesKbis')
->Where('id = ?', $identifiant);
} else {
$q = Doctrine_Query::create()
->update('Commandes')
->Where('idCommande = ?', $identifiant);
}
$q->set('statutCommande', $statut);
$rows = $q->execute();
$firephp->log($rows, 'rows');
if ( count($rows)>0 ){
//Liste des statuts
$q = Doctrine_Query::create()
->from('CommandesStatut')
->where('typeCommande = ?', 'C')
->andWhere('id = ?', $statut);
$statut = $q->fetchOne();
$output = ''.$statut->libStatut.'';
if ( $statut->ordre==3 ){
$output.=
'
'.
'Générer le courrier';
}
}
}
echo $output;
break;
//Gestion des logos
case 'logo':
$subaction = $params[1];
switch ( $subaction ) {
//upload
case 'upload':
$siren = isset($_REQUEST['siren']) ? $_REQUEST['siren'] : $params[2] ;
require_once realpath(dirname(__FILE__)).'/saisie_logo_upload.php';
break;
//crop
case 'crop':
$image = $params[2];
require_once realpath(dirname(__FILE__)).'/saisie_logo_crop.php';
break;
case 'save':
$file = isset($params[2]) ? $params[2] : '';
require_once realpath(dirname(__FILE__)).'/saisie_logo_save.php';
break;
case 'url':
$siren = isset($_REQUEST['siren']) ? $_REQUEST['siren'] : $params[2] ;
require_once realpath(dirname(__FILE__)).'/saisie_logo_url.php';
break;
//Suppression
case 'delete':
$file = isset($_REQUEST['file']) ? $_REQUEST['file'] : '' ;
require_once realpath(dirname(__FILE__)).'/saisie_logo_delete.php';
break;
//Affichage
default:
require_once realpath(dirname(__FILE__)).'/saisie_logo.php';
$siren = isset($_POST['siren']) ? $_POST['siren'] : '' ;
$isin = isset($_POST['isin']) ? $_POST['isin'] : '' ;
$logo = saisie_findlogo($siren, $isin);
if ( !empty($logo) ){
$output = '