Skip to content
Snippets Groups Projects
Commit c0b0c641 authored by goujonpa's avatar goujonpa
Browse files

Merge branch 'master' of gitlab.utc.fr:nf17-camp-p14/clivi

parents bd898af2 03e42b89
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
*/ */
// Implemented actions // Implemented actions
$actions = array("listeFacture", "addFacture", "editFacture", "detailFacture"); $actions = array("listeFacture", "addFacture", "detailFacture");
// Check action is correct // Check action is correct
if(!in_array($action, $actions)) { if(!in_array($action, $actions)) {
...@@ -21,17 +21,11 @@ switch($action) { ...@@ -21,17 +21,11 @@ switch($action) {
$formConf = $facture->getForm(); $formConf = $facture->getForm();
include 'view/form.php'; include 'view/form.php';
break; break;
case "editFacture":
$facture = new Facture();
$facture->select($_GET['id']);
$formConf = $facture->getForm();
include 'view/form.php';
break;
case "detailFacture": case "detailFacture":
$facture = new Facture(); $facture = new Facture();
$facture->select($_GET['id']); $facture->select($_GET['id']);
$formConf = $facture->getForm(); $formConf = $facture->getForm();
include 'view/detail.php'; include 'view/formDetail.php';
break; break;
default: default:
include 'view/404.php'; include 'view/404.php';
......
<!-- Begin page content -->
<div class="container">
<div class="page-header">
<h1><?php echo $formConf->getTitle(); ?></h1>
</div>
<table class="table">
<thead>
<?php foreach($list->getLabels() as $field): ?>
<th><?php echo $field->label; ?></th>
<?php endforeach; ?>
<th></th>
</thead>
<tbody>
<?php foreach($list->getLines() as $line): ?>
<tr>
<?php foreach($line->getFields() as $field): ?>
<td><?php echo $field->show(); ?></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php echo $formConf->getAlerts(); ?>
<form role="form" method="post">
<input type="hidden" name="submitForm" value="1">
<?php foreach($formConf->getFields() as $field): ?>
<?php echo $field->html($formConf); ?>
<?php endforeach; ?>
<button type="submit" class="btn btn-default"><?php echo $formConf->getSubmitText(); ?></button>
</form>
</div>
\ No newline at end of file
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>Nombre moyen d'animal par client : </td>
<td><?php $tmp = $stats->nbAnimalMoyClient(); echo $tmp["value"]; ?></td> <td><?php $tmp = $stats->nbAnimalMoyClient(); echo $tmp["value"]; ?></td>
<td>l2</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment