<h1>Enrichissement</h1> <p> <a href="<?=$this->url(array('controller'=>'envoi', 'action'=>'fileform'))?>">Envoi d'un fichier CSV</a> </p> <p> <a href="<?=$this->url(array('controller'=>'profil', 'action'=>'index'))?>">Gestion des profils d'enrichissement</a> </p> <h2>En attente de profil</h2> <div> <?php if (count($this->fileAttenteProfil)) {?> <table> <thead> <tr><th>Fichier</th><th>Profil</th></tr> </thead> <tbody> <?php foreach($this->fileAttenteProfil as $file) {?> <tr><td><?=$file->fichier?></td> <td> <select name="profil"> <option value="" selected>-</option> <?php if (count($this->listProfil)>0) { ?> <?php foreach($this->listProfil as $profil) {?> <option value="<?=$profil->id?>"><?=$profil->reference?></option> <?php }?> <?php }?> </select> <a class="setprofil" href="<?=$this->url(array('controller'=>'profil', 'action'=>'set', 'idfile'=>$file->id))?>">Ok</a> </td> </tr> <?php }?> </tbody> </table> <?php } else {?> <p>Vide</p> <?php }?> </div> <h2>Enrichissements en cours</h2> <div> <?php if (count($this->fileEnCours)) {?> <table> <thead> <tr> <th>Fichier</th> <th>Ajout</th> <th>Départ</th> <th>Lignes Traités</th> <th>Lignes Total</th> <th>Message d'erreur</th> <th>Action</th> </tr> </thead> <tbody> <?php foreach($this->fileEnCours as $file) {?> <tr id="<?=$file->id?>" class="encours"> <td><?=$file->fichier?></td> <td><?=$file->dateAdded?></td> <td><?=$file->dateStart?></td> <td class="ligne"><?=$file->nbLigneT?></td> <td><?=$file->nbLigne?></td> <td><?=$file->error?></td> <td> <a class="restart" href="<?=$this->url(array('action'=>'restart', 'id'=>$file->id))?>">Remise à zéro et redémarrage</a> <?php if ( !empty($file->error) ) {?> | <a class="reprise" href="<?=$this->url(array('action'=>'reprise', 'id'=>$file->id))?>">Reprise manuelle sur erreur</a> <?php }?> </td> </tr> <?php }?> </tbody> </table> <?php } else {?> <p>Vide</p> <?php }?> </div> <h2>Enrichissements terminés</h2> <div> <form method="post" action="./"> <label>Client</label> <select name="idClient"> <option value="">-</option> <?php foreach ($this->clients as $client) {?> <?php $select = ''; if ( null!=$this->idClient && $client->id == $this->idClient) { $select = ' selected'; }?> <option value="<?=$client->id?>"<?=$select?>><?=$client->nom?></option> <?php }?> </select> <input type="submit" name="submit" value="Selection" /> </form> </div> <div> <?php if (count($this->fileFinish)) {?> <table> <thead> <tr><th>Fichier</th><th>Ajout</th><th>Départ</th><th>Fin</th><th>Lignes total</th><th>Fichier enrichi</th></tr> </thead> <tbody> <?php foreach($this->fileFinish as $file) {?> <tr> <td><?=$file->fichier?></td> <td><?=$file->dateAdded?></td> <td><?=$file->dateStart?></td> <td><?=$file->dateStop?></td> <td><?=$file->nbLigneT?></td> <td> <a href="<?=$this->url(array('controller'=>'index','action'=>'getfile', 'file'=>$file->fichierOut))?>"> <?=$file->fichierOut?></a> </td> </tr> <?php }?> </tbody> </table> <?php } else {?> <p>Vide</p> <?php }?> </div> </div>