Code Duplication    Length = 5-5 lines in 2 locations

admin.settings.php 1 location

@@ 828-832 (lines=5) @@
825
                    </td><td>
826
                    <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'] : '', '" />
827
                    <select id="roles_allowed_to_print_select" name="roles_allowed_to_print_select" class="text ui-widget-content" multiple="multiple" onchange="refreshInput()">';
828
                    if (!isset($_SESSION['settings']['roles_allowed_to_print']) || empty($_SESSION['settings']['roles_allowed_to_print'])) {
829
                        $arrRolesToPrint = array();
830
                    } else {
831
                        $arrRolesToPrint = explode(";", $_SESSION['settings']['roles_allowed_to_print']);
832
                    }
833
                    $roles = DB::query("SELECT id, title FROM ".prefix_table("roles_title"));
834
                    foreach ($roles as $role) {
835
                        echo '<option value="'.$role['id'].'"', in_array($role['id'], $arrRolesToPrint) ? ' selected="selected"' : '', '>'.addslashes($role['title']).'</option>';

sources/main.functions.php 1 location

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