Initiale Version

This commit is contained in:
Jan Unger
2016-08-16 21:20:53 +02:00
commit 88cf71d772
10930 changed files with 1708903 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
session_start();
if (!isset($_SESSION['warenkorb'])) {
$_SESSION['warenkorb'] = [];
}
function holeSortiment()
{
return [
1 => 'Moderne Webseiten entwickeln',
2 => 'PHP 7 und MySQL - Das umfassende Handbuch',
3 => 'Der große Fotokurs - Richtig fotografieren lernen'
];
}
function zaehleWarenkorb()
{
$ergebnis = 0;
foreach ($_SESSION['warenkorb'] as $artikelId => $anzahl) {
$ergebnis += $anzahl;
}
return $ergebnis;
}

View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Artikelliste</title>
</head>
<body>
<p>
Ihr Warenkorb ist leer.
- <a href="warenkorb.php">Warenkorb anzeigen</a>
</p>
<h1>Unser Angebot</h1>
<table>
<tr>
<td>Moderne Webseiten entwickeln</td>
<td><a href="index.php?hinzufuegen=1">In den Warenkorb</a></td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Warenkorb</title>
</head>
<body>
<h1>Ihr Warenkorb</h1>
<form action="warenkorb.php" method="post">
<table>
<tr>
<th>Bezeichnung</th>
<th>Anzahl</th>
</tr>
<tr>
<td>Moderne Webseiten entwickeln</td>
<td>
<input type="text"
name="artikel[1]"
value="1"/>
</td>
</tr>
</table>
<p>
<button type="submit" name="aktualisieren">Aktualisieren</button>
</p>
</form>
<p><a href="index.php">Zur Produktauswahl</a></p>
</body>
</html>