new cleanup and updates
[home-automation.git] / alert_status.php
index 0b3edee..38186b8 100644 (file)
@@ -1,11 +1,10 @@
 <? 
-
+include("config.php");
 include("includes.php");
 
-if (summon_status("russ")>=1) {
-  echo "<font color='red'><blink><strong>Russ- You're being summoned!</strong></blink></font><br>";
-}
-if (summon_status("beth")>=1) {
-  echo "<font color='red'><blink><strong>Beth- You're being summoned!</strong></blink></font><br>";
-}
+foreach ($summon as $person) {
+  if (summon_status($person) >= 1) {
+    echo "<font color='red'><blink><strong>$person- You're being summoned!</strong></blink></font><br>";
+  }
+} 
 ?>