Code Duplication    Length = 17-17 lines in 2 locations

class/APCal.php 1 location

@@ 983-999 (lines=17) @@
980
                    $link = "$this->year-$this->month-$date";
981
982
                    // ����פˤ�����迧����ʬ��
983
                    if (isset($this->holidays[$link])) {
984
                        //  Holiday
985
                        $bgcolor = $this->holiday_bgcolor;
986
                        $color   = $this->holiday_color;
987
                    } elseif ($wday % 7 == 0) {
988
                        //  Sunday
989
                        $bgcolor = $this->sunday_bgcolor;
990
                        $color   = $this->sunday_color;
991
                    } elseif ($wday == 6) {
992
                        //  Saturday
993
                        $bgcolor = $this->saturday_bgcolor;
994
                        $color   = $this->saturday_color;
995
                    } else {
996
                        // Weekday
997
                        $bgcolor = $this->weekday_bgcolor;
998
                        $color   = $this->weekday_color;
999
                    }
1000
1001
                    // ��������طʿ��ϥ��饤�Ƚ���
1002
                    if ($date == $this->date && $target_highlight_flag) {

class/APCal_xoops.php 1 location

@@ 1173-1189 (lines=17) @@
1170
                    $link = "$this->year-$this->month-$date";
1171
1172
                    // COLORS of days
1173
                    if (isset($this->holidays[$link])) {
1174
                        // Holiday
1175
                        $bgcolor = $this->holiday_bgcolor;
1176
                        $color   = $this->holiday_color;
1177
                    } elseif ($wday % 7 == 0) {
1178
                        // Sunday
1179
                        $bgcolor = $this->sunday_bgcolor;
1180
                        $color   = $this->sunday_color;
1181
                    } elseif ($wday == 6) {
1182
                        // Saturday
1183
                        $bgcolor = $this->saturday_bgcolor;
1184
                        $color   = $this->saturday_color;
1185
                    } else {
1186
                        // Weekday
1187
                        $bgcolor = $this->weekday_bgcolor;
1188
                        $color   = $this->weekday_color;
1189
                    }
1190
1191
                    // Hi-Lighting the SELECTED DATE
1192
                    if ($link == $user_now_Ynj) {