forked from fabianlipp/useradmin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
26 lines (20 loc) · 747 Bytes
/
index.php
File metadata and controls
26 lines (20 loc) · 747 Bytes
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
<?php
require_once('config.inc.php');
require_once(BASE_PATH . 'ldap.inc.php');
require_once(BASE_PATH . 'classes/user.inc.php');
require_once(BASE_PATH . 'classes/group.inc.php');
session_start();
$ldapconn = ldap_bind_session();
$users = User::readUsers($ldapconn);
$groupOus = GroupOu::readGroupOus($ldapconn);
ldap_close($ldapconn);
$groupCount = array_sum(array_map(function($groupOu) { return count($groupOu->groups); }, $groupOus));
?>
<?php include('html_head.inc.php'); ?>
<?php include('navigation.inc.php'); ?>
<div class="container">
<h1>Startseite</h1>
<p>Anzahl User: <?php echo(count($users)); ?></p>
<p>Anzahl Gruppen: <?php echo($groupCount); ?></p>
</div>
<?php include('html_bottom.inc.php'); ?>