Bonjour

Voila j'essaie d'afficher un nombre d'images par pages mais cela n'a pas l'air de fonctionner car il y a qu'une seule image qui s'affiche au lieu de six qui sont dans ma bdd. donc si une ame charitable pouvait m'aider se serais gentil

Voici mes fichiers et quelle erreur je fais
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<?php 
 
require('header.php');
loadLanguage('lang-download');
 
loggedonly();
 
 
$template->set_filenames(array('download' => 'download.tpl'));
if($CURUSER["view_download"]=="no")
		autolink("index.php", "".DOWN_NOT_PERMISSION."");
 
//get http vars
$addparam = "";
$wherea = array();
$wherea[] = "online = 'yes'";
if ($CURUSER["view_xxx"] != "yes") {
$wherea[] = "category != '20'"; }
$thisurl = "download.php?";
 
if ($_GET["cat"]) {
	$wherea[] = "category = " . sqlesc($_GET["cat"]);
	$addparam .= "cat=" . urlencode($_GET["cat"]) . "&amp;";
	$thisurl .= "cat=".urlencode($_GET["cat"])."&";
}
 
if ($_GET["parent_cat"]) {
	$addparam .= "parent_cat=" . urlencode($_GET["parent_cat"]) . "&amp;";
	$thisurl .= "parent_cat=".urlencode($_GET["parent_cat"])."&";
	$wherea[] = "categories.parent_cat=".sqlesc($_GET["parent_cat"]);
}
 
$parent_cat = unesc($_GET["parent_cat"]);
$category = (int) $_GET["cat"];
 
$where = implode(" AND ", $wherea);
 
$wherecatina = array();
$wherecatin = "";
$res = mysql_query("SELECT id FROM categories");
while($row = mysql_fetch_assoc($res)){
    if ($_GET["c$row[id]"]) {
        $wherecatina[] = $row[id];
        $addparam .= "c$row[id]=1&amp;";
        $thisurl .= "c$row[id]=1&amp;";
    }
    $wherecatin = implode(", ", $wherecatina);
}
 
if ($wherecatin)
	$where .= ($where ? " AND " : "") . "category IN(" . $wherecatin . ")";
 
if ($where != "")
	$where = "WHERE $where";
 
if ($_GET["sort"] || $_GET["order"]) {
 
	switch ($_GET["sort"]) {
		case 'name': $sort = "download.name"; $addparam .= "sort=name&"; break;
		case 'comments': $sort = "download.comments"; $addparam .= "sort=comments&"; break;
		default: $sort = "download.id";
	}
 
	if ($_GET["order"] == "asc" || ($_GET["sort"] != "id" && !$_GET["order"])) {
		$sort .= " ASC";
		$addparam .= "order=asc&";
	} else {
		$sort .= " DESC";
		$addparam .= "order=desc&";
	}
 
	$orderby = "ORDER BY $sort";
 
	}else{
		$orderby = "ORDER BY download.added DESC";
		$_GET["sort"] = "added";
		$_GET["order"] = "desc";
	}
 
//Get Total For Pager
$res = mysql_query("SELECT COUNT(*) FROM download LEFT JOIN categories ON category = categories.id $where $parent_check") or die(mysql_error());
 
$row = mysql_fetch_array($res);
$count = $row[0];
 
//get sql info
if ($count) {
	list($pagertop, $pagerbottom, $limit) = pager(20, $count, "download.php?" . $addparam);
	$query = "SELECT download.id, download.banned, download.name, download.owner, download.numratings, download.descr, download.online, download.added, download.edit_by, download.comments, download.views, download.hits, download.id, download.image1, download.link, download.tags, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, IF(download.numratings < 2, NULL, ROUND(download.ratingsum / download.numratings, 1)) AS rating FROM download LEFT JOIN categories ON category = categories.id LEFT JOIN users ON download.owner = users.id $where $parent_check $orderby $limit";
	$res = mysql_query($query) or die(mysql_error());
}else{
	unset($res);
}
 
$expire = 7200; // Time in seconds
 
if (is_valid_id($_GET["page"]))
	$thisurl .= "page=$_GET[page]&";
 
