diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8b35bcf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+config/config.php
diff --git a/.htaccess b/.htaccess
index 97c3259..afeb18f 100644
--- a/.htaccess
+++ b/.htaccess
@@ -2,7 +2,7 @@
#Rewrite Engine anschalten
RewriteEngine on
- #normale Seiten ohne Unterverzeichnis (Liste, Rezeptliste)
+ #normale Seiten ohne Unterverzeichnis (Liste, Rezeptliste, neues Rezept)
RewriteRule ^([a-zA-Z0-9-]+)$ ?site=$1
#Error Seite
@@ -11,6 +11,9 @@
#Rezept Seite
RewriteRule ^recipe/([0-9]+)$ ?site=recipe&number=$1
+ #Rezepteditieren
+ RewriteRule ^edit-recipe/([0-9]+)$ ?site=edit-recipe&number=$1
+
#Loginseite
RewriteRule ^login/url=(.+)$ ?site=login&refurl=$1 [L]
diff --git a/README.md b/README.md
index 292d0f4..bd52972 100644
--- a/README.md
+++ b/README.md
@@ -1,24 +1,40 @@
-# Voraussetzungen
-## Apache Module:
+# Requirements
+
+## Apache Modules:
* mod-rewrite
+
## Packages
* php7
* php7-mysql
-# Beispiel Apache Config
+# Sample Apache Config
```apache
- ServerAdmin webmaster@localhost
+ ServerAdmin webmaster@localhost
+ ServerName shopping.example.com
- DocumentRoot /var/www/html/shopping-list
-
- AllowOverride All
-
+ DocumentRoot /var/www/html/shopping-list
+
- ErrorLog ${APACHE_LOG_DIR}/error.log
- CustomLog ${APACHE_LOG_DIR}/access.log combined
+ AllowOverride All
+
+
+ ErrorLog ${APACHE_LOG_DIR}/error.log
+ CustomLog ${APACHE_LOG_DIR}/access.log combined
```
-# Installation
-Um die Installation zu starten folgende Seite aufrufen:
-[HOSTNAME]/install/install.php
+
+# Installation Instructions
+
+* create a new mysql-database. Please use `utf8_general_ci` as your collation.
+* create a new mysql-user that can edit the database.
+
+* Download the latest release. You can download it [here (tar.gz)](https://gitlab.com/bluekay/shopping-list/-/archive/master/shopping-list-master.tar.gz) or [here (zip)](https://gitlab.com/bluekay/shopping-list/-/archive/master/shopping-list-master.zip)
+* unpack the archive and copy its content to `/var/www/html/shopping-list`
+* grant your web server permission to write the config-file
+```bash
+chown www-data:www-data /var/www/html/shopping-list/config/config.php
+```
+* visit the address of your web browser, you will be redirected to the installation page
+* insert your database information and create your login user
+* thats it, you are good to go. You may login now!
diff --git a/cont/recipe.php b/cont/recipe.php
index cacb39b..a635035 100644
--- a/cont/recipe.php
+++ b/cont/recipe.php
@@ -1,12 +1,14 @@
+
getRecipe($_GET["number"]);
$recipe = $book->sites[0];
- echo "
$recipe->Name
";
+ echo "
$recipe->Name
";
echo "
Zutaten
";
echo "";
echo "
";
@@ -17,9 +19,10 @@
}
echo "
";
echo "
Zubereitung
";
- foreach(explode("\r\n", $recipe->Beschreibung) as $paragraph){
- echo "