\n";
}
function getGroupDropDown($iGroupID) {
global $default;
if (Permission::userIsSystemAdministrator()) {
$oPatternListBox = & new PatternListBox("$default->owl_groups_table", "name", "id", "fGroupID");
} else {
$oPatternListBox = & new PatternListBox("$default->owl_groups_table", "name", "id", "fGroupID", "GUL.unit_id=" . User::getUnitID($_SESSION["userID"]));
$oPatternListBox->setFromClause("INNER JOIN $default->owl_groups_units_table AS GUL ON ST.id = GUL.group_id");
}
$oPatternListBox->setEmptyErrorMessage("There are no groups");
$oPatternListBox->setIncludeDefaultValue(false);
if (isset($iGroupID)) {
$oPatternListBox->setSelectedValue($iGroupID);
}
return $oPatternListBox->render();
}
function getRoleDropDown($iRoleID) {
global $default;
$oPatternListBox = & new PatternListBox("$default->owl_roles_table", "name", "id", "fRoleID");
$oPatternListBox->setEmptyErrorMessage("There are no roles");
$oPatternListBox->setIncludeDefaultValue(false);
if (isset($iRoleID)) {
$oPatternListBox->setSelectedValue($iRoleID);
}
return $oPatternListBox->render();
}
?>