Code Duplication    Length = 14-14 lines in 2 locations

class/utility.php 2 locations

@@ 2825-2838 (lines=14) @@
2822
     * @param $dirarray
2823
     * @param $namearray
2824
     */
2825
    public static function xtubeGetDirSelectOption($selected, $dirarray, $namearray)
2826
    {
2827
        echo "<select size='1' name='workd' onchange='location.href=\"upload.php?rootpath=\"+this.options[this.selectedIndex].value'>";
2828
        echo "<option value=''>--------------------------------------</option>";
2829
        foreach ($namearray as $namearray => $workd) {
2830
            if ($workd === $selected) {
2831
                $opt_selected = 'selected';
2832
            } else {
2833
                $opt_selected = '';
2834
            }
2835
            echo '<option value="' . htmlspecialchars($namearray, ENT_QUOTES) . '" $opt_selected>' . $workd . '</option>';
2836
        }
2837
        echo '</select>';
2838
    }
2839
2840
    /**
2841
     * @param $selected
@@ 2845-2858 (lines=14) @@
2842
     * @param $dirarray
2843
     * @param $namearray
2844
     */
2845
    public static function xtubeVGetDirSelectOption($selected, $dirarray, $namearray)
2846
    {
2847
        echo "<select size='1' name='workd' onchange='location.href=\"vupload.php?rootpath=\"+this.options[this.selectedIndex].value'>";
2848
        echo "<option value=''>--------------------------------------</option>";
2849
        foreach ($namearray as $namearray => $workd) {
2850
            if ($workd === $selected) {
2851
                $opt_selected = 'selected';
2852
            } else {
2853
                $opt_selected = '';
2854
            }
2855
            echo '<option value="' . htmlspecialchars($namearray, ENT_QUOTES) . '" $opt_selected>' . $workd . '</option>';
2856
        }
2857
        echo '</select>';
2858
    }
2859
2860
    /**
2861
     * @param        $FILES