1
|
|
2
|
|
3
|
|
4
|
<!doctype html>
|
5
|
<html lang="en">
|
6
|
|
7
|
<head>
|
8
|
<!-- Required meta tags -->
|
9
|
<meta charset="utf-8">
|
10
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
11
|
|
12
|
<!-- Bootstrap CSS -->
|
13
|
<link rel="stylesheet" href="../resources/css/bootstrap.min.css" />
|
14
|
|
15
|
<title>Organizations Database: Logout</title>
|
16
|
|
17
|
</head>
|
18
|
|
19
|
<body>
|
20
|
<div ng-app="logoutApp" ng-controller="logoutCtrl" class="container">
|
21
|
|
22
|
<div class="card text-center" style="margin-top: 25px">
|
23
|
<div class="card-header">Organizations Database</div>
|
24
|
<div class="card-body">
|
25
|
<h5 class="card-title">You have been logged out !!!</h5>
|
26
|
<p class="card-text">You will be redicted to the homepage between {{seconds}} second(s)</p>
|
27
|
<button class="btn btn-sm btn-primary" ng-click="homepage()">return to homepage</button>
|
28
|
</div>
|
29
|
</div>
|
30
|
</div>
|
31
|
|
32
|
<script src="../resources/js/jquery-3.4.1.min.js"></script>
|
33
|
<script src="../resources/js/popper.min.js"></script>
|
34
|
<script src="../resources/js/bootstrap.min.js"></script>
|
35
|
<script src="../resources/js/angular.min.js"></script>
|
36
|
|
37
|
<script>
|
38
|
angular
|
39
|
.module('logoutApp', [])
|
40
|
.controller('logoutCtrl', function($scope, $http, $timeout) {
|
41
|
|
42
|
$scope.seconds = 5;
|
43
|
|
44
|
$scope.homepage = function() { location.href = '/'; }
|
45
|
$scope.onTimeout = function() {
|
46
|
$scope.seconds--;
|
47
|
if ($scope.seconds > 0) {
|
48
|
$timeout($scope.onTimeout, 1000);
|
49
|
} else {
|
50
|
$scope.homepage();
|
51
|
}
|
52
|
};
|
53
|
|
54
|
$timeout($scope.onTimeout, 1000);
|
55
|
|
56
|
});
|
57
|
</script>
|
58
|
|
59
|
</body>
|
60
|
|
61
|
</html>
|