forked from mkkeck/ProFTPd-Admin-Secure-Version
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
130 lines (119 loc) · 4.16 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php
/**
* This file is part of ProFTPd Admin
*
* @package ProFTPd-Admin
* @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
*
* @copyright Lex Brugman <[email protected]>
* @copyright Christian Beer <[email protected]>
* @copyright Ricardo Padilha <[email protected]>
*
*/
global $cfg;
include_once ("configs/config.php");
include_once ("includes/Session.php");
include_once ("includes/AdminClass.php");
$ac = new AdminClass($cfg);
include ("includes/header.php");
include ("includes/messages.php");
if (
(
(!isset($session_usage) || $session_usage !== true) &&
(!isset($session_valid) || $session_valid !== true)
) || (
isset($session_usage) && $session_usage === true &&
isset($session_valid) && $session_valid === true
)
) {
?>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Groups</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-8 col-sm-7 col-md-6">
<p>Groups in database:</p>
</div>
<div class="col-xs-4 col-sm-5 col-md-6">
<p><span class="form-control"><?php echo $ac->get_group_count(); ?></span></p>
</div>
<div class="col-xs-8 col-sm-7 col-md-6">
<p>Empty groups in database:</p>
</div>
<div class="col-xs-4 col-sm-5 col-md-6">
<p><span class="form-control"><?php echo $ac->get_group_count(TRUE); ?></span></p>
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<p><a class="btn btn-primary pull-right" href="groups.php" role="button">View groups »</a></p>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Users</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-8 col-sm-7 col-md-6">
<p>Users in database:</p>
</div>
<div class="col-xs-4 col-sm-5 col-md-6">
<p><span class="form-control"><?php echo $ac->get_user_count(); ?></span></p>
</div>
<div class="col-xs-8 col-sm-7 col-md-6">
<p>Deactivated users in database:</p>
</div>
<div class="col-xs-4 col-sm-5 col-md-6">
<p><span class="form-control"><?php echo $ac->get_user_count(TRUE); ?></span></p>
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<p><a class="btn btn-primary pull-right" href="users.php" role="button">View users »</a></p>
</div>
</div>
</div>
</div>
</div>
<?php
}
else {
?>
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
Login
</h3>
</div>
<div class="panel-body">
<form action="index.php" method="post">
<div class="form-group">
<div class="input-group">
<label for="username" class="input-group-addon"><span class="glyphicon glyphicon-user"><span class="text-hide" aria-hidden="true">Username</span></label>
<input type="text" class="form-control" id="username" name="username" placeholder="Username">
</div>
</div>
<div class="form-group">
<div class="input-group">
<label for="password" class="input-group-addon"><span class="glyphicon glyphicon-lock"><span class="text-hide" aria-hidden="true">Password</span></label>
<input type="password" class="form-control" id="password" name="password" placeholder="Password">
</div>
</div>
<div class="form-group">
<div class="input-group pull-right">
<button type="submit" class="btn btn-primary" name="login" id="login" value="login">Sign in</button>
</div>
</div>
</form>
</div>
</div>
</div>
<?php
}
include ("includes/footer.php");
?>