Added base page layout
parent
014adeed65
commit
90201e85cd
@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Informatica Eindproject D4p
|
||||||
|
* 6in3, Stedelijk Gymnasium Nijmegen
|
||||||
|
* Docent: Hans de Wolf
|
||||||
|
*
|
||||||
|
* ==================
|
||||||
|
*
|
||||||
|
* Daniel Boutros,
|
||||||
|
* Christiaan Goossens,
|
||||||
|
* Jelmer Hinssen
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Inforbank\Application\Helper;
|
||||||
|
|
||||||
|
use Inforbank\Application;
|
||||||
|
|
||||||
|
class Klant
|
||||||
|
{
|
||||||
|
public function getCurrentUser()
|
||||||
|
{
|
||||||
|
$container = Application::getContainer();
|
||||||
|
$user = $container->auth->getUserID();
|
||||||
|
|
||||||
|
$db = $container->db;
|
||||||
|
|
||||||
|
$klant = $db->klanten->where('id', $user)[$user];
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'voornaam' => $klant['voornaam'],
|
||||||
|
'tussenvoegsel' => $klant['tussenvoegsel'],
|
||||||
|
'achternaam' => $klant['achternaam'],
|
||||||
|
'bedrijfsnaam' => $klant['bedrijfsnaam'],
|
||||||
|
'straat' => $klant['straat'],
|
||||||
|
'huisnummer' => $klant['huisnummer'],
|
||||||
|
'postcode' => $klant['postcode'],
|
||||||
|
'woonplaats' => $klant['woonplaats']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,8 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<title>Inforbank</title>
|
||||||
|
<link rel="stylesheet" href="assets/css/main.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
@ -1,11 +1,9 @@
|
|||||||
<!DOCTYPE html>
|
<?php include '__header.phtml'; ?>
|
||||||
<html>
|
|
||||||
<head>
|
<p>Welkom klant <?= $_SESSION['userid'] ?></p>
|
||||||
<meta charset="utf-8"/>
|
<a href="/logout">Uitloggen</a>
|
||||||
<title>Inforbank</title>
|
<br/>
|
||||||
</head>
|
<pre><?php echo json_encode($klant); ?></pre>
|
||||||
<body>
|
<pre><?php echo json_encode($rekeningen); ?></pre>
|
||||||
<p>Welkom klant <?= $_SESSION['userid'] ?></p>
|
|
||||||
<a href="/logout">Uitloggen</a>
|
<?php include '__footer.phtml'; ?>
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
Reference in New Issue