Merge branch 'master' of gitlab.com:crapaud-fou/portail

This commit is contained in:
Mickael 2019-09-16 19:43:10 +02:00
commit 3a424a0077
3 changed files with 8 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

@ -16,10 +16,11 @@ $db->set_charset("utf8");
function getlist($query) {
global $db;
$result = $db->query($query);
$back = array();
while ($row = $result->fetch_row()) {
$back[$row[0]] = $row[1];
if ($result = $db->query($query)) {
while ($row = $result->fetch_row()) {
$back[$row[0]] = $row[1];
}
}
return $back;
}
@ -35,8 +36,10 @@ $data = array(
'passe' => array()
);
$avenir = "select itemId, value from tiki_tracker_item_fields where fieldId=1 and value > unix_timestamp(now()) order by value asc limit 5";
$passe = "select itemId, value from tiki_tracker_item_fields where fieldId=1 and value < unix_timestamp(now()) order by value desc limit 5";
$avenir = "select itemId, value from tiki_tracker_item_fields where fieldId=1 and datediff(date(from_unixtime(
value)), date(now())) >= -1 order by value asc limit 5";
$passe = "select itemId, value from tiki_tracker_item_fields where fieldId=1 and datediff(date(from_unixtime(
value)), date(now())) < -1 order by value desc limit 5";
function getevents($list) {
global $fields;