From d972d9d54510dc44b3c50527fa581073c3eff54a Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Wed, 18 Apr 2012 13:14:58 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20option=20de=20r=C3=A9initialisation=20d?= =?UTF-8?q?'un=20enrichissement=20pour=20recommencer=20=C3=A0=20z=C3=A9ro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/IndexController.php | 22 +++++++++++++++++++-- application/views/scripts/index/index.phtml | 11 ++++++++++- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php index 788f492f..3d4f36b7 100644 --- a/application/controllers/IndexController.php +++ b/application/controllers/IndexController.php @@ -70,7 +70,25 @@ class IndexController extends Zend_Controller_Action } else { echo 'Impossible de charger le fichier.'; } - - } + + public function restartAction() + { + $this->_helper->layout()->disableLayout(); + $this->_helper->viewRenderer->setNoRender(true); + $request = $this->getRequest(); + $id = $request->getParam('id'); + if (!empty($id)){ + $commandesM = new Application_Model_Commandes(); + $data = array( + 'nbLigneT' => 0, + 'error' => '', + 'dateStart' => '0000-00-00 00:00:00', + 'fichierOut' => '', + ); + $commandesM->update($data, "id=$id"); + } + } + + } \ No newline at end of file diff --git a/application/views/scripts/index/index.phtml b/application/views/scripts/index/index.phtml index 192eefe8..3196d72c 100644 --- a/application/views/scripts/index/index.phtml +++ b/application/views/scripts/index/index.phtml @@ -42,7 +42,14 @@ fileEnCours)) {?> - + + + + + + + +fileEnCours as $file) {?> @@ -51,6 +58,8 @@ + +
FichierDateLignes traitésLignes total
FichierDate AjoutLignes TraitésLignes TotalMessage d'erreurAction
dateAdded?> nbLigneT?> nbLigne?>error?>Remise à zéro et redémarrage