$nbrpages)$end=$nbrpages;
// crée les tests de formulaire
$script = $script_test_form;
$script = str_replace("!!tests!!",
test_field_value_comp('form', 'page', GREATER, $nbrpages, $msg["page_too_high"]) ."\n".
test_field_value_comp('form', 'page', LESSER, 1, $msg["page_too_low"]),
$script);
$print = $script;
// affichage de la barre de navigation
$print .= "
\n";
// on fait suivre les variables d'environnement du portail
if($cms_active && strpos($url, 'javascript:') === false) {
$query = "select distinct var_name from cms_vars";
$result = pmb_mysql_query($query);
if(pmb_mysql_num_rows($result)){
while($row = pmb_mysql_fetch_object($result)){
$var_name = $row->var_name;
global ${$var_name};
if(!empty(${$var_name})) {
$url .= "&".$var_name."=".${$var_name};
}
}
}
}
$printurl = $url;
$printurl = str_replace("&page=!!page!!", "", $printurl);
$printurl = str_replace("page=!!page!!&", "", $printurl);
$printurl = str_replace("page=!!page!!", "", $printurl);
if($action) $printurl=$action;
$print .= "
\n";
$print .= "
\n";
return $print;
}
function printnavbar_onclick($page, $nbrpages, $url,$action='') {
global $script_test_form;
global $msg;
$page+= 0;
$precedente = $page-1;
$suivante = $page+1;
// affichage de la barre de navigation
$print = "\n";
$print .= "
\n";
$print .= "
\n";
return $print;
}