diff --git a/lam/templates/delete.php b/lam/templates/delete.php index 1d871e0c..055ce629 100644 --- a/lam/templates/delete.php +++ b/lam/templates/delete.php @@ -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 "
'; -include '../../lib/adminFooter.inc'; +include __DIR__ . '/../../lib/adminFooter.inc'; /** * Prints a back button to the page where the user enters a file to upload. diff --git a/lam/templates/upload/massDoUpload.php b/lam/templates/upload/massDoUpload.php index c868645c..570e5472 100644 --- a/lam/templates/upload/massDoUpload.php +++ b/lam/templates/upload/massDoUpload.php @@ -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(); '; -include '../../lib/adminFooter.inc'; +include __DIR__ . '/../../lib/adminFooter.inc'; ?> diff --git a/lam/templates/upload/masscreate.php b/lam/templates/upload/masscreate.php index c1584de9..f6801bb1 100644 --- a/lam/templates/upload/masscreate.php +++ b/lam/templates/upload/masscreate.php @@ -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 "\n"; echo ''; -include '../../lib/adminFooter.inc'; +include __DIR__ . '/../../lib/adminFooter.inc'; /** * Displays the acount type specific main page of the upload.