Code Duplication    Length = 5-5 lines in 4 locations

admin/index.php 4 locations

@@ 54-58 (lines=5) @@
51
//create info block
52
$indexAdmin->addInfoBox(_AM_SPARTNER_INVENTORY);
53
54
if ($totalsubmitted > 0) {
55
    $indexAdmin->addInfoBoxLine(_AM_SPARTNER_INVENTORY, '<infolabel>' . '<a href="category.php">' . _AM_SPARTNER_TOTAL_SUBMITTED . '</a><b>' . '</infolabel>', $totalsubmitted, 'Green');
56
} else {
57
    $indexAdmin->addInfoBoxLine(_AM_SPARTNER_INVENTORY, '<infolabel>' . _AM_SPARTNER_TOTAL_SUBMITTED . '</infolabel>', $totalsubmitted, 'Green');
58
}
59
if ($totalactive > 0) {
60
    $indexAdmin->addInfoBoxLine(_AM_SPARTNER_INVENTORY, '<infolabel>' . '<a href="partner.php">' . _AM_SPARTNER_TOTAL_ACTIVE . '</a><b>' . '</infolabel>', $totalactive, 'Green');
61
} else {
@@ 59-63 (lines=5) @@
56
} else {
57
    $indexAdmin->addInfoBoxLine(_AM_SPARTNER_INVENTORY, '<infolabel>' . _AM_SPARTNER_TOTAL_SUBMITTED . '</infolabel>', $totalsubmitted, 'Green');
58
}
59
if ($totalactive > 0) {
60
    $indexAdmin->addInfoBoxLine(_AM_SPARTNER_INVENTORY, '<infolabel>' . '<a href="partner.php">' . _AM_SPARTNER_TOTAL_ACTIVE . '</a><b>' . '</infolabel>', $totalactive, 'Green');
61
} else {
62
    $indexAdmin->addInfoBoxLine(_AM_SPARTNER_INVENTORY, '<infolabel>' . _AM_SPARTNER_TOTAL_ACTIVE . '</infolabel>', $totalactive, 'Green');
63
}
64
if ($totalrejected > 0) {
65
    $indexAdmin->addInfoBoxLine(_AM_SPARTNER_INVENTORY, '<infolabel>' . '<a href="main.php">' . _AM_SPARTNER_TOTAL_REJECTED . '</a><b>' . '</infolabel>', $totalrejected, 'Green');
66
} else {
@@ 64-68 (lines=5) @@
61
} else {
62
    $indexAdmin->addInfoBoxLine(_AM_SPARTNER_INVENTORY, '<infolabel>' . _AM_SPARTNER_TOTAL_ACTIVE . '</infolabel>', $totalactive, 'Green');
63
}
64
if ($totalrejected > 0) {
65
    $indexAdmin->addInfoBoxLine(_AM_SPARTNER_INVENTORY, '<infolabel>' . '<a href="main.php">' . _AM_SPARTNER_TOTAL_REJECTED . '</a><b>' . '</infolabel>', $totalrejected, 'Green');
66
} else {
67
    $indexAdmin->addInfoBoxLine(_AM_SPARTNER_INVENTORY, '<infolabel>' . _AM_SPARTNER_TOTAL_REJECTED . '</infolabel>', $totalrejected, 'Green');
68
}
69
if ($totalinactive > 0) {
70
    $indexAdmin->addInfoBoxLine(_AM_SPARTNER_INVENTORY, '<infolabel>' . '<a href="main.php">' . _AM_SPARTNER_TOTAL_INACTIVE . '</a><b>' . '</infolabel>', $totalinactive, 'Green');
71
} else {
@@ 69-73 (lines=5) @@
66
} else {
67
    $indexAdmin->addInfoBoxLine(_AM_SPARTNER_INVENTORY, '<infolabel>' . _AM_SPARTNER_TOTAL_REJECTED . '</infolabel>', $totalrejected, 'Green');
68
}
69
if ($totalinactive > 0) {
70
    $indexAdmin->addInfoBoxLine(_AM_SPARTNER_INVENTORY, '<infolabel>' . '<a href="main.php">' . _AM_SPARTNER_TOTAL_INACTIVE . '</a><b>' . '</infolabel>', $totalinactive, 'Green');
71
} else {
72
    $indexAdmin->addInfoBoxLine(_AM_SPARTNER_INVENTORY, '<infolabel>' . _AM_SPARTNER_TOTAL_INACTIVE . '</infolabel>', $totalinactive, 'Green');
73
}
74
//---------------------
75
76
foreach (array_keys($folder) as $i) {