Code Duplication    Length = 15-16 lines in 2 locations

admin/main.php 1 location

@@ 65-79 (lines=15) @@
62
    ///////// Il y a [..] Annonces en attente d'être approuvées //////
63
    $result  = $xoopsDB->query('SELECT lid FROM ' . $xoopsDB->prefix('adslight_listing') . " WHERE valid='No'");
64
    $numrows = $xoopsDB->getRowsNum($result);
65
    if ($numrows > 0) {
66
        echo "<table class='outer' border=0 cellspacing=5 cellpadding=0><tr><td width=40>";
67
        echo "<img src='../assets/images/admin/error_button.png' border=0 /></td><td>";
68
        echo "<font color=\"#00B4C4\"><b>" . _AM_ADSLIGHT_THEREIS . "</b></font> <b>$numrows</b> <font color=\"#00B4C4\">" . _AM_ADSLIGHT_WAIT . '</b></font>';
69
        echo '</td></tr></table><br>';
70
    } else {
71
        echo "<table class='outer' width='50%' border='0'><tr><td width=40>";
72
        echo "<img src='../assets/images/admin/search_button_green_32.png' border=0 alt=\"._AM_ADSLIGHT_RELEASEOK.\" /></td><td>";
73
        echo "<font color='#00B4C4'><b>" . _AM_ADSLIGHT_NOANNVAL . '</b></font>';
74
        echo '</td></tr></table><br>';
75
    }
76
77
    //// Center menu
78
79
    /// Annonces
80
81
    echo '<table width="50%" border="0" class="outer">
82
                  <tr><th align="left">' . _AM_ADSLIGHT_ADSMENU_TITLE . '</th></tr>

admin/modify_ads.php 1 location

@@ 77-92 (lines=16) @@
74
                               . $xoopsDB->prefix('adslight_listing')
75
                               . " WHERE valid='no' ORDER BY lid");
76
    $numrows = $xoopsDB->getRowsNum($result);
77
    if ($numrows > 0) {
78
79
        ///////// Il y a [..] Annonces en attente d'être approuvées //////
80
        echo "<table class='outer' border=0 cellspacing=5 cellpadding=0><tr><td width=40>";
81
        echo "<img src='../assets/images/admin/error_button.png' border=0 /></td><td>";
82
        echo "<font color=\"#00B4C4\"><b>" . _AM_ADSLIGHT_THEREIS . "</b></font> <b>$numrows</b> <font color=\"#00B4C4\">" . _AM_ADSLIGHT_WAIT . '</b></font>';
83
        echo '</td></tr></table><br>';
84
    } else {
85
        echo "<table class='outer' width='50%' border='0'><tr><td width=40>";
86
        echo "<img src='../assets/images/admin/search_button_green_32.png' border=0 alt=\"._AM_ADSLIGHT_RELEASEOK.\" /></td><td>";
87
        echo "<font color='#00B4C4'><b>" . _AM_ADSLIGHT_NOANNVAL . '</b></font>';
88
        echo '</td></tr></table><br>';
89
    }
90
91
    // Modify Annonces
92
    list($numrows) = $xoopsDB->fetchRow($xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('adslight_listing') . ''));
93
    if ($numrows > 0) {
94
        echo "<table width='100%' border='0' class='outer'><tr class='bg4'><td valign='top'>";
95
        echo "<form method=\"post\" action=\"modify_ads.php\">"