Aggiunto "Nessuna zona" come filtro di default

This commit is contained in:
Fabio Lovato 2018-02-20 14:50:09 +01:00
parent 5d3b46b673
commit c2115730c3
1 changed files with 4 additions and 1 deletions

View File

@ -38,6 +38,9 @@ if (!isset($_SESSION['dashboard']['idzone'])) {
$_SESSION['dashboard']['idzone'] = ["'-1'"]; $_SESSION['dashboard']['idzone'] = ["'-1'"];
//"Nessuna zona" di default
$_SESSION['dashboard']['idzone'][] = "'0'";
for ($i = 0; $i < count($rs); ++$i) { for ($i = 0; $i < count($rs); ++$i) {
$_SESSION['dashboard']['idzone'][] = "'".$rs[$i]['id']."'"; $_SESSION['dashboard']['idzone'][] = "'".$rs[$i]['id']."'";
} }
@ -238,7 +241,7 @@ $checks = '';
$count = 0; $count = 0;
$total = 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); $total = count($rs);
for ($i = 0; $i < count($rs); ++$i) { for ($i = 0; $i < count($rs); ++$i) {