Code Duplication    Length = 5-5 lines in 2 locations

admin.settings.php 1 location

@@ 779-783 (lines=5) @@
776
                    </td><td>
777
                    <input type="hidden" id="roles_allowed_to_print" name="roles_allowed_to_print" value="', isset($_SESSION['settings']['roles_allowed_to_print']) ? $_SESSION['settings']['roles_allowed_to_print'] : '', '" />
778
                    <select id="roles_allowed_to_print_select" name="roles_allowed_to_print_select" class="text ui-widget-content" multiple="multiple" onchange="refreshInput()">';
779
                    if (!isset($_SESSION['settings']['roles_allowed_to_print']) || empty($_SESSION['settings']['roles_allowed_to_print'])) {
780
                        $arrRolesToPrint = array();
781
                    } else {
782
                        $arrRolesToPrint = explode(";", $_SESSION['settings']['roles_allowed_to_print']);
783
                    }
784
                    $roles = DB::query("SELECT id, title FROM ".prefix_table("roles_title"));
785
                    foreach ($roles as $role) {
786
                        echo '<option value="'.$role['id'].'"', in_array($role['id'], $arrRolesToPrint) ? ' selected="selected"' : '', '>'.addslashes($role['title']).'</option>';

sources/main.functions.php 1 location

@@ 363-367 (lines=5) @@
360
function cryption($message, $ascii_key, $type) //defuse_crypto
361
{
362
    // load PhpEncryption library
363
    if (!isset($_SESSION['settings']['cpassman_dir']) || empty($_SESSION['settings']['cpassman_dir'])) {
364
        $path = '../includes/libraries/Encryption/Encryption/';
365
    } else {
366
        $path = $_SESSION['settings']['cpassman_dir'].'/includes/libraries/Encryption/Encryption/';
367
    }
368
369
    require_once $path.'Crypto.php';
370
    require_once $path.'Encoding.php';