Add 'already logged in' notice on the frontpage when the user is logged in already

master
Sven Slootweg 11 years ago
parent c0f6c09d1f
commit 1d250c6cac

@ -39,6 +39,7 @@ NewTemplater::SetGlobalVariable("logged-in", !empty($_SESSION['user_id']));
if(!empty($_SESSION['user_id']))
{
/* TODO: Handle being logged in to a non-existent user */
$sCurrentUser = new User($_SESSION['user_id']);
$sCurrentUser->SetGlobalVariables();

@ -13,4 +13,9 @@
if(!isset($_APP)) { die("Unauthorized."); }
if(!empty($_SESSION['user_id']))
{
flash_notice('Hi! It seems you are already logged in. Did you want to go to your <a href="/dashboard">Dashboard</a>?');
}
$sPageContents = NewTemplater::Render("index", $locale->strings, array());

@ -55,8 +55,6 @@
<td class="numeric">{%?total-rate}%</td>
<td class="numeric">{%?total-total}</td>
<td class="numeric total">{%?total-projection}</td>
<td class="payment-methods">
</td>
<td></td>
</tr>
</table>

@ -1,10 +1,19 @@
<div class="padding">
<h2>ReDonate is recurring contributions, done right.</h2>
</div>
<div class="intro">
<img src="/static/images/intro.png">
</div>
<div class="padding">
{%if isempty|notices == false}
{%foreach notice in notices}
<div class="notices">
{%?notice}
</div>
{%/foreach}
{%/if}
<div class="col1">
<h3>Why use ReDonate?</h3>

Loading…
Cancel
Save