Code Duplication    Length = 5-5 lines in 2 locations

admin/main.php 2 locations

@@ 306-310 (lines=5) @@
303
    $sql = sprintf('SELECT u.uid, u.uname, u.name, (s.responseTime / s.ticketsResponded) as AvgResponseTime FROM %s u INNER JOIN %s s ON u.uid = s.uid WHERE ticketsResponded > 0 ORDER BY AvgResponseTime', $xoopsDB->prefix('users'), $xoopsDB->prefix('xhelp_staff'));
304
    $ret = $xoopsDB->query($sql, MAX_STAFF_RESPONSETIME);
305
    $i = 0;
306
    while (list($uid, $uname, $name, $avgResponseTime) = $xoopsDB->fetchRow($ret)) {
307
        $class = $table_class[$i % 2];
308
        echo "<tr class='$class'><td>". xhelpGetDisplayName($displayName, $name,$uname) ."</td><td align='right'>". xhelpFormatTime($avgResponseTime) ."</td></tr>";
309
        $i++;
310
    }
311
    echo "</table></div><br />"; // End inner top-left cell
312
    echo "</td></tr><tr><td valign='top'>"; // End first, start second cell
313
@@ 339-343 (lines=5) @@
336
            echo "<table border='0' width='100%' cellspacing='1' class='outer'>
337
                  <tr><th colspan='2'>". _AM_XHELP_TEXT_RESPONSE_TIME_SLOW ."</th></tr>";
338
            $i = 0;
339
            while (list($uid, $uname, $name, $avgResponseTime) = $xoopsDB->fetchRow($ret)) {
340
                $class = $table_class[$i % 2];
341
                echo "<tr class='$class'><td>". xhelpGetDisplayName($displayName, $name,$uname) ."</td><td align='right'>". xhelpFormatTime($avgResponseTime) ."</td></tr>";
342
                $i++;
343
            }
344
            echo "</table></div>";  // End first cell, second row of inner table
345
        }
346
    }