<?
require "../shop/config.php";
?>
<title>CMS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../style.css">
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center">
<!-- ImageReady Slices (cms.psd) -->
<table width="775" height="680" border="0" align="center" cellpadding="0" cellspacing="0" id="Tabelle_01">
<tr>
<td colspan="3">
<img src="../Bilder/cms_01.gif" width="775" height="102" alt=""></td>
</tr>
<tr>
<td colspan="3"><img src="../Bilder/cms_02.gif" width="775" height="58" alt=""></td>
</tr>
<tr>
<td>
<img src="../Bilder/cms_16.gif" width="250" height="21" alt=""></td>
<td rowspan="11">
<img src="../Bilder/cms_04.gif" width="14" height="200" alt=""></td>
<td width="511" height="218" rowspan="12" background="../bilder/banner.gif">
<div id="Layer1" style="top:182px; height:218px; width:511px; z-index:1; overflow: auto;">
<div align="right">
<p class="Stil2">
<? $datum = date("d. M. Y");
echo $datum; ?>
<br>
<? $uhrzeit = date("H:i:s");
echo $uhrzeit; ?>
<br>
</p>
</div>
</div> </td>
</tr>
<tr>
<td>
<a href="new.php"><img src="../Bilder/cms_06.gif" alt="" width="250" height="14" border="0"></a></td>
</tr>
<tr>
<td>
<a href="delete.php"><img src="../Bilder/cms_07.gif" alt="" width="250" height="12" border="0"></a></td>
</tr>
<tr>
<td><a href="edit.php"><img src="../Bilder/cms_08.gif" alt="" width="250" height="13" border="0"></a></td>
</tr>
<tr>
<td>
<a href="order.php"><img src="../Bilder/cms_09.gif" alt="" width="250" height="12" border="0"></a></td>
</tr>
<tr>
<td>
<a href="clients.php"><img src="../Bilder/cms_10.gif" alt="" width="250" height="12" border="0"></a></td>
</tr>
<tr>
<td>
<a href="backup.php"><img src="../Bilder/cms_11.gif" alt="" width="250" height="12" border="0"></a></td>
</tr>
<tr>
<td>
<a href="#"><img src="../Bilder/cms_12.gif" alt="" width="250" height="11" border="0"></a></td>
</tr>
<tr>
<td>
<a href="../stat/stat.php"><img src="../Bilder/cms_13.gif" alt="" width="250" height="14" border="0"></a></td>
</tr>
<tr>
<td>
<a href="../index.php"><img src="../Bilder/cms_14.gif" alt="" width="250" height="10" border="0"></a></td>
</tr>
<tr>
<td>
<img src="../Bilder/cms_15.gif" width="250" height="69" alt=""></td>
</tr>
<tr>
<td colspan="2">
<img src="../Bilder/cms_16-16.gif" width="264" height="18" alt=""></td>
</tr>
<tr>
<td height="302" colspan="3" background="../bilder/main.gif">
<div id="Layer1" style="top:182px; height:302px; width:760px; z-index:1; overflow: auto;">
<form enctype="multipart/form-data" name="Neuen Artikel hinzufügen" method="post" action="new.php?hinzufuegen">
<div align="left">
<table width="713" border="0" align="center">
<tr>
<td width="233" class="helpme"> </td>
<td width="100" class="Stil3"><div align="right">Bezeichnung:</div></td>
<td width="316"><input name="Bezeichnung" type="text" class="table" id="Bezeichnung" size="30" /></td>
</tr>
<tr>
<td> </td>
<td width="100" class="Stil3"><div align="right">Beschreibung:</div></td>
<td width="316"><textarea name="Beschreibung" cols="40" class="table" id="Beschreibung"></textarea></td>
</tr>
<tr>
<td> </td>
<td width="100" class="Stil3"><div align="right">Kategorie:</div></td>
<td width="316"><select name="Kategorie" select border="1px solid" size="0" class="table" id="Kategorie">
<option selected>bitte wählen</option>
<option>Achsen</option>
<option>Auspuffanlagen</option>
<option>Autowracks</option>
<option>Bremsen</option>
<option>Innenausstattung</option>
<option>Karosserieteile</option>
<option>Klima & Lüftung</option>
<option>Kühler</option>
<option>Lichter</option>
<option>Motoren & Getriebe</option>
<option>Räder</option>
<option>Sonstiges</option>
<option>Spiegel</option>
<option>Steuergeräte & Relaises</option>
<option>Verkleidungen</option>
</select></td>
</tr>
<tr>
<td> </td>
<td width="100" class="Stil3"><div align="right">Menge:</div></td>
<td width="316"><input name="Menge" type="text" class="table" id="Menge" size="10" />
<span class="Stil2">Stk.</span> </td>
</tr>
<tr>
<td> </td>
<td width="100" class="Stil3"><div align="right">Preis:</div></td>
<td width="316"><input name="Preis" type="text" class="table" id="Preis" size="10" />
<span class="Stil2"> exkl. MWSt. </span></td>
</tr>
<tr>
<td> </td>
<td width="100" class="Stil3"><div align="right">Bild:</div></td>
<td width="316"><input name="uploadedfile" type="file" class="table" id="uploadedfile" size="30" /></td>
</tr>
<tr>
<td> </td>
<td width="100" class="Stil3"> </td>
<td><label>
<input name="Submit" type="submit" class="table" value="Hinzufügen">
<input name="Reset" type="reset" class="table" value="Löschen">
</label></td>
</tr>
<tr>
<td> </td>
<td class="Stil3"> </td>
<td><span class="Stil2">
<?
if ($_REQUEST['Submit'])
{
if (empty($_REQUEST['Bezeichnung'])||empty($_REQUEST['Beschreibung'])||empty($_REQUEST['Kategorie'])||empty($_REQUEST['Menge'])||empty($_REQUEST['Preis'])||empty($_FILES['uploadedfile']['name']))
{
echo"Bitte füllen Sie alle Felder aus! Artikel wurde nicht hinzugefügt!";
}
else
{
$SQLString = mysql_query("INSERT INTO artikel
(Bezeichnung, Beschreibung, Kategorie, Menge, Preis, Bild)
VALUES
('".$_POST['Bezeichnung']."','".$_POST['Beschreibung']."','".$_POST['Kategorie']."',
'".$_POST['Menge']."','".$_POST['Preis']."','".$_FILES['uploadedfile']['name']."')");
echo"Artikel ".$_POST['Bezeichnung']." erfolgreich hinzugefügt!<br>";
$target_path = "../uploads/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "Bild ". basename( $_FILES['uploadedfile']['name']). " wurde erfolgreich hochgeladen!";
}
}
}
?>
</span></td>
</tr>
</table>
<p class="Stil2"> </p>
</form>
</div>
</tr>
</table>