<?php
$sql = "SELECT * FROM " . PREFIX . "_Artikel WHERE ID =\"" . $_POST['ID'] . "\";";
$result = $db->query($sql);
$nt = $result->fetch_assoc();

while (strlen($nt['ID']) < $_SESSION['Firma']['Stellen'])
{
	$nt['ID'] = "0" . $nt['ID'];
}

if ("2" == $_SESSION['Firma']['Art_Liste'])
{
	$Feld1 = "<ol>\n";
}
elseif ("1" == $_SESSION['Firma']['Art_Liste'])
{
	$Feld1 = "<ul>\n";
}
else
{
	$Feld1 = "";
}

if ("0" != $_SESSION['Firma']['Art_Liste'])
{
	$Einzeln = explode("\n", $nt['Feld1']);
	foreach ($Einzeln AS $Text)
	{
		$Feld1 .= "<li>" . $Text . "</li>\n";
	}
}
else
{
	$Feld1 = $nt['Text'];
}

if ("2" == $_SESSION['Firma']['Art_Liste'])
{
	$Feld1 .= "</ol>\n";
}
elseif ("1" == $_SESSION['Firma']['Art_Liste'])
{
	$Feld1 .= "</ul>\n";
}


echo "<fieldset>\n";
echo "	<legend>Artikel-Nr: <i>" . $nt['ID'] . "</i></legend>\n";
echo "	<label>Bezeichnung</label>\n";
echo "	<label>" . $nt['Bezeichnung'] . "</label>\n";
echo "	<br />&nbsp;<br />\n";
echo "	<label>" . $_SESSION['Firma']['Feld1_Name'] . "</label>\n";
echo "	<span style=\"float: left; width: 75%;\">" . $Feld1 . "</span>\n";
echo "	<br style=\"clear: both;\" />&nbsp;<br />\n";
echo "	<label>" . $_SESSION['Firma']['Feld2_Name'] . "</label>\n";
echo "	<label>" . $nt['Feld2'] . "</label>\n";
echo "	<br />&nbsp;<br />\n";
echo "	<label>" . $_SESSION['Firma']['Feld3_Name'] . "</label>\n";
echo "	<label>" . $nt['Feld3'] . "</label>\n";
echo "	<br />&nbsp;<br />\n";
echo "	<label>" . $_SESSION['Firma']['Feld4_Name'] . "</label>\n";
echo "	<label>" . $nt['Feld4'] . "</label>\n";
echo "	<br />&nbsp;<br />\n";
echo "	<label>" . $_SESSION['Firma']['Feld5_Name'] . "</label>\n";
echo "	<label>" . $nt['Feld5'] . "</label>\n";
echo "	<br />&nbsp;<br />\n";
echo "	<label>Preis</label>\n";
echo "	<label>" . $nt['Preis'] . " €</label>\n";
echo "</fieldset>\n";