Code Duplication    Length = 5-5 lines in 3 locations

admin/donations.php 3 locations

@@ 641-645 (lines=5) @@
638
    $ordinaux   = explode('|', _AD_DON_NUMBER_ORDINAUX);
639
    //-------------------------------------------------------------
640
    $h = 0;
641
    do {
642
        $ord = $ordinaux[$h++];
643
        $row1 .= "    <td title=\"{$desc}\" style=\"text-align: center;\">{$ord}</td>\n";
644
        $row2 .= "    <td title=\"{$desc}\" style=\"text-align: center;\"><input size=\"4\" name=\"var_week_goal-$row_Recordset1[subtype]\" type=\"text\" value=\"$row_Recordset1[value]\" onChange=\"return validInt(this,'$row_Recordset1[subtype] " . _AD_DON_GOAL_DONATION . "',1,'" . _AD_DON_ALERTE_INPUT_NUMBER . "');\" /></td>\n";
645
    } while ($row_Recordset1 = $xoopsDB->fetchArray($Recordset1));
646
    $row1 .= "  </tr>\n";
647
    $row2 .= "  </tr>\n";
648
    echo "{$row1} {$row2}";
@@ 665-669 (lines=5) @@
662
    . "    <td style=\"text-align: center; font-weight: bold;\">" . _AD_DON_MONTH . "</td>\n";
663
    $row2 = "  <tr>\n"
664
    . "    <td style=\"text-align: center; font-weight: bold;\">" . _AD_DON_GOAL . "</td>\n";
665
    do {
666
        $month = $shortMonth[$h++];
667
        $row1 .= "    <td title=\"{$desc}\" style=\"text-align: center;\">{$month}</td>\n";
668
        $row2 .= "    <td title=\"{$desc}\" style=\"text-align: center;\"><input size=\"4\" name=\"var_month_goal-$row_Recordset1[subtype]\" type=\"text\" value=\"$row_Recordset1[value]\" onChange=\"return validInt(this,'$row_Recordset1[subtype] "._AD_DON_GOAL_DONATION."',1,'"._AD_DON_ALERTE_INPUT_NUMBER."');\" /></td>\n";
669
    } while ($row_Recordset1 = $xoopsDB->fetchArray($Recordset1));
670
    $row1 .= "  </tr>\n";
671
    $row2 .= "  </tr>\n";
672
    echo "{$row1}{$row2}";
@@ 690-694 (lines=5) @@
687
    $row1 = "  <tr><td style=\"text-align: center; font-weight: bold;\">" . _AD_DON_QUARTER . "</td>\n";
688
    $row2 = "  <tr><td style=\"text-align: center; font-weight: bold;\">" . _AD_DON_GOAL . "</td>\n";
689
    $h = 0;
690
    do {
691
        $ord = $ordinaux[$h++];
692
        $row1 .= "    <td title='{$desc}' style='text-align: center;'>{$ord}</td>\n";
693
        $row2 .= "    <td title='{$desc}' style='text-align: center;'><input size=\"4\" name=\"var_quarter_goal-$row_Recordset1[subtype]\" type=\"text\" value=\"$row_Recordset1[value]\" onChange=\"return validInt(this,'$row_Recordset1[subtype] "._AD_DON_GOAL_DONATION."',1,'"._AD_DON_ALERTE_INPUT_NUMBER."');\" /></td>\n";
694
    } while ($row_Recordset1 = $xoopsDB->fetchArray($Recordset1));
695
    $row1 .= "  </tr>\n";
696
    $row2 .= "  </tr>\n";
697
    echo "{$row1} {$row2}";