<div style="margin:10px">
						*Administrators and editors automatically inherit protected species viewing rights
					</div>
				</fieldset>
				<?php 
    }
    ?>
			<fieldset style="margin:15px;padding:15px;">
				<legend><b>Add a User</b></legend>
				<form name="addrights" action="collpermissions.php" method="post" onsubmit="return verifyAddRights(this)">
					<div>
						<select name="uid">
							<option value="">Select User</option>
							<option value="">-----------------------------------</option>
							<?php 
    $userArr = $permManager->getUsers();
    foreach ($userArr as $uid => $uName) {
        echo '<option value="' . $uid . '">' . $uName . '</option>';
    }
    ?>
						</select> 
					</div>
					<div style="margin:5px 0px 5px 0px;">
					<?php 
    if ($isGenObs) {
        ?>
						<input name="righttype" type="hidden" value="editor" />
						<?php 
    } else {
        ?>
						<input name="righttype" type="radio" value="admin" /> Administrator <br/> 
示例#2
0
										</div>
										<?php 
                }
            }
        }
        ?>
							<input type="hidden" name="userid" value="<?php 
        echo $userId;
        ?>
" />
						</fieldset>
					</form>
				</fieldset>
				<?php 
    } else {
        $users = $userManager->getUsers($searchTerm);
        echo "<h1>Users</h1>";
        foreach ($users as $id => $name) {
            echo "<div><a href='usermanagement.php?userid={$id}'>{$name}</a></div>";
        }
    }
} else {
    echo "<h3>You must login and have administrator permissions to manage users</h3>";
}
?>
	</div>
	<?php 
include $serverRoot . '/footer.php';
?>