Code Duplication    Length = 7-7 lines in 2 locations

class/APCal.php 1 location

@@ 1424-1430 (lines=7) @@
1421
            // ��������
1422
            if ($mode === 'W' || $mode === 'D') {
1423
                $date_options = '';
1424
                for ($d = 1; $d <= 31; ++$d) {
1425
                    if ($d == $date) {
1426
                        $date_options .= "\t\t\t<option value='$d' selected>{$this->date_short_names[$d]}</option>\n";
1427
                    } else {
1428
                        $date_options .= "\t\t\t<option value='$d'>{$this->date_short_names[$d]}</option>\n";
1429
                    }
1430
                }
1431
1432
                $ret['YMD_SELECTS'] = sprintf(_APCAL_FMT_YMD, "<select name='apcal_year'>{$ret['YEAR_OPTIONS']}</select> &nbsp; ",
1433
                                              "<select name='apcal_month'>{$ret['MONTH_OPTIONS']}</select> &nbsp; ", "<select name='apcal_date'>$date_options</select> &nbsp; ");

class/APCal_xoops.php 1 location

@@ 816-822 (lines=7) @@
813
814
            // ��������
815
            $date_options = '';
816
            for ($d = 1; $d <= 31; ++$d) {
817
                if ($d == $this->date) {
818
                    $date_options .= "\t\t\t<option value='$d' selected>{$this->date_short_names[$d]}</option>\n";
819
                } else {
820
                    $date_options .= "\t\t\t<option value='$d'>{$this->date_short_names[$d]}</option>\n";
821
                }
822
            }
823
824
            $ymdo_selects = sprintf(_APCAL_FMT_YMDO, "<select name='apcal_year'>$year_options</select>", "<select name='apcal_month'>$month_options</select>",
825
                                    "<select name='apcal_date'>$date_options</select>", "<select name='op'>$op_options</select>");