1
0
Fork 0

Eerste commit

Hopelijk is dit wat je wilde, Christiaan.
merge-requests/2/head
Daniel Boutros 7 years ago
parent 3d1e47bdf5
commit 222effbfd8

@ -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();
});
}
}