1
0

Eerste commit

Hopelijk is dit wat je wilde, Christiaan.
This commit is contained in:
Daniel Boutros 2017-03-25 15:55:12 +01:00
parent 3d1e47bdf5
commit 222effbfd8

View File

@ -0,0 +1,46 @@
<?php
/**
* Informatica Eindproject D4p
* 6in3, Stedelijk Gymnasium Nijmegen
* Docent: Hans de Wolf
*
* ==================
*
* Daniel Boutros,
* Christiaan Goossens,
* Jelmer Hinssen
*/
namespace Inforbank\Application;
use \Slim\App;
class Daniel
{
public function __construct(App $app)
{
$app->get('/Daniel', function ($request, $response, $args) {
// Render index view
return $this->renderer->render($response, 'Daniel.phtml', $args);
});
$app->post('/Daniel', function ($request, $response, $args) {
// Render index view
$post = $request->getParsedBody();
try {
$resp = $this->auth->login($post['rekeningnr'], $post['pascode']);
if ($resp) {
echo "HIER EEN REDIRECT GRAAG";
} else {
echo "ERR PASS!";
}
} catch (\Exception $e) {
echo "ERR REK!";
}
die();
});
}
}