while ($d = mysql_fetch_assoc($q)){
$sql = "SELECT * FROM video WHERE enc = '1' AND id='".$d['videoid']."' LIMIT ".$debut.",".$fin;
$query = mysql_query($sql) or die("Erreur w1.1.1 ( ?");
$num = mysql_num_rows($query);
if ($num ==0) print "
Aucune video.";
$id = 0;
while($data = mysql_fetch_assoc($query)) {
$id++;
$s2 = "SELECT * FROM stats WHERE videoid='".$data['id']."'";
$q2 = mysql_query($s2);
while ($d2 = mysql_fetch_assoc($q2)){
$vues = $d2['stats'];
}
if ($vues == '') $vues = '0';
print '!['.htmlspecialchars($data['titre']).' : '.htmlspecialchars($data['descr']).'](img/'.$data['id'].'.jpg)
'.htmlspecialchars($data['titre']).', vue '.$vues.' fois.
'.htmlspecialchars($data['descr']).'
';
if (($id == 5) || ($id == 10) || ($id == 15) ) print "
";
}
}