if ($count) {
	$nbcols = 6;
 
$table = '<table cellpadding="0" cellspacing="0" />';
 
while ($row = mysql_fetch_assoc($res)) {
$tab[] = $row;
}
 
$count = count($tab);	
 
for($i = 0; $i < $count; $i++) {
if(($i % $nbcols) == 0) {
$tr = '<tr>';
}	
  $id = $tab[$i]["id"];
  /*On coupe le nom du fichier si depasse 18 caractéres*/
     $char1 = 18; //cut name length 
	 $smallname = CutName(htmlspecialchars($tab[$i]["name"]), $char1);
 
/*


$last_access = $CURUSER["last_browse"];
$time_now = gmtime();

if ($last_access > $time_now || !is_numeric($last_access)) {
$last_access = $time_now;
}
$resdet = mysql_query("SELECT  tags, views, hits, date, added, edit_by, last_edit, exclue, downloaded, downlang.name AS lang_name, downlang.image AS lang_image, categories.name AS cat_name, host.name AS heberg_name, host.image AS heberg_image FROM download LEFT JOIN downlang ON downlang = downlang.id  LEFT JOIN host ON download.host = host.id LEFT JOIN categories ON download.category = categories.id WHERE download.id = $id") or die(mysql_error());
                $rowdet = mysql_fetch_array($resdet);
 $bimg = @mysql_fetch_array(@mysql_query("SELECT image1 FROM download WHERE id=$id"));
                $balon =($bimg["image1"] ? "$site[SITEURL]/uploads/images/" . htmlspecialchars($bimg["image1"]) : "images/nocover.jpg");
				
     $lang =  "<img border='0' src='" . $site["SITEURL"] . "/images/languages/" . $rowdet["lang_image"] . "' />";				
    $hebergeur =  "<img border=0  width=16 src=" . $site['SITEURL'] . "/images/hebergeur/" . $rowdet["heberg_image"] . " />";
	$hebergeurs =  "" . $rowdet["heberg_name"] . "";	
if (sql_timestamp_to_unix_timestamp($tab[$i]["added"]) >= $last_access) {
$dispname .= "<b>".$smallname."<font color=red>("._NEW."!)</font></b>";
}
/*<!-- DIV POUR EXCLUE -->*/
$edited = $rowdet["last_edited"];
 
if ($edited == "yes") {
$edited = "<b>Oui</b>";
} else {
$edited = "<b>Non</b>";
}
 
$exclue = $rowdet["exclue"];
$exclues = $rowdet["exclue"];
 
if ($exclue == "yes") {
$exclue = "<b>Oui</b>";
} else {
$exclue = "<b>Non</b>";
}
 
/*On coupe le nom de la release si depasse 18 caractéres*/
     $char1 = 18; //cut name length 
	 $release = CutName(htmlspecialchars($rowdet["tags"]), $char1);
 
$index_item = "<div class='index_item'>
	&nbsp;<a href=\"details.php?id=".$tab[$i]["id"]."&hit=1\" onMouseover=\"return overlib('<table width=100% class=overlib_col1 cellspacing=0 cellpadding=5 align=center><tr><td class=overlib_head colspan=2 align=center>$smallname</td></tr><tr valign=top><td align=center><img src=$balon width=120 border=0></td><td><div align=left><b>Release: <b>".$release."<b><br>".DATE_ADDED.":<b> ".date("d-m-Y ", utc_to_tz_time($tab[$i]["added"]))."</b><br /><b>Posté par: </b>" .$tab[$i]["username"]. "<br /><b>".DETAIL_DATE_EDIT.":<b> ".date("d-m-Y ", utc_to_tz_time($rowdet["last_edit"]))."</b><br /><b>".DATE_EDIT_BY2.": </b>" .$rowdet["edit_by"]. "<br />".TTYPE.":<b> ".$tab[$i]["cat_name"]."</b><br><b>" . VIEWS . ": <b>".$rowdet["views"]."<br>" . COMMENTS . ": <b>".$tab[$i]["comments"]."</b><br />Hébergeur: <b>$hebergeurs</b><br /><b>Language: <img border=0 src=" . $site["SITEURL"] . "/images/languages/" . $rowdet["lang_image"] . " alt=" . $rowdet["lang_name"] . " /><br /></div></td></tr></table>')\"; onMouseout=\"return nd()\"><img class='glossy' src='".$balon."' width='120' height='160' hspace='4'></a> 
    </div>";
 
$td = "</td><td width='10'>&nbsp;</td>";	
if(($i % $nbcols) == ($nbcols - 1)) {
    $tr_fin = '</tr>';
       }
 
    }
	$pagetop = $pagerbottom;
//fin
// Mettre ici l'envoi des données au gabarit
$template->assign_vars(
    array
    (
	'TABLE' => $table,
	'TR' => $tr,
	'INDEX_ITEM' => $index_item,
    'TD' => $td,
    'TR_FIN' => $tr_fin,
	'PAGETOP' => $pagetop,
    )
);
}
// Affichage du handle "index"
$template->pparse('download');
 
 
// Affichage du handle "footer"
require('footer.php');
?>
le template
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
<div id="corpshaut"></div>
        	<div id="corps">
    		<p>
{TABLE}
{TR}
<td background='images/box-stream-video.png' width='155' height='220' />
{INDEX_ITEM}
{TD}
	{TR_FIN}
	</table><center><br>
	{PAGETOP}
</p>   
 
 
            <div style="clear: both"></div>
 
    		</div> 
    	<div id="corpsbas"></div>
Je vous remercie de votre aide