Code Duplication    Length = 5-5 lines in 3 locations

admin/index.php 3 locations

@@ 1618-1622 (lines=5) @@
1615
    $mostreadedauthors = $stats['mostreadedauthors'];
1616
    echo "<div class='center;'><b>" . _AM_NEWS_STATS10 . '</b><br><br>' . _AM_NEWS_STATS7 . "<br>\n";
1617
    echo "<table border='0' width='100%'><tr class='bg3'><th>" . _AM_POSTER . '</th><th>' . _NW_VIEWS . "</th></tr>\n";
1618
    foreach ($mostreadedauthors as $uid => $reads) {
1619
        $url   = XOOPS_URL . '/userinfo.php?uid=' . $uid;
1620
        $class = ('even' === $class) ? 'odd' : 'even';
1621
        printf("<tr class='" . $class . "'><td align='left'><a href='%s' target ='_blank'>%s</a></td><td align='right'>%u</td></tr>\n", $url, $myts->htmlSpecialChars($news->uname($uid)), $reads);
1622
    }
1623
    echo '</table>';
1624
1625
    // b) Best rated authors
@@ 1629-1633 (lines=5) @@
1626
    $bestratedauthors = $stats['bestratedauthors'];
1627
    echo '<br><br>' . _AM_NEWS_STATS8;
1628
    echo "<table border='0' width='100%'><tr class='bg3'><th>" . _AM_POSTER . '</th><th>' . _NW_RATING . "</th></tr>\n";
1629
    foreach ($bestratedauthors as $uid => $rating) {
1630
        $url   = XOOPS_URL . '/userinfo.php?uid=' . $uid;
1631
        $class = ('even' === $class) ? 'odd' : 'even';
1632
        printf("<tr class='" . $class . "'><td align='left'><a href='%s' target ='_blank'>%s</a></td><td align='right'>%u</td></tr>\n", $url, $myts->htmlSpecialChars($news->uname($uid)), $rating);
1633
    }
1634
    echo '</table>';
1635
1636
    // c) Biggest contributors
@@ 1640-1644 (lines=5) @@
1637
    $biggestcontributors = $stats['biggestcontributors'];
1638
    echo '<br><br>' . _AM_NEWS_STATS9;
1639
    echo "<table border='0' width='100%'><tr class='bg3'><th>" . _AM_POSTER . '</th><th>' . _AM_NEWS_STATS11 . "</th></tr>\n";
1640
    foreach ($biggestcontributors as $uid => $count) {
1641
        $url   = XOOPS_URL . '/userinfo.php?uid=' . $uid;
1642
        $class = ('even' === $class) ? 'odd' : 'even';
1643
        printf("<tr class='" . $class . "'><td align='left'><a href='%s' target ='_blank'>%s</a></td><td align='right'>%u</td></tr>\n", $url, $myts->htmlSpecialChars($news->uname($uid)), $count);
1644
    }
1645
    echo '</table></div><br>';
1646
}
1647