evoadmin-mail/htdocs/lib/auth.php

26 lines
758 B
PHP
Raw Normal View History

<?php
session_name('EVOADMIN_SESS');
session_start();
if (empty($_SESSION['login'])) {
header("location: auth.php\n\n");
exit(0);
} else {
try {
$server = new LdapServer($_SESSION['login']);
2017-12-13 23:08:01 +01:00
if (!empty($_GET['domain'])) {
2017-12-15 22:56:50 +01:00
$domain = new LdapDomain($server, Html::clean($_GET['domain']));
if (!empty($_GET['account'])) {
$account = new LdapAccount($domain, Html::clean($_GET['account']));
}
if (!empty($_GET['alias'])) {
$alias = new LdapAlias($domain, Html::clean($_GET['alias']));
}
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>';
exit(1);
2017-12-13 17:48:02 +01:00
}
}