<?php
$sql = "SELECT ID, Name FROM " . PREFIX . "_Texte ORDER BY ID ASC;";
$result = $db->query($sql);
?>
<fieldset>
	<legend>Firmentexte</legend>
	<form action="index.php?<?php echo $_SERVER['QUERY_STRING']; ?>" method="post">
		<select name="ID">
			<?php
			while ($nt = $result->fetch_assoc())
			{
				if ($_SESSION['Firma']['KfZ'])
				{
					$nt['Name'] = str_replace("Leistungsverzeichnisse", "Kostenvoranschläge", $nt['Name']);
				}
				echo "			<option value=\"" . $nt['ID'] . "\">" . $nt['Name'] . "</option>\n";
			}
			?>
		</select>
		<br/>&nbsp;<br/>
		<input type="submit" name="formaction" value="edit" title="Firmentext bearbeiten" class="button_edit"/>
	</form>
</fieldset>
