Beispiel #1
0
     $tpl_edit->set('lang', $lang);
     $tpl_edit->set('theScene', $settings[$_GET['line']]);
     $tpl_edit->set('floorplan', $floorPlan);
     $tpl_edit->set('selectedgroup', $groups->getAGroup($settings[$_GET['line']]->getAliasMap()->getGroup()));
     $tpl_edit->set('groups', $groupings);
     $tpl_edit->set('config', $config);
     $tpl_body->set('form', $tpl_edit);
     break;
 case "add":
     if (preg_match($chars, $_POST["label"])) {
         gen_error(null, $lang['error_special_chars']);
     } else {
         $aScene = new Scene();
         $aScene->setLabel(label_parse($_POST["label"], true));
         $aScene->setCommands($_POST["commands"]);
         $aScene->getAliasMap()->setType($lang["scene"]);
         $aScene->getAliasMap()->setAliasLabel(label_parse($_POST["label"], true));
         if (strlen(trim($_POST["newloc"])) > 0) {
             $aScene->getAliasMap()->setFloorPlanLabel(label_parse($_POST["newloc"], true));
         } else {
             $aScene->getAliasMap()->setFloorPlanLabel(label_parse($_POST["loc"], true));
         }
         $aScene->getAliasMap()->setHiddenFromHome("visible");
         $aScene->getAliasMap()->setGroup($_POST["group"]);
         $aScene->getAliasMap()->setAccessLevel(intval($_POST["secaccesslevel"]));
         $aScene->getAliasMap()->rebuildElementLine();
         $aScene->rebuildElementLine();
         $heyuconf->addElement($aScene);
         $mustSave = true;
     }
     break;