                    $p = $vars['paging'] - (ceil($maxpage / 2) - 1);
                    $limit = $curr + ceil($maxpage / 2) - 1;
                    // echo "more maxpage";
                } else {
                    $p = $vars['paging'] - (ceil($maxpage / 2) - 1);
                    $limit = $curr + floor($maxpage / 2);
                }

                for ($i = $p; $i <= $limit /*ceil($total/$vars['max'])+1*/; ++$i) {
                    # code...
                    if ($smart == true) {
                        $url = $vars['url'].'/paging/'.$i;
                    } else {
                        $url = $vars['url'].'&paging='.$i;
                    }
                    if ($vars['paging'] == $i) {
                        $sel = 'class="active"';
                    } else {
                        $sel = '';
                    }
                    $r .= "<li {$sel}><a href=\"{$url}\">$i</a></li>";
                }
                $r .= '</ul>';
            } elseif (isset($vars['type']) && $vars['type'] == 'pager') { // PAGER
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.