AMPELSYSTEM: new GUI with Sancho; new logic

. new GUI with Sancho and collapsable panel
. new logic:
1. popup only for notifications that are:
----  mandatory
----  unconfirmed
----  not expired
----  not before vorlaufszeit
2. overall display for all notifications that are
---- not before vorlaufszeit
-> confirmed and/or expired notifications are displayed serperately and only readable
This commit is contained in:
cris-technikum
2018-02-28 10:47:45 +01:00
parent 6830e5f51d
commit ef331e1580
11 changed files with 497 additions and 221 deletions
+28
View File
@@ -1265,6 +1265,34 @@ if($result = $db->db_query("SELECT 1 FROM system.tbl_app WHERE app='bewerbung'")
}
}
// Remove NOT NULL constraint on vorlaufszeit on public.tbl_ampel
if($result = @$db->db_query("SELECT is_nullable FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'public' AND TABLE_NAME = 'tbl_ampel' AND COLUMN_NAME = 'vorlaufzeit' AND is_nullable = 'NO'"))
{
if($db->db_num_rows($result) > 0)
{
$qry = "ALTER TABLE public.tbl_ampel ALTER COLUMN vorlaufzeit DROP NOT NULL;";
if(!$db->db_query($qry))
echo '<strong>public.tbl_ampel '.$db->db_last_error().'</strong><br>';
else
echo '<br>Removed NOT NULL constraint on "vorlaufszeit" from public.tbl_ampel<br>';
}
}
// Remove NOT NULL constraint on verfallszeit on public.tbl_ampel
if($result = @$db->db_query("SELECT is_nullable FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'public' AND TABLE_NAME = 'tbl_ampel' AND COLUMN_NAME = 'verfallszeit' AND is_nullable = 'NO'"))
{
if($db->db_num_rows($result) > 0 )
{
$qry = "ALTER TABLE public.tbl_ampel ALTER COLUMN verfallszeit DROP NOT NULL;";
if(!$db->db_query($qry))
echo '<strong>public.tbl_ampel '.$db->db_last_error().'</strong><br>';
else
echo '<br>Removed NOT NULL constraint on "verfallszeit" from public.tbl_ampel<br>';
}
}
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';