2017-12-11 18:20:13 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
session_name('EVOADMIN_SESS');
|
|
|
|
session_start();
|
|
|
|
|
|
|
|
if (empty($_SESSION['login'])) {
|
|
|
|
header("location: auth.php\n\n");
|
|
|
|
exit(0);
|
|
|
|
} else {
|
2017-12-13 23:51:21 +01:00
|
|
|
try {
|
2018-01-27 18:11:57 +01:00
|
|
|
$server = new LdapServer($_SESSION['login'], $config['ldap']);
|
2017-12-13 23:08:01 +01:00
|
|
|
if (!empty($_GET['domain'])) {
|
2017-12-17 21:44:10 +01:00
|
|
|
$domain = htmlentities(strip_tags($_GET['domain']),ENT_NOQUOTES);
|
|
|
|
$domain = new LdapDomain($server, $domain);
|
2017-12-15 22:56:50 +01:00
|
|
|
if (!empty($_GET['account'])) {
|
2017-12-17 21:44:10 +01:00
|
|
|
$account = htmlentities(strip_tags($_GET['account']),ENT_NOQUOTES);
|
|
|
|
$account = new LdapAccount($domain, $account);
|
2017-12-13 23:51:21 +01:00
|
|
|
}
|
2017-12-17 15:02:34 +01:00
|
|
|
if (!empty($_GET['alias'])) {
|
2017-12-17 21:44:10 +01:00
|
|
|
$alias = htmlentities(strip_tags($_GET['alias']),ENT_NOQUOTES);
|
|
|
|
$alias = new LdapAlias($domain, $alias);
|
2017-12-17 15:02:34 +01:00
|
|
|
}
|
2017-12-13 23:08:01 +01:00
|
|
|
}
|
2017-12-15 22:56:50 +01:00
|
|
|
} catch (Exception $e) {
|
|
|
|
print '<div class="alert alert-danger" role="alert">'.$e->getMessage().'</div>';
|
2017-12-13 23:51:21 +01:00
|
|
|
exit(1);
|
2017-12-13 17:48:02 +01:00
|
|
|
}
|
2017-12-11 18:20:13 +01:00
|
|
|
}
|