Bonjour à vous tous,
Je travaille et fignole un code depuis un bout et j'ai un problème avec la pagination qui ne veux pas me démontrer quel page est sélectionner, exemple en avoir son numéro en gras.

En espèrant que quelqu'un peut m'aider...
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
 
 
 
 
<?php
 
$image_counter = -1;
$row_counter = 0;
$cell_counter = 0;
$i=0;
$show=array('.jpg','.JPG','.gif','.GIF');
 
$val= $_GET['folder'];
$val1 = $_GET['folder'];
$val0 = $val1;
$val.="/";
 
$path = "$val";
$path2 = str_replace("Pic-S", "Pic-B", $val);
$dirshort = substr($val,20);
$dirshort0 = $val1;
 
$comicon = "../Muraille/Change-comment-icon/comment_icon_change.txt";
$fh1 = fopen($comicon, 'r');
$outputt1 = fgets($fh1);
$output1 = str_replace("../..", "../", $outputt1 );
fclose($fh1);
 
 
 
$dir_handle = @opendir($path) or die("Unable to open $path");
$image_table = "\n<tr><td bgcolor=\"#cccccc\" align=\"center\" colspan=\"3\"  width=\"100%\"><table valign=\"top\" align=\"center\" width=\"100%\" border=\"0\" cellspacing=\"0\">\n";
while (false !== ($file = readdir($dir_handle))) {
    if($file != "." && $file != "..") {
	echo"";
	}
  if(in_array(substr($file,-4,4),$show)){
        if(!(($image_counter + 1) % 3)){
          $row_counter++;
        }
 
 
$newpath0 = substr($file,0,-4);
$newpath00 = substr($file,0,-4);
 
 
 
 
      $image_table_arr[$i] .=(($image_counter + 1) % 3)? "" : "</tr>\n<tr><td><br></td></tr><tr valign=\"top\">";
 
      $image_table_arr[$i] .= "\n<td valign=\"top\" width=\"240\"><table width=\"240\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" align=\"center\">\n";
      $image_table_arr[$i] .= "\n<tr><td valign=\"top\" bgcolor=\"#ffff00\" width=\"240\"><table width=\"240\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\" align=\"center\">\n";
      $image_table_arr[$i] .= "\n<tr><td valign=\"top\" bgcolor=\"#003366\" width=\"240\"><table width=\"240\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\" align=\"center\">\n";
      $image_table_arr[$i] .= "\n<tr><td bgcolor=\"#000033\" align=\"center\"width=\"240\"><b>$newpath0</b></td></tr>\n";
      $image_table_arr[$i] .= "\n<tr><td bgcolor=\"#000000\" width=\"240\"><a href='$path2$file' target='_blank' rel=\"thumbnail\"><img src=\"$path$file\" width=\"240\" border=\"0\"></a></td></tr>\n";
      $image_table_arr[$i] .= "\n<tr><td bgcolor=\"#000033\" align=\"center\" width=\"240\"><IMG SRC=\"minus.gif\" CLASS=\"showstate\" ONCLICK=\"expandcontent(this, 'sc".$newpath0."')\" align=\"right\"><b>Information</b></td></tr>\n";
      $image_table_arr[$i] .= "\n</table>\n";
      $image_table_arr[$i] .= "\n<div id=\"sc".$newpath0."\" class=\"switchcontent\" width=\"240\">\n";
      $image_table_arr[$i] .= "\n<table border=0 align=center cellspacing=0 cellpading=0 width=\"240\">\n";
      $image_table_arr[$i] .= "\n<tr><td bgcolor=\"#ffffff\" align=\"left\" class=\"black0\" width=\"240\"><b class=\"black0\" width=\"240\">Description :<br></b>\n";
	  $image_table_arr[$i] .= file_get_contents ("Pictures/Pics/Commentaires/$newpath0.txt");
	  $image_table_arr[$i] .= "</td></tr>\n";
      $image_table_arr[$i] .= "\n<tr><td bgcolor=\"#ffffff\" align=\"left\" class=\"black0\" width=\"240\"><br></td></tr>\n";
      $image_table_arr[$i] .= "\n<tr><td valign=\"top\" bgcolor=\"#ffffff\" width=\"240\"><table width=\"240\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\" align=\"center\">\n";
      $image_table_arr[$i] .= "<tr><td bgcolor=\"#ffffff\" align=\"left\" width=\"240\" valign=\"top\"><a href=\"rater0.php?var1=$newpath0&var00=$path$file\" target=\"autre\" title=\"Rate it! - Noter la !\" alt=\"Rate it!\" class=\"black000\"><script type=\"text/javascript\">ajaxinclude(\"rater1.php?var1=$newpath0&var00=$path$file\")</script></a></td>";
      $image_table_arr[$i] .= "\n<td bgcolor=\"#ffffff\" align=\"center\" class=\"black0\" width=\"240\" colspan=\"2\">\n";
	  $image_table_arr[$i] .= file_get_contents ("Pictures/Pics/Vente/$newpath0.txt");
      $image_table_arr[$i] .= "\n</table>\n";
      $image_table_arr[$i] .= "\n<tr><td valign=\"top\" bgcolor=\"#ffffff\" width=\"240\"><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\n";
      $image_table_arr[$i] .= "\n<tr><td bgcolor=\"#ffffff\" align=\"center\" width=\"240\"><a href=\"commentaires.php?var001=$newpath0&var002=$path$file\" target=\"autre\" title=\"Add comments - Ajout de commentaires.\" alt=\"Add comments - Ajout de commentaires\" class=\"white000\"><img src=\"".$output1."\" border=\"0\"></a></td>";
      $image_table_arr[$i] .= "</td></tr>\n";
      $image_table_arr[$i] .= "\n</table>\n";
      $image_table_arr[$i] .= "\n</div>\n";
      $image_table_arr[$i] .= "\n</table>\n";
      $image_table_arr[$i] .= "\n</table>\n";
      $image_table_arr[$i] .= "\n</table></td>\n\n\n";
      $i++;
      ++$image_counter;
      ++$cell_counter;
  }
}
$no_of_images = count($image_table_arr);
$colspan= ($row_counter * 3) - $cell_counter;
 
 
 
