[CHANGE] notifications
This commit is contained in:
parent
779bbb847e
commit
8e8736ef47
@ -98,11 +98,10 @@ if (count(@$_SESSION['last_ip_pop']) == 2) {
|
||||
$data = $_SESSION['last_ip_pop'];
|
||||
$ip = filter_var($data[0], FILTER_VALIDATE_IP);
|
||||
$time = date("l, F jS \a\\t g:i a", $data[1]);
|
||||
$closelink = "<a href='index.php?page=dashboard&clp=1' style='float:right;padding-right:14px;'>Close</a>";
|
||||
if (@$_SESSION['AUTHENTICATED'] && $_SESSION['last_ip_pop'][0] !== $user->getCurrentIP()) {
|
||||
$_SESSION['POPUP'][] = array('CONTENT' => "You last logged in from <b>$ip</b> on $time $closelink", 'TYPE' => 'alert alert-warning');
|
||||
$_SESSION['POPUP'][] = array('CONTENT' => "You last logged in from <b>$ip</b> on $time", 'TYPE' => 'alert alert-warning alert-dismissable');
|
||||
} else {
|
||||
$_SESSION['POPUP'][] = array('CONTENT' => "You last logged in from <b>$ip</b> on $time $closelink", 'TYPE' => 'alert alert-info');
|
||||
$_SESSION['POPUP'][] = array('CONTENT' => "You last logged in from <b>$ip</b> on $time", 'TYPE' => 'alert alert-info alert-dismissable');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,7 +42,10 @@
|
||||
{nocache}
|
||||
{if is_array($smarty.session.POPUP|default)}
|
||||
{section popup $smarty.session.POPUP}
|
||||
<div class="{$smarty.session.POPUP[popup].TYPE|default:"alert alert-info"}">{$smarty.session.POPUP[popup].CONTENT nofilter}</div>
|
||||
<div class="{$smarty.session.POPUP[popup].TYPE|default:"alert alert-info alert-dismissable"}">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{$smarty.session.POPUP[popup].CONTENT nofilter}
|
||||
</div>
|
||||
{/section}
|
||||
{/if}
|
||||
{/nocache}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user