From c2115730c38021044baced07b9e7ca2f6c76b3a1 Mon Sep 17 00:00:00 2001 From: Fabio Lovato Date: Tue, 20 Feb 2018 14:50:09 +0100 Subject: [PATCH] Aggiunto "Nessuna zona" come filtro di default --- modules/dashboard/edit.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/dashboard/edit.php b/modules/dashboard/edit.php index a499cd391..ee01917a6 100644 --- a/modules/dashboard/edit.php +++ b/modules/dashboard/edit.php @@ -37,6 +37,9 @@ if (!isset($_SESSION['dashboard']['idzone'])) { $rs = $dbo->fetchArray('SELECT id, descrizione FROM an_zone'); $_SESSION['dashboard']['idzone'] = ["'-1'"]; + + //"Nessuna zona" di default + $_SESSION['dashboard']['idzone'][] = "'0'"; for ($i = 0; $i < count($rs); ++$i) { $_SESSION['dashboard']['idzone'][] = "'".$rs[$i]['id']."'"; @@ -238,7 +241,7 @@ $checks = ''; $count = 0; $total = 0; -$rs = $dbo->fetchArray('SELECT id, descrizione FROM an_zone ORDER BY descrizione ASC'); +$rs = $dbo->fetchArray('(SELECT \'0\' AS id, \'Nessuna zona\' AS descrizione) UNION (SELECT id, descrizione FROM an_zone) ORDER BY descrizione ASC'); $total = count($rs); for ($i = 0; $i < count($rs); ++$i) {