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

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

parents 4d211d92 e3552767
No related branches found
No related tags found
No related merge requests found
......@@ -15,9 +15,14 @@ class DateField extends Field
{
if (isset($_POST[$this->name])) {
$this->value = $_POST[$this->name];
if($this->value == " ") {
$this->value = null;
}
} else {
$this->value = NULL;
$this->value = null;
}
print($this->name);
print($this->value);
return true;
}
......
......@@ -107,8 +107,9 @@ class Facture extends Objet
}
public function str() {
$animal = new Animal()
$fields = $animal->select($this->id)
return $fields["nom"]." ".$this->prix_total;
$animal = new Animal();
$animal->select($this->animal);
$tostr = $animal->str().' '.$this->prix_total;
return $tostr;
}
}
\ No newline at end of file
......@@ -6,9 +6,9 @@ class GenderField extends Field
// Todo, if isset($_POST[$this->name]) && !$this->validate() => Show a error msg explanation for this line.
$html = '<div class="form-group">
<label for="form'.$this->name.'">'.$this->label.'</label>
<select class="form-control" name="'.$this->name.'">';'
<option value="M" selected>Male</option>
<option value="F">Femelle</option>
<select class="form-control" name="'.$this->name.'">
<option value="M" '.($this->value == "M" ? "selected" : "").'>Male</option>
<option value="F" '.($this->value == "F" ? "selected" : "").'>Femelle</option>
</select>
</div>';
return $html;
......
......@@ -79,8 +79,9 @@ class Ordonnance extends Objet
}
public function str() {
$animal = new Animal()
$fields = $animal->select($this->id)
return $fields["nom"]." ".$this->date;
$animal = new Animal();
$animal->select($this->animal);
$tostr = $animal->str().' '.$this->date;
return $tostr;
}
}
\ No newline at end of file
......@@ -122,7 +122,7 @@
<table class="table">
<thead>
<th>Nom </th>
<th>Nombre d'individu </th>
<th>Nombre d'individus </th>
</thead>
<tbody>
<?php foreach ($stats->top10Espece() as $ligne): ?>
......@@ -140,7 +140,7 @@
<table class="table">
<thead>
<th>Nom </th>
<th>Nombre d'individu </th>
<th>Nombre d'individus </th>
</thead>
<tbody>
<?php foreach ($stats->top10Race() as $ligne): ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment