// Detailseite fuer www.modellbahn-spur-n.de
// by Christian Bauer
//
// Stand: 24.10.2004
// -----
// Titel: mgdetailprivat.php
// -----
// Zweck: Anzeige der Modelldetails mit Foto
// -----
// Beschreibung:
// ------------
// In der Datenbank, Tabelle modelle ist eine eindeutige id vorhanden. Dadurch wird das betreffende
// Modell eindeutig identifiziert.
//
// Benoetigte externe Dateien:
// --------------------------
// fleischmann/Images/$row1->dateiname (Foto des Modells)
//
// Uebernahme:
// ----------
//
// $_GET[id] wird uebergeben mit ?id=1234 o.ae.
//
// Uebergabe an mginfo.php:
// --------------------------
//
// $_GET[id]
//
require("./include/mgconnect.php");
$result1 = $connectionMYSQLI->query("select * from modelle,hersteller,bahnverw where modelle.id=$_GET[nr] and modelle.hersteller=hersteller.kuerzel and modelle.bahnverw=bahnverw.verwkuerzel") or die(mysql_error());
while ($row1 = $result1->fetch_object()) {
echo "
";
echo "Detailseite $row1->typ, Katalognummer $row1->katnr_vor $row1->katnr_haupt $row1->katnr_kk $row1->katnr_nach $row1->aufschrift";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo " | ";
echo "bildpfad/$row1->dateiname\" width=675 border=0> | ";
echo " | ";
echo "
";
echo "";
echo "
";
echo "";
echo "";
echo "";
echo " | ";
echo " | ";
echo " | ";
echo "
";
echo "";
echo " | ";
echo "
Hersteller: | ";
echo "
$row1->langtext | ";
echo "
";
echo "";
echo " | ";
echo " | ";
echo " | ";
echo "
";
echo "";
echo " | ";
echo "
Katalognummer: | ";
echo "
$row1->katnr_vor $row1->katnr_haupt $row1->katnr_kk $row1->katnr_nach | ";
echo "
";
echo "";
echo " | ";
echo "
Baureihe: | ";
echo "$row1->baureihe | ";
echo "
";
echo "";
echo " | ";
echo "
Betriebsnummer: | ";
echo "
$row1->betriebsnr | ";
echo "
";
echo "";
echo " | ";
echo "
Bahnverwaltung / Land: | ";
echo "
$row1->verwlangtext | ";
echo "
";
echo "";
echo " | ";
echo "
Epoche: | ";
echo "
$row1->epoche |
";
echo "";
echo " | ";
echo "
L�nge �ber Puffer: | ";
echo "
$row1->laenge | ";
echo "
";
echo "";
echo " | ";
echo "
Herstellungszeitraum: | ";
if ($row1->vonfarbe=='')
echo "
$row1->von - $row1->bis | ";
else
echo "
$row1->von - $row1->bis | ";
echo "
";
echo "";
echo " | ";
echo "
Modellbeschreibung: | ";
echo "
$row1->beschreibung | ";
echo "
";
echo "";
echo " | ";
echo "
Besonderheiten: | ";
if ($row1->besonderhfarbe=='')
echo "
$row1->besonderh | ";
else
echo "
$row1->besonderh | ";
echo "
";
echo "";
echo " | ";
echo "
Bemerkungen: | ";
if ($row1->bemerkungfarbe=='')
echo "
$row1->bemerkung | ";
else
echo "
$row1->bemerkung | ";
echo "
";
echo "";
echo " | ";
echo "
Bild: | ";
echo "
$row1->bildherkunft | ";
echo "
";
echo "";
echo " | ";
if ($row1->infonr=='' and $row1->kupplungnr=='' and $row1->pantonr=='' and $row1->raedernr=='')
echo " |
| ";
else
echo "
Zusatzinformation: |
id\">Infoseite | ";
echo "
";
// $neudatum=substr($row1->datum,6,2).".".substr($row1->datum,4,2).".".substr($row1->datum,0,4);
$neudatum=date("d.m.Y", strtotime($row1->datum));
echo "";
echo " | ";
echo " | ";
echo "Zuletzt ge�ndert am: $neudatum | ";
echo "
";
echo "";
echo "
";
echo "";
echo "";
echo "";
echo " | ";
echo "
Datum | ";
echo "
Art | ";
echo "
Anz | ";
echo "
E-Pr. | ";
echo "
G-Pr. | ";
echo "
| ";
echo "
Verk�ufer | ";
echo "
";
echo "";
echo " | ";
echo " | ";
echo " | ";
echo " | ";
echo " | ";
echo " | ";
echo " | ";
echo " | ";
echo "
";
$result2 = $connectionMYSQLI->query("select * from privat where privat.id=$_GET[nr]") or die(mysql_error());
while ($row2 = $result2->fetch_object()) {
echo "";
$element=explode('-', $row2->datum);
$datumneu="".$element[2].".".$element[1].".".$element[0]."";
$preiseurode = number_format($row2->stueckpreis, 2, ',', ' ');
$preisgesamt = $row2->menge * $row2->stueckpreis;
$preiseurodegesamt = number_format($preisgesamt, 2, ',', ' ');
echo " | ";
echo "
$datumneu | ";
echo "
$row2->typ | ";
echo "
$row2->menge | ";
echo "
$preiseurode | ";
echo "
$preiseurodegesamt | ";
echo " | ";
echo "
$row2->verkaeufer | ";
echo "
";
}
echo "";
echo " | ";
echo " | ";
echo " | ";
echo " | ";
echo " | ";
echo " | ";
echo " | ";
echo " | ";
echo "
";
echo "";
}
mysqli_free_result($result1);
?>