mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
delete old notifications
This commit is contained in:
parent
5f4f05386f
commit
2788426567
4 changed files with 17 additions and 3 deletions
|
@ -105,6 +105,21 @@ function top_panel($user, $TAB) {
|
|||
}
|
||||
$panel = json_decode(implode('', $output), true);
|
||||
unset($output);
|
||||
|
||||
|
||||
// getting notifications
|
||||
$command = VESTA_CMD."v-list-user-notifications '".$user."' 'json'";
|
||||
exec ($command, $output, $return_var);
|
||||
$notifications = json_decode(implode('', $output), true);
|
||||
foreach($notifications as $message){
|
||||
if($message['ACK'] == 'no'){
|
||||
$panel[$user]['NOTIFICATIONS'] = 'yes';
|
||||
break;
|
||||
}
|
||||
}
|
||||
unset($output);
|
||||
|
||||
|
||||
if ( $user == 'admin' ) {
|
||||
include(dirname(__FILE__).'/../templates/admin/panel.html');
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue