loader

osório

todas as notícias

$pages or $pages == 1) return '
  • 1 de 1
'; if($total_regs > $regs) @mysql_data_seek($rst,$regs * ($pag_atual - 1)); $url = $_SERVER["QUERY_STRING"].array2query($_POST); $url = preg_replace("/[a-z0-9_\-]+\=\&/i","",$url); if($extra!=""){ session_start(); $extra = preg_replace("/^&?(.*?)&?$/","&\\1",$extra); $url = str_replace($_SESSION["qrystr"],"",$url) & $extra; $_SESSION["qrystr"] = $extra; } $url = $_SERVER["PHP_SELF"]."?".preg_replace("/&?pag=\d*/","",$url); $url = preg_replace(array("/\?&+/","/&+/"),array("?","&"),"$url&pag"); $ini = ($pages > 5) ? (floor(($pag_atual - 1) / 5) * 5) + 1 : 1; $fim = ($pages >= ($ini + 5)) ? $ini + 5 : $pages + 1; $saida = '
    '; if($pag_atual!=1){ $pag_ant = $pag_atual - 1; $saida .= ""; } else { $saida .= ""; } $saida .= "
  • {$pag_atual} de {$pages}
  • "; if($pag_atual!=$pages){ $pag_seg = $pag_atual + 1; $saida .= ""; } else { $saida .= ''; } $saida .= '
'; return $saida; } function array2query($arr){ $qs = ""; while(list($key, $val) = each($arr)) $qs .= "&$key=$val"; return $qs; } ?>