|
@@ -1,10 +1,11 @@
|
1
|
1
|
<?php
|
2
|
2
|
|
3
|
|
-include_once(dirname(__DIR__)."../models/data.class.php");
|
|
3
|
+require_once(dirname(__DIR__)."/models/data.class.php");
|
4
|
4
|
|
5
|
5
|
function data()
|
6
|
6
|
{
|
7
|
7
|
set("title", "Titre");
|
|
8
|
+ set("data", Data::getAll());
|
8
|
9
|
|
9
|
10
|
return html("data.html.php", "layout.html.php");
|
10
|
11
|
}
|
|
@@ -12,8 +13,9 @@ function data()
|
12
|
13
|
function data_extract()
|
13
|
14
|
{
|
14
|
15
|
header("Content-Type: text/csv");
|
|
16
|
+ header("Content-Disposition: filename=\"data.csv\"");
|
15
|
17
|
|
16
|
|
- echo Data::extract();
|
|
18
|
+ return Data::extract();
|
17
|
19
|
}
|
18
|
20
|
|
19
|
21
|
function alter_data()
|