Code Duplication    Length = 5-7 lines in 3 locations

admin/validate_ads.php 1 location

@@ 125-131 (lines=7) @@
122
                       . $xoopsDB->escape($lid)
123
                       . ' ORDER BY date_added ASC limit 1';
124
            $resultp = $xoopsDB->query($sql);
125
            while (list($cod_img, $pic_lid, $uid_owner, $url) = $xoopsDB->fetchRow($resultp)) {
126
                if ($photo) {
127
                    $photo3 = "<a href='"
128
                              . XOOPS_URL
129
                              . '/modules/adslight/viewads.php?lid='
130
                              . $lid
131
                              . "'><img class=\"thumb\" src=\"$updir/thumbs/thumb_$url\" align=\"left\" width=\"100px\" alt=\"$title\"></a>";
132
                }
133
            }
134
            if ($photo > 0) {

admin/view_ads.php 1 location

@@ 125-131 (lines=7) @@
122
                       . $xoopsDB->escape($lid)
123
                       . ' ORDER BY date_added ASC LIMIT 1';
124
            $resultp = $xoopsDB->query($sql);
125
            while (list($cod_img, $pic_lid, $uid_owner, $url) = $xoopsDB->fetchRow($resultp)) {
126
                if ($photo) {
127
                    $photo3 = "<a href='"
128
                              . XOOPS_URL
129
                              . '/modules/adslight/viewads.php?lid='
130
                              . $lid
131
                              . "'><img class=\"thumb\" src=\"$updir/thumbs/thumb_$url\" align=\"left\" width=\"100px\" alt=\"$title\"></a>";
132
                }
133
            }
134
            if ($photo > 0) {

members.php 1 location

@@ 235-239 (lines=5) @@
232
                   . $xoopsDB->escape($lid)
233
                   . ' ORDER BY date_added ASC limit 1';
234
        $resultp = $xoopsDB->query($sql);
235
        while (list($cod_img, $pic_lid, $uid_owner, $url) = $xoopsDB->fetchRow($resultp)) {
236
            if ($photo) {
237
                $photo = "<a href='viewads.php?lid=" . $lid . "'><img class=\"thumb\" src=\"$updir/thumbs/thumb_$url\" align=\"left\" width=\"100px\" alt=\"$title\" /></a>";
238
            }
239
        }
240
        $no_photo = "<a href='viewads.php?lid=" . $lid . "'><img class=\"thumb\" src=\"assets/images/nophoto.jpg\" align=\"left\" width=\"100px\" alt=\"$title\" /></a>";
241
242
        $xoopsTpl->append('items', array(