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)) {?>
Fichier | Date | Lignes traités | Lignes total | ||
---|---|---|---|---|---|
Fichier | +Date Ajout | +Lignes Traités | +Lignes Total | +Message d'erreur | +Action | +=$file->dateAdded?> | =$file->nbLigneT?> | =$file->nbLigne?> | +=$file->error?> | +Remise à zéro et redémarrage |