Esempio n. 1
0
function mso_current_paged($next = 'next')
{
    global $MSO;
    $uri = mso_current_url(false, true);
    // это чтобы нумерация совпадала с $MSO->data['uri_segment'] с 1
    array_unshift($uri, '');
    unset($uri[0]);
    if ($n = mso_array_get_key_value($uri, $next)) {
        if (isset($uri[$n + 1])) {
            $n = (int) $uri[$n + 1];
        } else {
            $n = 1;
        }
        if ($n > 0) {
            $current_paged = $n;
        } else {
            $current_paged = 1;
        }
    } else {
        $current_paged = 1;
    }
    return $current_paged;
}
Esempio n. 2
0
function mso_current_paged($next = 'next')
{
    global $MSO;
    $uri = $MSO->data['uri_segment'];
    if ($n = mso_array_get_key_value($uri, $next)) {
        if (isset($uri[$n + 1])) {
            $n = (int) $uri[$n + 1];
        } else {
            $n = 1;
        }
        if ($n > 0) {
            $current_paged = $n;
        } else {
            $current_paged = 1;
        }
    } else {
        $current_paged = 1;
    }
    return $current_paged;
}