<?php
$adminpass = "";
$admin_email = "";
$versandkosten = "";
?><?
$time = date("H:i");
$date = date ("d. F Y");
$
ip = getenv("REMOTE_ADDR");
$action = $_GET['action'];
switch ($action)
{
case "loeschen":
$id = $_GET['id'];
$datei = fopen("d-vw.txt","r"); // File zum Schreiben öffnen
while (!feof($datei))
{
$zeilen[] = fgets($datei, 4096); // File zeilenweise in einen Array einlesen
}
$anzahl_array = count($zeilen);
if ($anzahl_array == "2")
{
$datei = fopen("d-vw.txt","w"); // File zum Schreiben öffnen
#$zeile .= $zeilen_array;
$zeile = "";
fputs($datei, $zeile);
fclose($datei);
}
else
{
for ($k=0;$k<$anzahl_array;$k++)
{
$zeilen_array = $zeilen[$k];
if ($zeilen_array != "")
{
list ($id_auslesen, $modell_auslesen, $baujahr_auslesen, $motorcode_auslesen, $hub_auslesen, $getriebe_auslesen, $preis_auslesen) = explode('|', $zeilen_array);
if ($id != $id_auslesen)
{
$zeilen_id = $k - 1;
$datei_zeile = $zeilen[$zeilen_id];
$datei = fopen("d-vw.txt","w"); // File zum Schreiben öffnen
$zeile .= $zeilen_array;
fputs($datei, $zeile);
fclose($datei);
}
}
}
}
?><meta http-equiv="Content-Language" content="de"><meta name="GENERATOR" content="Microsoft FrontPage 6.0"><meta name="ProgId" content="FrontPage.Editor.Document"><meta http-equiv="Content-Type" content="text/
html; charset=windows-1252"><title>ABE Bestellung Volkswagen</title><meta http-equiv="refresh" content="0;
url=abe-vw.php?admin=<?echo $admin?>&adminpass=<?echo $adminpass?>&adminbereich=<?echo $adminbereich?>"><?
break;
case "Einstellungen":
$adminpasswort = $_POST['adminpasswort'];
$adminemail = $_POST['adminemail'];
$versand_kosten = $_POST['versand_kosten'];
$WhichFile = "abe-vw.php";
$InhaltNEU['adminpass'] = $adminpasswort;
$InhaltNEU['admin_email'] = $adminemail;
$InhaltNEU['versandkosten'] = $versand_kosten;
@$fp = fopen($WhichFile,"r");
if (!$fp)
{
print "File $WhichFile doesn't exist
\n";
}
else
{
$fileok = "ok";
while (!feof($fp))
{
$backup[] = fgets($fp, 4096);
}
}
@fclose($fp);
if ($fileok == "ok")
{
$fp = fopen($WhichFile,"w");
for ($i=0;$i<sizeof($backup);$i++)
{
$zeile = $backup[$i];
reset($InhaltNEU);
while (list($feld, $inhalt) = each($InhaltNEU))
{
#if (strpos($zeile, $feld))
#if (strpos($zeile, '$'.$feld))
#if(preg_match("/^\$$feld = /",$zeile))
if(preg_match("'^.$feld'",$zeile))
{
$zeile = "\$"."$feld = \"$inhalt\";\n";
#print"Bingo [i]$backup[$i][/i] wurde gegen [i]$zeile[/i] geändert
";
}
}
fputs($fp, $zeile);
}
fclose($fp);
}
?><meta http-equiv="refresh" content="0;
url=abe-vw.php?admin=<?echo $admin?>&adminpass=<?echo $adminpass?>&adminbereich=<?echo $adminbereich?>"><?
break;
case "Artikel":
$modell_vw = $_POST['modell_vw'];
$baujahr = $_POST['baujahr'];
$motorcode = $_POST['motorcode'];
$hubraum_leistung = $_POST['hubraum_leistung'];
$getriebe = $_POST['getriebe'];
$preis = $_POST['preis'];
$datei = fopen("d-vw.txt","r"); // File zum Schreiben öffnen
while (!feof($datei))
{
$zeilen[] = fgets($datei, 4096); // File zeilenweise in einen Array einlesen
}
fclose($datei);
for ($m=0;$m<count($zeilen);$m++)
{
$zeile = $zeilen[$m];
if ($zeile != "")
{
$anzahl_zeile = $m;
}
}
$zeilen_ende = $zeilen[$anzahl_zeile];
list ($last_id_auslesen) = explode('|', $zeilen_ende);
$neue_id = $last_id_auslesen + 1;
$datei = fopen("d-vw.txt","a"); // File zum Schreiben öffnen
$zeile .= "$neue_id"."|".$modell_vw."|".$baujahr."|".$motorcode."|".$hubraum_leistung."|".$getriebe."|".$preis."\n";
fputs($datei, $zeile);
fclose($datei);
?><meta http-equiv="refresh" content="0;
url=abe-vw.php?admin=<?echo $admin?>&adminpass=<?echo $adminpass?>&adminbereich=<?echo $adminbereich?>"><?
break;
}
?><?
if ($adminbereich == "ja" AND $adminpass == $admin)
{ ?><p align="center"><font size="1" face="Times New Roman"><< </font>[
url="abe-vw.php"]<font size="1" face="Arial">AUSLOGGEN</font>[/
url]<font size="1" face="Times New Roman">
>></font></p>
<p align="center">-----<font face="Arial"> <font size="2">©</font><font size="1">
[
url="http://www.aicetrade.com"]2005 AICE SOFTWARE[/
url]</font> </font>
---------</p>
<p align="center">[b]<font face="Tahoma" size="2">EINSTELLUNGEN</font>[/b]</p>
<form method="POST" enctype="multipart/form-data" action="abe-vw.php?action=Einstellungen&adminbereich=<?echo $adminbereich?>&admin=<?echo $admin?>&adminpass=<?echo $adminpass?>">
<table border="0" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
<tr><td width="50%"><font face="Tahoma" size="2">Admin Passwort</font></td><td width="50%">
<input name="adminpasswort" value="<?echo $adminpass?>" size="118" style="font-size: 10px; font-family: Arial; float: left; border: 1px solid #808080"></td>
</tr><tr><td width="50%"><font face="Tahoma" size="2">Admin Email</font></td><td width="50%">
<input name="adminemail" value="<?echo $admin_email?>" size="118" style="font-size: 10px; font-family: Arial; float: left; border: 1px solid #808080"></td>
</tr><tr><td width="50%"><font face="Tahoma" size="2">Versandkosten in EURO [ Format 12.50 für 12 Euro 50 Cent ]</font></td><td width="50%">
<input name="versand_kosten" value="<?echo $versandkosten?>" size="13" style="font-size: 10px; font-family: Arial; float: left; border: 1px solid #808080"></td>
</tr><tr><td width="50%"></td><td width="50%"><input type="submit" value="Speichern" name="B1" style="color: #000080; font-size: 10px; font-family: Arial; font-weight: bold; float: right; border: 1px solid #808080; background-color: #F7F7F7"></td>
</tr></table></form><p align="center">---------------</p><p align="center">[b]<font size="2" face="Tahoma">PRODUKTVERWALTUNG</font>[/b]</p>
<div align="center"><center><form method="POST" enctype="multipart/form-data" action="abe-vw.php?action=Artikel&adminbereich=<?echo $adminbereich?>&admin=<?echo $admin?>&adminpass=<?echo $adminpass?>">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5">
<tr><td width="17%" align="left">[b]<font size="2" face="Tahoma">Modell Volkswagen</font>[/b]</td><td width="14%" align="left">[b]<font size="2" face="Tahoma">
Baujahr</font>[/b]</td><td width="15%" align="left">[b]<font size="2" face="Tahoma">Motorcode</font>[/b]</td><td width="16%" align="left">[b]<font size="2" face="Tahoma">
Hubr_Leist</font>[/b]</td><td width="15%" align="left">[b]<font size="2" face="Tahoma">Getriebe</font>[/b]</td><td width="14%" align="left">[b]<font size="2" face="Tahoma">
Preis</font>[/b]</td><td width="9%"></td></tr><tr><td width="17%" align="center"><p align="center"><input name="modell_vw" size="34" style="font-size: 10px; font-family: Arial; float: left; border: 1px solid #808080"></td><td width="14%" align="center">
<input name="baujahr" size="26" style="font-size: 10px; font-family: Arial; float: left; border: 1px solid #808080"></td><td width="15%" align="center"><input name="motorcode" size="27" style="font-size: 10px; font-family: Arial; float: left; border: 1px solid #808080"></td><td width="16%" align="center">
<input name="hubraum_leistung" size="27" style="font-size: 10px; font-family: Arial; float: left; border: 1px solid #808080"></td><td width="15%" align="center"><input name="getriebe" size="25" style="font-size: 10px; font-family: Arial; float: left; border: 1px solid #808080"></td><td width="14%" align="center">
<input name="preis" size="20" style="font-size: 10px; font-family: Arial; float: left; border: 1px solid #808080"><font size="2" face="Tahoma">EUR</font></td><td width="9%"><input type="submit" value="Speichern" name="B1" style="color: #000080; font-size: 10px; font-family: Arial; font-weight: bold; float: right; border: 1px solid #808080; background-color: #F7F7F7"></td>
</tr></table></form></center></div>
</p><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5">
<tr><td width="25%" align="left" bgcolor="#F7F7F7">[b]<font size="2" face="Tahoma">Modell Volkswagen</font>[/b]</td><td width="13%" align="left" bgcolor="#F7F7F7">[b]<font size="2" face="Tahoma">Baujahr</font>[/b]</td><td width="17%" align="left" bgcolor="#F7F7F7">[b]
<font size="2" face="Tahoma">Motorcode</font>[/b]</td><td width="14%" align="left" bgcolor="#F7F7F7">[b]<font size="2" face="Tahoma">Hubr_Leist</font>[/b]</td><td width="15%" align="left" bgcolor="#F7F7F7">[b]
<font size="2" face="Tahoma">Getriebe</font>[/b]</td><td width="7%" align="left" bgcolor="#F7F7F7">[b]<font size="2" face="Tahoma">Preis</font>[/b]</td><td width="9%" align="right" bgcolor="#F7F7F7">[b]<font size="2" face="Tahoma">LÖSCHEN</font>[/b]</td></tr><?
$datei = fopen("d-vw.txt","r");
while (!feof($datei))
{
$zeilen[] = fgets($datei, 4096);
}
$menge_zeilen = count($zeilen);
$menge = $menge_zeilen - 1;
for ($i=0; $i<$menge; $i++)
{
$zeile = $zeilen[$i];
list ($id_auslesen, $modell_auslesen, $baujahr_auslesen, $motorcode_auslesen, $hub_auslesen, $getriebe_auslesen, $preis_auslesen) = explode('|', $zeile);
?><tr><td width="25%" align="left" style="border-top: 1px dotted #808080"><font face="Tahoma" size="2"><?echo $modell_auslesen?></font></td>
<td width="13%" align="left" style="border-top: 1px dotted #808080"><font face="Tahoma" size="2"><?echo $baujahr_auslesen?></font></td>
<td width="17%" align="left" style="border-top: 1px dotted #808080"><font face="Tahoma" size="2"><?echo $motorcode_auslesen?></font></td>
<td width="14%" align="left" style="border-top: 1px dotted #808080"><font face="Tahoma" size="2"><?echo $hub_auslesen?></font></td><td width="15%" align="left" style="border-top: 1px dotted #808080">
<font face="Tahoma" size="2"><?echo $getriebe_auslesen?></font></td><td width="7%" align="left" style="border-top: 1px dotted #808080">
<font face="Tahoma" size="2"><?echo $preis_auslesen?></font></td><td width="9%" align="right" style="border-top: 1px dotted #808080">[b]
<font size="2" face="Tahoma">[
url="abe-vw.php?action=loeschen&id=<?echo $id_auslesen?>&adminbereich=<?echo $adminbereich?>&admin=<?echo $admin?>&adminpass=<?echo $adminpass?>"]LÖSCHEN[/
url]</font>[/b]</td></tr><?
}
fclose($datei);
?></table>
</p><
html><body><div align="center"><center><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr><td width="100%">[b]<font size="2" face="Tahoma">ABE's für Diesel OXI-Kat's mit EURO 2 [
url="http://www.abe-oxi-kat.de"]www.abe-oxi-kat.de[/
url]</font>[/b]<?
}
else { ?><
html><head><meta http-equiv="Content-Language" content="de"><meta http-equiv="Content-Type" content="text/
html; charset=windows-1252"><title>ABE Bestellung Volkswagen</title></head><body></body></
html>[b]<font size="2" face="Tahoma" color="#0000FF"> Tragen Sie hier Ihre Personaldaten für eine Bestellung ein :</font>[/b]</td></tr><tr><td width="100%"><div align="center"><center><form method="POST" enctype="multipart/form-data" action="abe-vw1.php"><input type="hidden" name="admin_email" value="<?echo $admin_email?>"><input type="hidden" name="versandkosten" value="<?echo $versandkosten?>"><table border="0" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
<tr><td width="49%" align="right"><font size="2" face="Tahoma">Vorname / Zuname </font></td><td width="50%"><input name="name" size="60" style="font-size: 10px; font-family: Arial; float: left; border: 1px solid #0000FF; "></td>
</tr><tr><td width="49%" align="right"><font size="2" face="Tahoma">Strasse / Hausnummer </font></td>
<td width="50%"><input name="strasse" size="60" style="font-size: 10px; font-family: Arial; float: left; border: 1px solid #0000FF; "></td>
</tr><tr><td width="49%" align="right"><font size="2" face="Tahoma">Plz / Stadt </font></td>
<td width="50%"><input name="stadt" size="60" style="font-size: 10px; font-family: Arial; float: left; border: 1px solid #0000FF; "></td>
</tr><tr><td width="49%" align="right"><font size="2" face="Tahoma">Ihre Email </font></td>
<td width="50%"><input name="email" size="60" style="font-size: 10px; font-family: Arial; float: left; border: 1px solid #0000FF; "></td>
</tr><tr><td width="49%" align="right"><font face="Tahoma" size="2">
IP / DATUM ZEIT</font></td><td width="50%">
<p align="left"><font size="2" face="Tahoma"><?echo $
ip?><?echo $date?><?echo $time?></font></td>
</tr></table></center></div></td></tr><tr><td width="100%"></td></tr><tr><td width="100%"><div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3">
<tr><td width="31%" align="left">[b]<font size="2" face="Tahoma"> Modell Volkswagen</font>[/b]</td><td width="10%" align="right">[b]<font size="2" face="Tahoma">Baujahr</font>[/b]</td>
<td width="17%" align="right">[b]<font size="2" face="Tahoma">Motorcode</font>[/b]</td><td width="15%" align="right">[b]
<font size="2" face="Tahoma">Hubr_Leist</font>[/b]</td><td width="11%" align="right">[b]<font size="2" face="Tahoma">Getriebe</font>[/b]</td>
<td width="8%" align="right">[b]<font size="2" face="Tahoma">Preis</font>[/b]</td><td width="8%"><p align="right">[b]<font size="2" face="Tahoma">BESTELLEN</font>[/b]</td></tr><?
$datei = fopen("d-vw.txt","r");
while (!feof($datei))
{
$zeilen[] = fgets($datei, 4096);
}
$menge_zeilen = count($zeilen);
$menge = $menge_zeilen - 1;
for ($i=0; $i<$menge; $i++)
{
$zeile = $zeilen[$i];
list ($id_auslesen, $modell_auslesen, $baujahr_auslesen, $motorcode_auslesen, $hub_auslesen, $getriebe_auslesen, $preis_auslesen) = explode('|', $zeile);
?><tr><td width="31%" style="border-top: 1px dotted #808080" align="left"><font size="2" face="Arial"><?echo $modell_auslesen?> </font></td><td width="10%" style="border-top: 1px dotted #808080" align="right"><font size="2" face="Arial"><?echo $baujahr_auslesen?></font></td>
<td width="17%" style="border-top: 1px dotted #808080" align="right"><font size="2" face="Arial"><?echo $motorcode_auslesen?></font></td><td width="15%" style="border-top: 1px dotted #808080" align="right"><font size="2" face="Arial"><?echo $hub_auslesen?></font></td>
<td width="11%" style="border-top: 1px dotted #808080" align="right"><font size="2" face="Arial"><?echo $getriebe_auslesen?></font></td><td width="8%" style="border-top: 1px dotted #808080" align="right"><font size="2" face="Arial"><?echo $preis_auslesen?></font></td><td width="8%" style="border-top: 1px dotted #808080"><p align="center">
<input type="checkbox" name="artikel_bestellen[]" value="<?echo $id_auslesen?>"></td></tr><?}?></table></center></div></td></tr></table></center></div><div align="center">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2"><tr><td width="100%" height="17" align="right" colspan="2"></td>
</tr><tr><td width="50%" height="41" align="right"><font size="2">Noch Fragen ?</font>
</p>
</td><td width="51%" height="41"><p align="left">
<textarea rows="3" name="hinweis" cols="120" style="font-size: 10px; font-family: Arial; border: 1px solid #0000FF; "></textarea><table border="0" width="100%" cellspacing="0" cellpadding="0" height="3" id="table2"><tr><td></td></tr></table><table border="0" width="100%" cellspacing="1" id="table1" height="3">
<tr><td width="100%"><p align="left"><font face="Tahoma" size="2">Sie akzeptieren die [
url="http://www.abe-oxi-kat.de/agb.htm"]AGB[/
url] ? </font>
<input type="checkbox" name="agb" value="ja" style="border:1px solid #0000FF; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px"></td>
</tr><tr><td></td></tr></table></td></tr><tr><td width="50%" height="18" align="right"><font face="Tahoma" size="2">Bestellung verbindlich absenden </font></td>
<td width="51%" height="18">
<input type="submit" value="<< Bestellung absenden >>" name="B1" style="color: #0000FF; font-weight: bold"></td></tr></table></div></form><p align="center"><font size="2">© 2005 </font>[
url="http://www.aicetrade.com"]<font size="2">AICE SOFTWARE</font>[/
url]</p></body></
html><?
}
?><?
ausgabe;
$ausgabeDerSeite = ob_get_contents();
ob_end_clean();
$ausgabe=str_replace("\"","\\\"",implode("",file("vorlage.html")));
eval("\$ausgabe=\"$ausgabe\";");
if ($gzip == 1)
{
$phpversion_array = phpversion();
$phpversion_nr = $phpversion_array[0].".".$phpversion_array[2].$phpversion_array[4];
if (extension_loaded("
zlib") && ($phpversion_nr >= 4.04)) {
ob_start("ob_gzhandler");
}
}
echo $ausgabe; ?>