Code Duplication    Length = 5-5 lines in 2 locations

sources/main.functions.php 1 location

@@ 380-384 (lines=5) @@
377
    global $SETTINGS;
378
379
    // load PhpEncryption library
380
    if (!isset($SETTINGS['cpassman_dir']) || empty($SETTINGS['cpassman_dir'])) {
381
        $path = '../includes/libraries/Encryption/Encryption/';
382
    } else {
383
        $path = $SETTINGS['cpassman_dir'].'/includes/libraries/Encryption/Encryption/';
384
    }
385
386
    require_once $path.'Crypto.php';
387
    require_once $path.'Encoding.php';

admin.settings.php 1 location

@@ 816-820 (lines=5) @@
813
                    </td><td>
814
                    <input type="hidden" id="roles_allowed_to_print" name="roles_allowed_to_print" value="', isset($SETTINGS['roles_allowed_to_print']) ? $SETTINGS['roles_allowed_to_print'] : '', '" />
815
                    <select id="roles_allowed_to_print_select" name="roles_allowed_to_print_select" class="text ui-widget-content" multiple="multiple" onchange="refreshInput()">';
816
if (!isset($SETTINGS['roles_allowed_to_print']) || empty($SETTINGS['roles_allowed_to_print'])) {
817
    $arrRolesToPrint = array();
818
} else {
819
    $arrRolesToPrint = explode(";", $SETTINGS['roles_allowed_to_print']);
820
}
821
$roles = DB::query("SELECT id, title FROM ".prefix_table("roles_title"));
822
foreach ($roles as $role) {
823
    echo '<option value="'.$role['id'].'"', in_array($role['id'], $arrRolesToPrint) ? ' selected="selected"' : '', '>'.addslashes($role['title']).'</option>';