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());
|
||||||
}
|
}
|
||||||
|
@ -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
|
<?php
|
||||||
foreach ($rekeningen as $rekening) {
|
foreach ($rekeningen as $rekening) {
|
||||||
?>
|
?>
|
||||||
<tr class="clickable" onclick="document.location.href = 'rekeningen/<?php echo $rekening['nr'] ?>'">
|
<a class="clickable" onclick="document.location.href = 'rekeningen/<?php echo $rekening['nr'] ?>'"><div class="panel panel-default">
|
||||||
<td><?php echo $rekening['iban']; ?></td>
|
<div class="panel-body">
|
||||||
<td><?php echo "€" . $rekening['saldo']; ?></td>
|
<h4><?php echo $rekening['naam']; ?><span class="pull-right big"><?php echo money_format('%(#1n', $rekening['saldo']); ?></span></h4>
|
||||||
<td><?php echo $rekening['naam']; ?></td>
|
<p><?php echo $rekening['iban']; ?></p>
|
||||||
<td><?php echo $rekening['rente']; ?></td>
|
</div>
|
||||||
</tr>
|
</div></a>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
|
||||||
|
|
||||||
<?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">
|
||||||
|
<div>
|
||||||
<img class="logo" alt="logo" src="assets/logo.png"/>
|
<img class="logo" alt="logo" src="assets/logo.png"/>
|
||||||
<h3>Welkom bij de InforBank</h1>
|
<h3>Welkom bij de InforBank</h1>
|
||||||
Bij InforBank krijg je zelfs 10% rente op betaalrekeningen.<br/><br/>
|
Bij InforBank krijg je zelfs 10% rente op betaalrekeningen.<br/><br/>
|
||||||
Je kunt bij InforBank ook online betalen.<br/><br/>
|
Je kunt bij InforBank ook online betalen.<br/><br/>
|
||||||
BIC: INFONL2N
|
BIC: INFONL2N
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 formdiv">
|
</div>
|
||||||
<form class="form-signin" method="post">
|
<div class="col-md-6 formdiv">
|
||||||
<h2 class="form-signin-heading">Inloggen</h2>
|
<div class="loginmodal-container">
|
||||||
<label for="inputUsername" class="sr-only">Rekeningnummer (alleen cijfers)</label>
|
<h1>Inloggen bij de Inforbank</h1><br>
|
||||||
<input type="text" id="inputUsername" name="rekeningnr" class="form-control" placeholder="012456789"/>
|
<?php if ($error) {
|
||||||
|
?>
|
||||||
|
<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)">
|
||||||
|
<input type="password" name="pascode" placeholder="Pascode">
|
||||||
|
<input type="submit" name="login" class="login loginmodal-submit" value="Login">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</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,19 +3,38 @@
|
|||||||
<?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>
|
||||||
@ -28,6 +47,7 @@ foreach ($transacties as $transactie) {
|
|||||||
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']) {
|
if ($transactie['van'] === $rekening['iban']) {
|
||||||
echo "<td>" . $transactie['naar'] . "</td>\n";
|
echo "<td>" . $transactie['naar'] . "</td>\n";
|
||||||
echo "<td>AF</td>\n";
|
echo "<td>AF</td>\n";
|
||||||
@ -35,11 +55,13 @@ foreach ($transacties as $transactie) {
|
|||||||
echo "<td>" . $transactie['van'] . "</td>\n";
|
echo "<td>" . $transactie['van'] . "</td>\n";
|
||||||
echo "<td>BIJ</td>\n";
|
echo "<td>BIJ</td>\n";
|
||||||
}
|
}
|
||||||
echo "<td>€" . $transactie['bedrag'] . "</td>\n";
|
|
||||||
|
echo "<td>" . money_format('%(#1n', $transactie['bedrag']) . "</td>\n";
|
||||||
echo "</tr>";
|
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