Debian Codegraph @

templates/tests/index.php

raw
1 <?php
2 namespace LAM\TOOLS\TESTS;
3 use \htmlResponsiveRow;
4 use \htmlOutputText;
5 use \htmlLink;
6 use \htmlTitle;
7 /*
8
9 This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
10 Copyright (C) 2006 - 2024 Roland Gruber
11
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
16
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
26 */
27
28 /**
29 * Provides a list of LAM tests.
30 *
31 * @author Roland Gruber
32 * @package tools
33 */
34
35 /** security functions */
36 include_once(__DIR__ . "/../../lib/security.inc");
37 /** access to configuration options */
38 include_once(__DIR__ . "/../../lib/config.inc");
39
40 // start session
41 startSecureSession();
42 enforceUserIsLoggedIn();
43
44 // die if no write access
45 if (!checkIfWriteAccessIsAllowed()) {
46 die();
47 }
48
49 checkIfToolIsActive('toolTests');
50
51 setlanguage();
52
53 include __DIR__ . '/../../lib/adminHeader.inc';
54 echo "<div class=\"smallPaddingContent\">\n";
55
56 $container = new htmlResponsiveRow();
57 $container->add(new htmlTitle(_("LAM tests")), 12);
58
59 $container->add(new htmlLink(_("Schema test"), 'schemaTest.php', '../../graphics/search-color.svg'), 12, 4);
60 $container->add(new htmlOutputText(_("Check if the LDAP schema fits the requirements of the selected account modules.")), 12, 8);
61
62 $container->addVerticalSpacer('2rem');
63
64 $container->add(new htmlLink(_("Lamdaemon test"), 'lamdaemonTest.php', '../../graphics/script.svg'), 12, 4);
65 $container->add(new htmlOutputText(_("Check if quotas and homedirectories can be managed.")), 12, 8);
66
67 parseHtml(null, $container, [], true, 'user');
68
69 echo "</div>\n";
70 include __DIR__ . '/../../lib/adminFooter.inc';