$to = 12;
if(isset($_GET['from']))
    $from = $_GET['from'];
else
    $from = -$no_of_images;
$from000 = substr($from, -1);
 
error_reporting(E_ALL);
ini_set('display_errors','Off');
$path4 = substr($path,24);
 
 
$i1 = $i+1;
$image_table_arr= array_slice($image_table_arr, $from, $to) or exit("<center><b> - No photo in this folder : ($path4) for now. <br><br>- Pas de photo dans ce dossier : ($path4) pour le moment.<br><br></b></center></table></table></div><!--content goes here --><b class=\"rbottom\"><b class=\"r4\"></b> <b class=\"r3\"></b> <b class=\"r2\"></b> <b class=\"r1\"></b></b></div></center>");
$image_table .= "\n<tr><td valign=\"top\" width=\"100%\" colspan=\"3\" ><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\n";
$image_table .= "\n<tr><td bgcolor=\"#000033\" class=\"white00\" width=\"680\" align=\"left\"><b class=\"white00\">Photos in - Photos dans :</b> $dirshort ";
$image_table .= "\n</td>";
$image_table .= "\n    <td bgcolor=\"#000033\" align=\"right\"  width=\"100\"><div class=\"Slideshow\"><a href=\"javascript:void(viewer.show(0))\">Slideshow</a></div></td></tr>\n";
$image_table .= "\n</td></tr>\n";
$image_table .= "\n<tr><td bgcolor=\"#cccccc\" class=\" white00\" align=\"right\" colspan=\"3\">\n";
$image_table .= "<script type=\"text/javascript\">ajaxinclude(\"../Muraille/Change-shoppingcart-button/change_shoppingcart_button.txt\")</script>";
$image_table .= "\n</td></tr>\n";
$image_table .= "\n<tr>\n";
$image_table .= "\n</table>\n";
 
 
// split page numericly
$image_table .= "\n<tr><td bgcolor=\"#cccccc\" align=\"center\" class=\"black002\" colspan=\"3\" width=\"100%\"><b class='black002'>Page : </b>";
$paginate = ceil($no_of_images/$to);
 
 
 
 
for ($i=0;$i<$paginate;$i++)
{
    $from_val = $no_of_images-($to*$i);
$image_table .= "<a href='".$_SERVER['PHP_SELF']."?folder=$val1&from=-".$from_val."' >".($i+1)."</a>&nbsp;-&nbsp;";
 
}
 
echo '</td></tr>'.$image_table.''.implode("",$image_table_arr);
$image_table1 .= "</tr>\n\n";
$image_table1 .="<tr><td bgcolor=\"#cccccc\" align=\"center\" class=\"black002\" colspan=\"3\" width=\"780\"><br><b class='black002'>Page : </b>"; // split page numericly
for ($i=0;$i<$paginate;$i++)
{
    $from_val = $no_of_images-($to*$i);
 
$image_table1 .= "<a href='".$_SERVER['PHP_SELF']."?folder=$val1&from=-".$from_val."' >".($i+1)."</a>&nbsp;-&nbsp;";
 
}
 
echo '<tr><td  bgcolor="#cccccc" valign="top"><br><br></td></tr></table>'.$image_table1;
 
 
 
?>

Merci !
Bonne journée !