0) $clause.= " and num_classement='$id_classement' " ; if(!$nbr_lignes) { $requete = "SELECT COUNT(1) FROM equations $clause "; $res = mysql_query($requete, $dbh); $nbr_lignes = @mysql_result($res, 0, 0); } if (!$page) $page=1; $debut = ($page-1)*$nb_per_page; if($nbr_lignes) { // on lance la vraie requête $requete = "SELECT id_equation, nom_equation, comment_equation, num_classement FROM equations $clause ORDER BY nom_equation, id_equation LIMIT $debut,$nb_per_page "; $res = @mysql_query($requete, $dbh); $parity = 0; while(($equa=mysql_fetch_object($res))) { if ($parity % 2) $pair_impair = "even"; else $pair_impair = "odd"; $tr_javascript=" onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='$pair_impair'\" onmousedown=\"document.location='./dsi.php?categ=equations&sub=gestion&id_equation=$equa->id_equation&suite=acces';\" "; $requete_cla = "SELECT id_classement, nom_classement FROM classements where id_classement='$equa->num_classement' and type_classement='EQU' "; $res_cla = mysql_query($requete_cla, $dbh); if (mysql_num_rows($res_cla)) { $cla=mysql_fetch_object($res_cla) ; $lib = $cla->nom_classement ; } else $lib=""; $equation_list .= ""; $equation_list .= " $equa->nom_equation
($equa->comment_equation) $lib "; $parity += 1; } mysql_free_result($res); // affichage de la barre de navig $url_base = "$PHP_SELF?categ=equations&suite=search&form_cb=".rawurlencode($form_cb)."&id_classement=$id_classement" ; $nav_bar = aff_pagination ($url_base, $nbr_lignes, $nb_per_page, $page, 10, false, true) ; $dsi_list_tmpl = str_replace("!!cle!!", $form_cb, $dsi_list_tmpl); $dsi_list_tmpl = str_replace("!!list!!", $equation_list, $dsi_list_tmpl); $dsi_list_tmpl = str_replace("!!nav_bar!!", $nav_bar, $dsi_list_tmpl); $dsi_list_tmpl = str_replace("!!message_trouve!!", $msg['dsi_equ_trouvees'], $dsi_list_tmpl); return $dsi_list_tmpl; } else return $msg['dsi_no_equation']; }