Bonjour.

J'ai un système de pagination qui doit afficher 20 lignes par page.
Pour l'instant j'ai 20 enregistrements donc je devrais afficher [1] pour la pagination, mais j'ai [1] [2] et quand je clique sur [2] voilà le message d'arreur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
Warning: main(liste_films.php): failed to open stream: No such file or directory in c:\weblocal\sites\monsite\index.php on line 203
 
Warning: main(): Failed opening 'liste_films.php' for inclusion (include_path='.;C:\PROGRA~1\EASYPH~1\\php\pear\') in c:\weblocal\sites\monsite\index.php on line 203
je pense que ça vient du script mais je ne vois comment m'en sortir.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
	//déterminer la limit pour la paginiation
	(isset($_POST['from_limit']))?$from_limit=$_POST['from_limit']:$from_limit=0;
	$to_limit=20;
	$limit=" LIMIT $from_limit,$to_limit";
	// affichage d'origine : classé par titre ou sélection du tri par titre
	if (($tri == '') || ($tri == 'titre')){
		$sql = mysql_query("SELECT * FROM titres ORDER BY titre".$limit);
	}
	else if ($tri == 'date'){
		$sql = mysql_query("SELECT * FROM titres ORDER BY sortie".$limit);
	}
	// sélection du nombre total de films
	$sql_nb_films = mysql_query('SELECT count(titres.id_titre) as nb FROM titres');
	$nb_films  = mysql_result($sql_nb_films,0,"nb");
	//calcul du nombre de pages
	$num = $nb_films; // chiffre de depart
	$div = $to_limit; // le diviseur
	$division = $num/$div;  //la division
	$nb_pages = intval(abs($division)); //la partie entiere
	$reste = $num%$div;//le reste 
	if($reste > 0) $nb_pages = $nb_pages+1;
		//affichage des films
		$nbl = mysql_num_rows($sql);
		for ($i = 0; $i < $nbl; $i++)
		{
			$idtitre = mysql_result($sql,$i,"id_titre");
			$titre = stripslashes(htmlentities(trim(mysql_result($sql,$i,"titre"))));
			$date = mysql_result($sql,$i,"sortie");
			echo "</tr>";
		}
		?>
		<tr style="height:30px">
			<td colspan="6" align="center">
				<?php
				//pagination
				if($nb_pages > 1){
					for ($k = 1; $k <= $nb_pages; $k++){
						$j=$k-1;
						$from_limit_pagination=$j*$to_limit;
						if($from_limit_pagination==$from_limit){
							?>
							[<?php echo $k; ?>]
							<?php
						}
						else if($tri==""){
							?>
							<A href="#" onclick="affiche('<?php echo $from_limit_pagination; ?>')">[<?php echo $k; ?>]</A>
							<?php
						}
						else{
							?>
							<A href="#" onclick="tri('<?php echo $tri; ?>','<?php echo $from_limit_pagination; ?>')">[<?php echo $k; ?>]</A>
							<?php
						}
					}
				}
				?>
			</td>
		</tr>
Merci d'avance.