refactoring

This commit is contained in:
Roland Gruber 2018-12-23 17:28:42 +01:00
parent 77282fed29
commit e43b106c95
6 changed files with 45 additions and 41 deletions

View File

@ -39,19 +39,19 @@ use \htmlStatusMessage;
/** security functions */
include_once("../lib/security.inc");
include_once(__DIR__ . "/../lib/security.inc");
/** account functions */
include_once('../lib/account.inc');
include_once(__DIR__ . '/../lib/account.inc');
/** current configuration options */
include_once('../lib/config.inc');
include_once(__DIR__ . '/../lib/config.inc');
/** message displaying */
include_once('../lib/status.inc');
include_once(__DIR__ . '/../lib/status.inc');
/** LDAP connection */
include_once('../lib/ldap.inc');
include_once(__DIR__ . '/../lib/ldap.inc');
/** remote interface */
include_once('../lib/remote.inc');
include_once(__DIR__ . '/../lib/remote.inc');
/** module interface */
include_once('../lib/modules.inc');
include_once(__DIR__ . '/../lib/modules.inc');
// Start session
startSecureSession();
@ -155,11 +155,15 @@ if (isset($_GET['type']) && isset($_SESSION['delete_dn'])) {
}
if (isset($_POST['cancel'])) {
if (isset($_SESSION['delete_dn'])) unset($_SESSION['delete_dn']);
if (isset($_SESSION['delete_dn'])) {
unset($_SESSION['delete_dn']);
}
metaRefresh("lists/list.php?type=" . $_POST['type']);
}
elseif (isset($_POST['cancelAllOk'])) {
if (isset($_SESSION['delete_dn'])) unset($_SESSION['delete_dn']);
if (isset($_SESSION['delete_dn'])) {
unset($_SESSION['delete_dn']);
}
metaRefresh("lists/list.php?type=" . $_POST['type'] . '&deleteAllOk=1');
}
@ -171,7 +175,7 @@ if (isset($_POST['delete'])) {
die();
}
// Show HTML Page
include '../lib/adminHeader.inc';
include __DIR__ . '/../lib/adminHeader.inc';
echo "<form action=\"delete.php\" method=\"post\">\n";
echo "<div class=\"" . $type->getScope() . "-bright smallPaddingContent\"><br>\n";
$container = new htmlResponsiveRow();
@ -328,7 +332,7 @@ if (isset($_POST['delete'])) {
});
</script>
<?php
include '../lib/adminFooter.inc';
include __DIR__ . '/../lib/adminFooter.inc';
}

View File

