Skip to content
Snippets Groups Projects
Commit a06ecc3e authored by clement's avatar clement
Browse files

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

parents 24fed3ed fa762cb4
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,13 @@
class Client extends Personne
{
public $_specialFields = array(
"num_tel" => array(
"t" => "PhoneField",
"label" => "Numero de telephone",
));
protected $num_tel;
public function num_tel()
......@@ -13,4 +20,5 @@ class Client extends Personne
{
$this->num_tel = $num_tel;
}
}
\ No newline at end of file
......@@ -22,7 +22,18 @@ class PhoneField extends Field
$this->value = $_POST[$this->name];
return true;
}
}
return false;
}
public function show() {
$num = $this->value;
$html = "";
$html .= substr($num, 0, 2);
for($i = 1; $i < 5; $i++) {
$html .= ".";
$html .= substr($num, 2*$i, 2);
}
return $html;
}
}
......@@ -11,8 +11,8 @@
</thead>
<tbody>
<tr>
<td>Nombre moyen d'animal par client : </td>
<td><?php $tmp = $stats->nbAnimalMoyClient(); echo $tmp["value"]; ?></td>
<td>l2</td>
</tr>
</tbody>
</table>
......
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