Code Duplication    Length = 5-5 lines in 5 locations

admin.php 1 location

@@ 33-37 (lines=5) @@
30
31
/* do checks */
32
require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
33
if (!checkUser($_SESSION['user_id'], $_SESSION['key'], "manage_main")) {
34
    $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page
35
    include $SETTINGS['cpassman_dir'].'/error.php';
36
    exit();
37
}
38
39
// get current statistics items
40
$statistics_items = array();

admin.settings.php 1 location

@@ 34-38 (lines=5) @@
31
32
/* do checks */
33
require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
34
if (!checkUser($_SESSION['user_id'], $_SESSION['key'], curPage())) {
35
    $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page
36
    include $SETTINGS['cpassman_dir'].'/error.php';
37
    exit();
38
}
39
40
echo '
41
<input type="hidden" id="user_token" value="" />

admin.settings_api.php 1 location

@@ 80-84 (lines=5) @@
77
78
/* do checks */
79
require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
80
if (checkUser($_SESSION['user_id'], $_SESSION['key'], "manage_settings") === false) {
81
    $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page
82
    include $SETTINGS['cpassman_dir'].'/error.php';
83
    exit();
84
}
85
86
require_once $SETTINGS['cpassman_dir'].'/includes/language/'.$_SESSION['user_language'].'.php';
87
require_once $SETTINGS['cpassman_dir'].'/includes/config/settings.php';

sources/upload/upload.attachments.php 1 location

@@ 33-37 (lines=5) @@
30
31
/* do checks */
32
require_once '../checks.php';
33
if (!checkUser($_SESSION['user_id'], $_SESSION['key'], "items")) {
34
    $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page
35
    handleAttachmentError('Not allowed to ...', 110);
36
    exit();
37
}
38
39
//check for session
40
if (null !== filter_input(INPUT_POST, 'PHPSESSID', FILTER_SANITIZE_STRING)) {

sources/upload/upload.files.php 1 location

@@ 33-37 (lines=5) @@
30
31
/* do checks */
32
require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
33
if (!checkUser($_SESSION['user_id'], $_SESSION['key'], "items")) {
34
    $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page
35
    handleUploadError('Not allowed to ...');
36
    exit();
37
}
38
39
//check for session
40
if (null !== filter_input(INPUT_POST, 'PHPSESSID', FILTER_SANITIZE_STRING)) {