Code Duplication    Length = 11-11 lines in 2 locations

topstud.php 1 location

@@ 67-77 (lines=11) @@
64
    }
65
}
66
//create numbers
67
for ($x = 1; $x < ($numpages + 1); ++$x) {
68
    //create line break after 20 number
69
    if (($x % 20) == 0) {
70
        $pages .= '<br />';
71
    }
72
    if ($x != $cpage) {
73
        $pages .= "<a href=\"topstud.php?com=" . $com . '&st=' . ($perp * ($x - 1)) . "\">" . $x . '</a>&nbsp;&nbsp;';
74
    } else {
75
        $pages .= $x . '&nbsp;&nbsp';
76
    }
77
}
78
//create next button
79
if ($numpages > 1) {
80
    if ($cpage < $numpages) {

virtual.php 1 location

@@ 84-94 (lines=11) @@
81
        }
82
        //create numbers
83
        $xLimit = $numpages + 1;
84
        for ($x = 1; $x < $xLimit; ++$x) {
85
            //create line break after 20 number
86
            if (($x % 20) == 0) {
87
                $pages .= '<br />';
88
            }
89
            if ($x != $cpage) {
90
                $pages .= "<a href=\"virtual.php?r=1&l=" . $l . '&st=' . ($perp * ($x - 1)) . "\">" . $x . '</a>&nbsp;&nbsp;';
91
            } else {
92
                $pages .= $x . '&nbsp;&nbsp';
93
            }
94
        }
95
        //create next button
96
        if ($numpages > 1) {
97
            if ($cpage < $numpages) {