Code Duplication    Length = 21-22 lines in 2 locations

replies.php 1 location

@@ 130-151 (lines=22) @@
127
    //Calculates how many pages exist.  Which page one should be on, etc...
128
    $linkpages = ceil($trows / $show);
129
    //Page Numbering
130
    if ($linkpages != 1 && $linkpages != 0) {
131
        $prev = $min - $show;
132
        if ($prev >= 0) {
133
            $pagenav .= "<a href='replies.php?lid=$lid&min=$prev&show=$show'><strong><u>&laquo;</u></strong></a> ";
134
        }
135
        $counter     = 1;
136
        $currentpage = ($max / $show);
137
        while ($counter <= $linkpages) {
138
            $mintemp = ($show * $counter) - $show;
139
            if ($counter == $currentpage) {
140
                $pagenav .= "<strong>($counter)</strong> ";
141
            } else {
142
                $pagenav .= "<a href='replies.php?lid=$lid&min=$mintemp&show=$show'>$counter</a> ";
143
            }
144
            ++$counter;
145
        }
146
        if ($trows > $max) {
147
            $pagenav .= "<a href='replies.php?lid=$lid&min=$max&show=$show'>";
148
            $pagenav .= '<strong><u>&raquo;</u></strong></a>';
149
        }
150
        $xoopsTpl->assign('nav_page', '<strong>' . _ADSLIGHT_REPLY . "</strong>&nbsp;&nbsp; $pagenav");
151
    }
152
}
153
154
include XOOPS_ROOT_PATH . '/footer.php';

members.php 1 location

@@ 290-310 (lines=21) @@
287
    //Calculates how many pages exist.  Which page one should be on, etc...
288
    $linkpages = ceil($trows / $show);
289
    //Page Numbering
290
    if (1 != $linkpages && 0 != $linkpages) {
291
        $prev = $min - $show;
292
        if ($prev >= 0) {
293
            $pagenav .= "<a href='members.php?usid=$usid&min=$prev&show=$show'><strong><u>&laquo;</u></strong></a> ";
294
        }
295
        $counter     = 1;
296
        $currentpage = ($max / $show);
297
        while ($counter <= $linkpages) {
298
            $mintemp = ($show * $counter) - $show;
299
            if ($counter == $currentpage) {
300
                $pagenav .= "<strong>($counter)</strong> ";
301
            } else {
302
                $pagenav .= "<a href='members.php?usid=$usid&min=$mintemp&show=$show'>$counter</a> ";
303
            }
304
            ++$counter;
305
        }
306
        if ($trows > $max) {
307
            $pagenav .= "<a href='members.php?usid=$usid&min=$max&show=$show'>";
308
            $pagenav .= '<strong><u>&raquo;</u></strong></a>';
309
        }
310
        $xoopsTpl->assign('nav_page', '<strong>' . _ADSLIGHT_PAGES . "</strong>&nbsp;&nbsp; $pagenav");
311
    }
312
}
313