3 826796d1 2022-09-04 mischa // OpenSMTPD Admin
4 826796d1 2022-09-04 mischa // by Mischa Peters <mischa at high5 dot nl>
5 826796d1 2022-09-04 mischa // Copyright (c) 2022 High5!
6 826796d1 2022-09-04 mischa // License Info: LICENSE.TXT
8 826796d1 2022-09-04 mischa // File: list-domains.php
10 826796d1 2022-09-04 mischa // Template File: list-domains.tpl
12 826796d1 2022-09-04 mischa // Template variables:
14 826796d1 2022-09-04 mischa // list_domains
16 826796d1 2022-09-04 mischa // GET / POST variables:
20 826796d1 2022-09-04 mischa require_once './functions.inc.php';
21 826796d1 2022-09-04 mischa include './languages/' . check_language() . '.lang';
23 826796d1 2022-09-04 mischa $SESSID_USERNAME = check_session();
24 1575a178 2022-09-06 mischa $ROLE = check_role($SESSID_USERNAME);
26 ff6266ff 2022-09-05 mischa if ($_SERVER['REQUEST_METHOD'] == "GET") {
27 ff6266ff 2022-09-05 mischa $username = filter_input(INPUT_GET, 'username', FILTER_VALIDATE_EMAIL);
28 080e0cc0 2022-09-05 mischa if ($ROLE == ADMIN_ROLE) {
29 ff6266ff 2022-09-05 mischa $list_admins = list_admins();
30 ff6266ff 2022-09-05 mischa if (empty($username)) {
31 ff6266ff 2022-09-05 mischa $list_domains = list_domains();
33 ff6266ff 2022-09-05 mischa $list_domains = list_domains($username);
36 ff6266ff 2022-09-05 mischa $list_domains = list_domains($SESSID_USERNAME);
39 826796d1 2022-09-04 mischa include './templates/header.tpl';
40 826796d1 2022-09-04 mischa include './templates/menu.tpl';
41 826796d1 2022-09-04 mischa include './templates/list-domain.tpl';
42 826796d1 2022-09-04 mischa include './templates/footer.tpl';