$tpl_edit->set('modlist', $modlist); $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 { $anAlias = new Alias(); $anAlias->setLabel(label_parse($_POST["label"], true)); $anAlias->parseHouseUnitCodes($_POST["code"]); $anAlias->setModuleType($_POST["module"]); $anAlias->setModuleOptions($_POST["moduleopts"]); $anAlias->getAliasMap()->setType($_POST["type"]); $anAlias->getAliasMap()->setAliasLabel(label_parse($_POST["label"], true)); if (strlen(trim($_POST["newloc"])) > 0) { $anAlias->getAliasMap()->setFloorPlanLabel(label_parse($_POST["newloc"], true)); } else { $anAlias->getAliasMap()->setFloorPlanLabel(label_parse($_POST["loc"], true)); } $anAlias->getAliasMap()->setHiddenFromHome("visible"); $anAlias->getAliasMap()->setGroup($_POST["group"]); $anAlias->getAliasMap()->setAccessLevel(intval($_POST["secaccesslevel"])); $anAlias->getAliasMap()->rebuildElementLine(); $anAlias->rebuildElementLine(); $heyuconf->addElement($anAlias); $mustSave = true; } break;