<?php
$sql = "SELECT ID, Vorname, Nachname FROM Admin WHERE Firma_ID = \"" . PREFIX . "\" ORDER BY Nachname ASC;";
$result = $db->query($sql);
?>
<fieldset>
	<legend>Benutzerdaten</legend>
	<form action="index.php?<?php echo $_SERVER['QUERY_STRING']; ?>" method="post">
		<select name="ID">
			<?php
			while ($nt = $result->fetch_assoc())
			{
				echo "			<option value=\"" . $nt['ID'] . "\"";
				if ($_SESSION['TID'] == $nt['ID'])
				{
					echo " selected=\"selected\"";
				}
				echo ">" . $nt['Nachname'] . ", " . $nt['Vorname'] . "</option>\n";
			}
			?>
		</select>
		<br/>&nbsp;<br/>
		<input type="submit" name="formaction" value="add" title="Benutzer anlegen" class="button_add"/>
		<input type="submit" name="formaction" value="edit" title="Benutzer bearbeiten" class="button_edit"/>
		<input type="submit" name="formaction" value="del" title="Benutzer löschen" class="button_del"/>
	</form>
</fieldset>