@ -28,9 +28,9 @@
*/
/** security functions */
include_once("../../lib/security.inc");
include_once(__DIR__ . "/../../lib/security.inc");
/** access to configuration options */
include_once("../../lib/config.inc");
include_once(__DIR__ . "/../../lib/config.inc");
// start session
startSecureSession();
@ -94,7 +94,7 @@ foreach ($monitorResults as $monitorResult) {
}
$monitorEntries = array_change_key_case($monitorEntries, CASE_LOWER);
include '../../lib/adminHeader.inc';
include __DIR__ . '/../../lib/adminHeader.inc';
echo '<div class="user-bright smallPaddingContent">';
$tabindex = 1;
$container = new htmlResponsiveRow();
@ -364,6 +364,6 @@ elseif (isset($monitorEntries['cn=monitor']['opsinitiated'])) {
parseHtml(null, $container, array(), true, $tabindex, 'user');
echo '</div>';
include '../../lib/adminFooter.inc';
include __DIR__ . '/../../lib/adminFooter.inc';
?>

View File

@ -29,9 +29,9 @@
*/
/** security functions */
include_once("../../lib/security.inc");
include_once(__DIR__ . "/../../lib/security.inc");
/** access to configuration options */
include_once("../../lib/config.inc");
include_once(__DIR__ . "/../../lib/config.inc");
// start session
startSecureSession();
@ -39,7 +39,7 @@ enforceUserIsLoggedIn();
setlanguage();
include '../../lib/adminHeader.inc';
include __DIR__ . '/../../lib/adminHeader.inc';
?>
<div id="tabcontent" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
@ -64,5 +64,5 @@ window.onresize = resizeIframe;
</div>
<?php
include '../../lib/adminFooter.inc';
include __DIR__ . '/../../lib/adminFooter.inc';
?>

View File

@ -35,13 +35,13 @@ use \htmlResponsiveRow;
*/
/** security functions */
include_once("../../lib/security.inc");
include_once(__DIR__ . "/../../lib/security.inc");
/** access to configuration */
include_once('../../lib/config.inc');
include_once(__DIR__ . '/../../lib/config.inc');
/** status messages */
include_once('../../lib/status.inc');
include_once(__DIR__ . '/../../lib/status.inc');
/** account modules */
include_once('../../lib/modules.inc');
include_once(__DIR__ . '/../../lib/modules.inc');
// Start session
@ -95,7 +95,7 @@ if (isset($_GET['showldif'])) {
exit;
}
include '../../lib/adminHeader.inc';
include __DIR__ . '/../../lib/adminHeader.inc';
$typeId = htmlspecialchars($_POST['typeId']);
$typeManager = new \LAM\TYPES\TypeManager();
$type = $typeManager->getConfiguredType($typeId);
@ -279,7 +279,7 @@ parseHtml(null, $container, array(), false, $tabindex, $type->getScope());
echo '</div>';
echo '</form>';
include '../../lib/adminFooter.inc';
include __DIR__ . '/../../lib/adminFooter.inc';
/**
* Prints a back button to the page where the user enters a file to upload.

View File

@ -29,17 +29,17 @@ namespace LAM\UPLOAD;
*/
/** security functions */
include_once("../../lib/security.inc");
include_once(__DIR__ . "/../../lib/security.inc");
/** access to configuration */
include_once('../../lib/config.inc');
include_once(__DIR__ . '/../../lib/config.inc');
/** LDAP handle */
include_once('../../lib/ldap.inc');
include_once(__DIR__ . '/../../lib/ldap.inc');
/** status messages */
include_once('../../lib/status.inc');
include_once(__DIR__ . '/../../lib/status.inc');
/** account modules */
include_once('../../lib/modules.inc');
include_once(__DIR__ . '/../../lib/modules.inc');
/** PDF */
include_once('../../lib/pdf.inc');
include_once(__DIR__ . '/../../lib/pdf.inc');
// Start session
@ -61,7 +61,7 @@ if (!isLoggedIn()) {
// Set correct language, codepages, ....
setlanguage();
include '../../lib/adminHeader.inc';
include __DIR__ . '/../../lib/adminHeader.inc';
$typeId = htmlspecialchars($_SESSION['mass_typeId']);
$typeManager = new \LAM\TYPES\TypeManager();
$type = $typeManager->getConfiguredType($typeId);
@ -87,5 +87,5 @@ $tokenPrefix = '?' . getSecurityTokenName() . '=' . getSecurityTokenValue();
<?php
echo '</div>';
include '../../lib/adminFooter.inc';
include __DIR__ . '/../../lib/adminFooter.inc';
?>

View File

@ -47,17 +47,17 @@ use \moduleCache;
*/
/** security functions */
include_once("../../lib/security.inc");
include_once(__DIR__ . "/../../lib/security.inc");
/** access to configuration */
include_once('../../lib/config.inc');
include_once(__DIR__ . '/../../lib/config.inc');
/** status messages */
include_once('../../lib/status.inc');
include_once(__DIR__ . '/../../lib/status.inc');
/** account modules */
include_once('../../lib/modules.inc');
include_once(__DIR__ . '/../../lib/modules.inc');
/** Used to get PDF information. */
include_once('../../lib/pdfstruct.inc');
include_once(__DIR__ . '/../../lib/pdfstruct.inc');
/** upload functions */
include_once('../../lib/upload.inc');
include_once(__DIR__ . '/../../lib/upload.inc');
// Start session
startSecureSession();
@ -95,7 +95,7 @@ if (isset($_GET['getCSV'])) {
Uploader::cleanSession();
include '../../lib/adminHeader.inc';
include __DIR__ . '/../../lib/adminHeader.inc';
// get possible types and remove those which do not support file upload
$typeManager = new \LAM\TYPES\TypeManager();
@ -248,7 +248,7 @@ function changeVisibleModules(element) {
echo "</form>\n";
echo '</div>';
include '../../lib/adminFooter.inc';
include __DIR__ . '/../../lib/adminFooter.inc';
/**
* Displays the acount type specific main page of the upload.