Code Duplication    Length = 14-14 lines in 2 locations

class/utilities.php 2 locations

@@ 2696-2709 (lines=14) @@
2693
     * @param $dirarray
2694
     * @param $namearray
2695
     */
2696
    public static function xtubeGetDirSelectOption($selected, $dirarray, $namearray)
2697
    {
2698
        echo "<select size='1' name='workd' onchange='location.href=\"upload.php?rootpath=\"+this.options[this.selectedIndex].value'>";
2699
        echo "<option value=''>--------------------------------------</option>";
2700
        foreach ($namearray as $namearray => $workd) {
2701
            if ($workd == $selected) {
2702
                $opt_selected = 'selected';
2703
            } else {
2704
                $opt_selected = '';
2705
            }
2706
            echo '<option value="' . htmlspecialchars($namearray, ENT_QUOTES) . '" $opt_selected>' . $workd . '</option>';
2707
        }
2708
        echo '</select>';
2709
    }
2710
2711
    /**
2712
     * @param $selected
@@ 2716-2729 (lines=14) @@
2713
     * @param $dirarray
2714
     * @param $namearray
2715
     */
2716
    public static function xtubeVGetDirSelectOption($selected, $dirarray, $namearray)
2717
    {
2718
        echo "<select size='1' name='workd' onchange='location.href=\"vupload.php?rootpath=\"+this.options[this.selectedIndex].value'>";
2719
        echo "<option value=''>--------------------------------------</option>";
2720
        foreach ($namearray as $namearray => $workd) {
2721
            if ($workd == $selected) {
2722
                $opt_selected = 'selected';
2723
            } else {
2724
                $opt_selected = '';
2725
            }
2726
            echo '<option value="' . htmlspecialchars($namearray, ENT_QUOTES) . '" $opt_selected>' . $workd . '</option>';
2727
        }
2728
        echo '</select>';
2729
    }
2730
2731
    /**
2732
     * @param        $FILES