Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # src/Application/Overboeking.php # src/Application/Transacties.php
This commit is contained in:
commit
6cd6cb29e2
117
assets/css/login.css
Normal file
117
assets/css/login.css
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
.appinfodiv{
|
||||||
|
background-color: #DDDDDD;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formdiv{
|
||||||
|
background-color: #AAAAAA;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@import url(http://fonts.googleapis.com/css?family=Roboto);
|
||||||
|
|
||||||
|
/****** LOGIN MODAL ******/
|
||||||
|
.loginmodal-container {
|
||||||
|
padding: 30px;
|
||||||
|
max-width: 350px;
|
||||||
|
width: 100% !important;
|
||||||
|
background-color: #F7F7F7;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-radius: 2px;
|
||||||
|
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
|
||||||
|
overflow: hidden;
|
||||||
|
font-family: roboto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loginmodal-container h1 {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.8em;
|
||||||
|
font-family: roboto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loginmodal-container input[type=submit] {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loginmodal-container input[type=text], input[type=password] {
|
||||||
|
height: 44px;
|
||||||
|
font-size: 16px;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
border-top: 1px solid #c0c0c0;
|
||||||
|
padding: 0 8px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loginmodal-container input[type=text]:hover, input[type=password]:hover {
|
||||||
|
border: 1px solid #b9b9b9;
|
||||||
|
border-top: 1px solid #a0a0a0;
|
||||||
|
-moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
|
||||||
|
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
|
||||||
|
box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.loginmodal {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: 'Arial', sans-serif;
|
||||||
|
font-weight: 700;
|
||||||
|
height: 36px;
|
||||||
|
padding: 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loginmodal-submit {
|
||||||
|
border: 0px;
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0 1px rgba(0,0,0,0.1);
|
||||||
|
background-color: #4d90fe;
|
||||||
|
padding: 17px 0px;
|
||||||
|
font-family: roboto;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loginmodal-submit:hover {
|
||||||
|
border: 0px;
|
||||||
|
text-shadow: 0 1px rgba(0,0,0,0.3);
|
||||||
|
background-color: #357ae8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loginmodal-container a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #666;
|
||||||
|
font-weight: 400;
|
||||||
|
text-align: center;
|
||||||
|
display: inline-block;
|
||||||
|
opacity: 0.6;
|
||||||
|
transition: opacity ease 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
body{
|
||||||
|
color: #ff6000;
|
||||||
|
}
|
||||||
|
|
||||||
|
html, body{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.full{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
@ -45,10 +45,22 @@ ul.nv {
|
|||||||
/** Index **/
|
/** Index **/
|
||||||
.clickable {
|
.clickable {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clickable:hover {
|
.clickable:hover {
|
||||||
background: #0094ff;
|
text-decoration: none;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clickable:hover > div {
|
||||||
|
background: #eaeaea;
|
||||||
|
}
|
||||||
|
|
||||||
|
.big {
|
||||||
|
font-size: 24px;
|
||||||
|
color: #0094ff;
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Footer **/
|
/** Footer **/
|
||||||
|
BIN
assets/logo.png
BIN
assets/logo.png
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.5 KiB |
@ -16,30 +16,41 @@ namespace Inforbank\Application;
|
|||||||
|
|
||||||
use \Slim\App;
|
use \Slim\App;
|
||||||
use Inforbank\Application\Helper\Redirect;
|
use Inforbank\Application\Helper\Redirect;
|
||||||
|
use Inforbank\Proxy;
|
||||||
|
|
||||||
class Login
|
class Login
|
||||||
{
|
{
|
||||||
public function __construct(App $app)
|
public function __construct(App $app)
|
||||||
{
|
{
|
||||||
$app->get('/login', function ($request, $response, $args) {
|
$app->get('/login', function ($request, $response, $args) {
|
||||||
|
$query = $request->getQueryParams();
|
||||||
|
$error = isset($query['error']);
|
||||||
|
|
||||||
// Render index view
|
// Render index view
|
||||||
return $this->renderer->render($response, 'login.phtml', $args);
|
return $this->renderer->render($response, 'login.phtml', array(
|
||||||
|
'base' => Proxy::$route->getBaseUrl() . "/",
|
||||||
|
'error' => $error
|
||||||
|
));
|
||||||
});
|
});
|
||||||
|
|
||||||
$app->post('/login', function ($request, $response, $args) {
|
$app->post('/login', function ($request, $response, $args) {
|
||||||
// Render index view
|
// Render index view
|
||||||
$post = $request->getParsedBody();
|
$post = $request->getParsedBody();
|
||||||
|
$query = $request->getQueryParams();
|
||||||
|
$redirect = $query['redirect'];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$resp = $this->auth->login($post['rekeningnr'], $post['pascode']);
|
$resp = $this->auth->login($post['rekeningnr'], $post['pascode']);
|
||||||
|
|
||||||
if ($resp) {
|
if ($resp && $redirect !== "") {
|
||||||
return Redirect::create($request, $response, '/');
|
return Redirect::create($request, $response, $redirect);
|
||||||
|
} elseif ($resp) {
|
||||||
|
return Redirect::create($request, $response, '/rekeningen');
|
||||||
} else {
|
} else {
|
||||||
return Redirect::create($request, $response, '/login?error');
|
return Redirect::create($request, $response, '/login?error&redirect='.$redirect);
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return Redirect::create($request, $response, '/login?error');
|
return Redirect::create($request, $response, '/login?error&redirect='.$redirect);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -47,8 +47,17 @@ class Overboeking
|
|||||||
Overboekingen::createOverboeking($ibanhelper->getIBAN($van), $naar, $bedrag, $omschrijving, "GT");
|
Overboekingen::createOverboeking($ibanhelper->getIBAN($van), $naar, $bedrag, $omschrijving, "GT");
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
return Redirect::create($request, $response, "/overboeking?$e");
|
return Redirect::create($request, $response, "/overboeking?$e");
|
||||||
//NL84 INFO 0023 4567 89
|
|
||||||
}
|
}
|
||||||
|
$db = Application::getContainer()->db;
|
||||||
|
$db->transacties->insert([
|
||||||
|
"van" => $vanRekening['nr'],
|
||||||
|
"naar" => $naarRekeningnr,
|
||||||
|
"bedrag" => $bedrag,
|
||||||
|
"type" => "bg" //bg staat voor internetbankieren
|
||||||
|
]);
|
||||||
|
|
||||||
|
//TODO update saldo
|
||||||
|
//TODO Checken of het saldo van de rekening onder de 20 euro komt, dan doe je een mededeling via de berichthelper.
|
||||||
return Redirect::create($request, $response, "/");
|
return Redirect::create($request, $response, "/");
|
||||||
})->add(new Middleware());
|
})->add(new Middleware());
|
||||||
}
|
}
|
||||||
|
@ -59,9 +59,9 @@ class Transacties {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $this->renderer->render($response, 'transacties.phtml', [
|
return $this->renderer->render($response, 'transacties.phtml', [
|
||||||
'header' => Header::getHeaderData(),
|
'header' => Header::getHeaderData(),
|
||||||
'rekening' => $rekening,
|
'rekening' => $rekening,
|
||||||
'transacties' => $returnArray
|
'transacties' => $returnArray
|
||||||
]);
|
]);
|
||||||
})->add(new Auth\Middleware());
|
})->add(new Auth\Middleware());
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,10 @@ session_start();
|
|||||||
// Get the Slim framework settings
|
// Get the Slim framework settings
|
||||||
$settings = require __DIR__ . '/settings.php';
|
$settings = require __DIR__ . '/settings.php';
|
||||||
|
|
||||||
|
// Set Locale
|
||||||
|
setlocale(LC_MONETARY, 'nl_NL.UTF-8');
|
||||||
|
date_default_timezone_set('Europe/Amsterdam');
|
||||||
|
|
||||||
// Create the Slim application object with the settings
|
// Create the Slim application object with the settings
|
||||||
/**
|
/**
|
||||||
* ==============
|
* ==============
|
||||||
|
@ -1,25 +1,19 @@
|
|||||||
<?php include '__header.phtml'; ?>
|
<?php include '__header.phtml'; ?>
|
||||||
|
|
||||||
<table class="table">
|
<h2 class="page-header">Mijn rekeningen<a class="btn btn-default pull-right" href="overboeking" role="button">Nieuwe overboeking</a></h2>
|
||||||
<tr>
|
|
||||||
<th>IBAN</th>
|
|
||||||
<th>Saldo</th>
|
|
||||||
<th>Rekeningtype</th>
|
|
||||||
<th>Rente</th>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
foreach ($rekeningen as $rekening) {
|
|
||||||
?>
|
|
||||||
<tr class="clickable" onclick="document.location.href = 'rekeningen/<?php echo $rekening['nr'] ?>'">
|
|
||||||
<td><?php echo $rekening['iban']; ?></td>
|
|
||||||
<td><?php echo "€" . $rekening['saldo']; ?></td>
|
|
||||||
<td><?php echo $rekening['naam']; ?></td>
|
|
||||||
<td><?php echo $rekening['rente']; ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
}
|
<?php
|
||||||
?>
|
foreach ($rekeningen as $rekening) {
|
||||||
</table>
|
?>
|
||||||
|
<a class="clickable" onclick="document.location.href = 'rekeningen/<?php echo $rekening['nr'] ?>'"><div class="panel panel-default">
|
||||||
|
<div class="panel-body">
|
||||||
|
<h4><?php echo $rekening['naam']; ?><span class="pull-right big"><?php echo money_format('%(#1n', $rekening['saldo']); ?></span></h4>
|
||||||
|
<p><?php echo $rekening['iban']; ?></p>
|
||||||
|
</div>
|
||||||
|
</div></a>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<?php include '__footer.phtml'; ?>
|
<?php include '__footer.phtml'; ?>
|
||||||
|
@ -2,73 +2,39 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<title>InforBank - Inloggen</title>
|
<title>Inforbank</title>
|
||||||
<link href='//fonts.googleapis.com/css?family=Lato:300' rel='stylesheet' type='text/css'>
|
<link rel="stylesheet" href="<?= $base ?>/assets/css/login.css">
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||||
<!--link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous" -->
|
<base href="<?= $base ?>">
|
||||||
</head>
|
</head>
|
||||||
<style>
|
<style>
|
||||||
.form-signin {
|
|
||||||
max-width: 330px;
|
|
||||||
padding: 15px;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary {
|
|
||||||
color: #ff6000;
|
|
||||||
background-color: #2e652c;
|
|
||||||
border-color: #2e6da4;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
.form-control{
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
body{
|
|
||||||
color: #ff6000;
|
|
||||||
}
|
|
||||||
html, body{
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.logo{
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.full{
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.formdiv{
|
|
||||||
background-color: #AAAAAA;
|
|
||||||
height: 100%;
|
|
||||||
padding: 10% 0 0 70px;
|
|
||||||
}
|
|
||||||
.appinfodiv{
|
|
||||||
background-color: #DDDDDD;
|
|
||||||
height: 100%;
|
|
||||||
padding: 10% 0 0 70px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
<body>
|
<body>
|
||||||
<div class="full">
|
<div class="full">
|
||||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 appinfodiv">
|
<div class="col-md-6 appinfodiv">
|
||||||
<img class="logo" alt="logo" src="assets/logo.png"/>
|
<div>
|
||||||
<h3>Welkom bij de InforBank</h1>
|
<img class="logo" alt="logo" src="assets/logo.png"/>
|
||||||
Bij InforBank krijg je zelfs 10% rente op betaalrekeningen.<br/><br/>
|
<h3>Welkom bij de InforBank</h1>
|
||||||
Je kunt bij InforBank ook online betalen.<br/><br/>
|
Bij InforBank krijg je zelfs 10% rente op betaalrekeningen.<br/><br/>
|
||||||
BIC: INFONL2N
|
Je kunt bij InforBank ook online betalen.<br/><br/>
|
||||||
|
BIC: INFONL2N
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 formdiv">
|
<div class="col-md-6 formdiv">
|
||||||
<form class="form-signin" method="post">
|
<div class="loginmodal-container">
|
||||||
<h2 class="form-signin-heading">Inloggen</h2>
|
<h1>Inloggen bij de Inforbank</h1><br>
|
||||||
<label for="inputUsername" class="sr-only">Rekeningnummer (alleen cijfers)</label>
|
<?php if ($error) {
|
||||||
<input type="text" id="inputUsername" name="rekeningnr" class="form-control" placeholder="012456789"/>
|
?>
|
||||||
|
<div class="alert alert-warning" role="alert">De ingevulde gegevens zijn incorrect. Probeer het opnieuw.</div><br/>
|
||||||
|
<?php
|
||||||
|
|
||||||
<label for="inputPassword" class="sr-only">Pascode</label>
|
} ?>
|
||||||
<input type="password" id="inputPassword" name="pascode" class="form-control" placeholder="0000"/>
|
<form method="post" action="">
|
||||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Inloggen</button>
|
<input type="text" name="rekeningnr" placeholder="Rekeningnummer (alleen cijfers)">
|
||||||
</form>
|
<input type="password" name="pascode" placeholder="Pascode">
|
||||||
</div>
|
<input type="submit" name="login" class="login loginmodal-submit" value="Login">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -3,43 +3,65 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!$rekening) {
|
if (!$rekening) {
|
||||||
?>
|
?>
|
||||||
Fout: niet jouw eigen rekening.
|
|
||||||
|
<div class="alert alert-danger" role="alert"><b>Fout!</b> Dit is niet een aan jouw account gekoppelde rekening.</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<a href="overboeking">Nieuwe overboeking</a><br/><br/>
|
|
||||||
Saldo: <?php echo $rekening['saldo']?><br/>
|
<h2 class="page-header">Transactieoverzicht<a class="btn btn-default pull-right" href="overboeking" role="button">Nieuwe overboeking</a></h2>
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
IBAN/rekeningnummer<br/>
|
||||||
|
<h4><?php echo $rekening['iban']?></h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2">Rentetarief<br/>
|
||||||
|
<h4><?php echo $rekening['rente']; ?>%</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2">Saldo<br/>
|
||||||
|
<h4><b><?php echo money_format('%(#1n', $rekening['saldo']); ?></b></h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Datum</th>
|
<th>Datum</th>
|
||||||
<th>Type</th>
|
<th>Code</th>
|
||||||
<th>Omschrijving</th>
|
<th>Omschrijving</th>
|
||||||
<th>IBAN</th>
|
<th>Tegenrekening</th>
|
||||||
<th>AF/BIJ</th>
|
<th>AF/BIJ</th>
|
||||||
<th>Bedrag</th>
|
<th>Bedrag</th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
foreach ($transacties as $transactie) {
|
foreach ($transacties as $transactie) {
|
||||||
if(!isset($transactie['omschrijving'])){
|
if (!isset($transactie['omschrijving'])) {
|
||||||
$transactie['omschrijving'] = "";
|
$transactie['omschrijving'] = "";
|
||||||
}
|
}
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td></td>";
|
echo "<td></td>";
|
||||||
echo "<td>" . $transactie['type'] . "</td>\n";
|
echo "<td>" . $transactie['type'] . "</td>\n";
|
||||||
echo "<td>" . $transactie['omschrijving'] . "</td>\n";
|
echo "<td>" . $transactie['omschrijving'] . "</td>\n";
|
||||||
if($transactie['van'] === $rekening['iban']){
|
|
||||||
echo "<td>" . $transactie['naar'] . "</td>\n";
|
if ($transactie['van'] === $rekening['iban']) {
|
||||||
echo "<td>AF</td>\n";
|
echo "<td>" . $transactie['naar'] . "</td>\n";
|
||||||
}else{
|
echo "<td>AF</td>\n";
|
||||||
echo "<td>" . $transactie['van'] . "</td>\n";
|
} else {
|
||||||
echo "<td>BIJ</td>\n";
|
echo "<td>" . $transactie['van'] . "</td>\n";
|
||||||
}
|
echo "<td>BIJ</td>\n";
|
||||||
echo "<td>€" . $transactie['bedrag'] . "</td>\n";
|
}
|
||||||
echo "</tr>";
|
|
||||||
}
|
echo "<td>" . money_format('%(#1n', $transactie['bedrag']) . "</td>\n";
|
||||||
?>
|
echo "</tr>";
|
||||||
|
} ?>
|
||||||
</table>
|
</table>
|
||||||
|
<br/>
|
||||||
|
<small>ba = betaalautomaat, bg = bankgiro/SEPA opdracht, id = Inforbank Direct Online Betalen (iDeal), sp = spoedbetaling</small>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user