forked from curio-lesmateriaal/storingapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 03ed148
Showing
19 changed files
with
914 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Include your project-specific ignores in this file | ||
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files | ||
# Useful .gitignore templates: https://github.com/github/gitignore | ||
|
||
backend/config.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# StoringApp | ||
|
||
### Database | ||
In de map `doc` vind je het bestand `storingapp.sql`, deze kun je importeren in phpMyAdmin om de structuur van de database weg te zetten. | ||
|
||
### Config | ||
Kopieer voor je begint het bestand `backend/config.example.php` en hernoem de kopie naar `config.php`. De echte config staat in je .gitignore, zodat je databasewachtwoord nooit online komt te staan. | ||
|
||
![DeveloperLand](img/logo-big-fill-only.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
//IEDER VOOR ZICH: | ||
|
||
#### TODO | ||
//Hernoem dit bestand naar 'config.php' en vul jouw eigen database-gegevens in. | ||
//Deze config wordt hierna _niet_ meegestuurd naar je groepsgenoten. Zo kan iedereen zijn eigen wachtwoord, etc. invullen. | ||
|
||
$dbHost = 'localhost'; | ||
$dbName = 'storingapp'; | ||
$dbUser = 'root'; | ||
$dbPass = ''; | ||
|
||
//De url waarop jouw project staat. Géén slash aan het einde. | ||
$base_url = 'http://localhost/storingapp'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
//Haal de configuratie op | ||
require_once 'config.php'; | ||
|
||
//Met behulp van PDO zetten we de connectie op, waarna we met setAttribute de manier van errormeldingen weergeven bepalen. | ||
$conn = new PDO("mysql:host=$dbHost;dbname=$dbName", $dbUser, $dbPass); | ||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
//Variabelen vullen | ||
$attractie = $_POST['attractie']; | ||
$capaciteit = $_POST['capaciteit']; | ||
$melder = $_POST['melder']; | ||
|
||
echo $attractie . " / " . $capaciteit . " / " . $melder; | ||
|
||
//1. Verbinding | ||
require_once 'conn.php'; | ||
|
||
//2. Query | ||
|
||
//3. Prepare | ||
|
||
//4. Execute |
Oops, something went wrong.