Code Duplication    Length = 5-7 lines in 3 locations

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) {

admin/validate_ads.php 1 location

@@ 136-142 (lines=7) @@
133
                       . $xoopsDB->escape($lid)
134
                       . ' ORDER BY date_added ASC limit 1';
135
            $resultp = $xoopsDB->query($sql);
136
            while (list($cod_img, $pic_lid, $uid_owner, $url) = $xoopsDB->fetchRow($resultp)) {
137
                if ($photo) {
138
                    $photo3 = "<a href='"
139
                              . XOOPS_URL
140
                              . '/modules/adslight/viewads.php?lid='
141
                              . $lid
142
                              . "'><img class=\"thumb\" src=\"$updir/thumbs/thumb_$url\" align=\"left\" width=\"100px\" alt=\"$title\"></a>";
143
                }
144
            }
145
            if ($photo > 0) {

members.php 1 location

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