Modification condition pour l'affichage des fichiers clients
This commit is contained in:
parent
3d4644a732
commit
e52006a29d
@ -7,7 +7,7 @@ class IndexController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
$idClient = $request->getParam('idClient', null);
|
||||
$this->view->assign('idClient', $idClient);
|
||||
|
||||
|
||||
//Liste des profils
|
||||
$profilM = new Application_Model_Profil();
|
||||
$sql = $profilM->select();
|
||||
@ -30,15 +30,15 @@ class IndexController extends Zend_Controller_Action
|
||||
->where("dateStop != '0000-00-00 00:00:00'")
|
||||
->where("error = ''")
|
||||
->order('dateStart DESC');
|
||||
|
||||
if ( intval($idClient)!=0 ) {
|
||||
|
||||
if ( null != $idClient ) {
|
||||
$sql->where('fichier LIKE "'.$idClient.'-%"');
|
||||
} else {
|
||||
$sql->limit(5);
|
||||
}
|
||||
|
||||
|
||||
$this->view->assign('fileFinish', $commandesM->fetchAll($sql));
|
||||
|
||||
|
||||
//Récupérer les clients
|
||||
$dbConfig = array(
|
||||
'host' => MYSQL_HOST,
|
||||
@ -51,12 +51,12 @@ class IndexController extends Zend_Controller_Action
|
||||
);
|
||||
$sqlmetier = Zend_Db::factory('Mysqli', $dbConfig);
|
||||
$sql = $sqlmetier->select()
|
||||
->from('sdv1.clients', array('id', 'nom'))
|
||||
->where("actif = 'Oui'");
|
||||
->from('sdv1.clients', array('id', 'nom'))
|
||||
->where("actif = 'Oui'");
|
||||
$clients = $sqlmetier->fetchAll($sql, null, Zend_Db::FETCH_OBJ);
|
||||
|
||||
|
||||
$this->view->assign('clients', $clients);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function getinfoAction()
|
||||
|
Loading…
Reference in New Issue
Block a user