Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
Update activity.php
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsengelen committed May 12, 2020
1 parent e1d0717 commit 590f742
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions includes/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

session_start();

$veeam = new VBO($host, $port, $version);

if (isset($_SESSION['token'])) {
$veeam = new VBO($host, $port, $version);
$veeam->setToken($_SESSION['token']);
$user = $_SESSION['user'];
$sessions = $veeam->getSessions();
Expand All @@ -17,8 +16,8 @@
}

usort($time, function($a, $b) { /* Sort the default list by start time (last one first) */
$ad = new DateTime($a['endTime']);
$bd = new DateTime($b['endTime']);
$ad = new DateTime($a['creationTime']);
$bd = new DateTime($b['creationTime']);

if ($ad == $bd)
return 0;
Expand Down Expand Up @@ -128,7 +127,7 @@
var icon, text;
var id = $(this).data('sessionid');

$.get('veeam.php', {'action' : 'getsessionlog', 'id' : id}).done(function(data) {
$.post('veeam.php', {'action' : 'getsessionlog', 'id' : id}).done(function(data) {
response = JSON.parse(data);

$('#table-session-content tbody').empty();
Expand Down Expand Up @@ -168,7 +167,7 @@
function loadSessions(offset) {
var result, status;

$.get('veeam.php', {'action' : 'getsessions', 'offset' : offset}).done(function(data) {
$.post('veeam.php', {'action' : 'getsessions', 'offset' : offset}).done(function(data) {
var response = JSON.parse(data);

for (var i = 0; i < response.results.length; i++) {
Expand Down

0 comments on commit 590f742

Please sign in to comment.