Code Duplication    Length = 21-22 lines in 2 locations

members.php 1 location

@@ 306-326 (lines=21) @@
303
    //Calculates how many pages exist.  Which page one should be on, etc...
304
    $linkpages = ceil($trows / $show);
305
    //Page Numbering
306
    if ($linkpages != 1 && $linkpages != 0) {
307
        $prev = $min - $show;
308
        if ($prev >= 0) {
309
            $pagenav .= "<a href='members.php?usid=$usid&min=$prev&show=$show'><strong><u>&laquo;</u></strong></a> ";
310
        }
311
        $counter     = 1;
312
        $currentpage = ($max / $show);
313
        while ($counter <= $linkpages) {
314
            $mintemp = ($show * $counter) - $show;
315
            if ($counter == $currentpage) {
316
                $pagenav .= "<strong>($counter)</strong> ";
317
            } else {
318
                $pagenav .= "<a href='members.php?usid=$usid&min=$mintemp&show=$show'>$counter</a> ";
319
            }
320
            ++$counter;
321
        }
322
        if ($trows > $max) {
323
            $pagenav .= "<a href='members.php?usid=$usid&min=$max&show=$show'>";
324
            $pagenav .= '<strong><u>&raquo;</u></strong></a>';
325
        }
326
        $xoopsTpl->assign('nav_page', '<strong>' . _ADSLIGHT_PAGES . "</strong>&nbsp;&nbsp; $pagenav");
327
    }
328
}
329

replies.php 1 location

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