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
|
// Crée le lien dans le tableau global
function ajoute_lien($chemin_image, $chemin_miniature, $file) {
// Récupère la taille de la miniature sous forme HTML (width="xxx" height="yyy")
$taille_html_miniature = getimagesize($chemin_miniature);
$taille_html_miniature = $taille_html_miniature[3];
// Rajoute le lien vers l'image au tableau global $GLOBALS['tabl_liens']
$lien = '<a href="'.$chemin_image.'">';
$lien .= '<img src="'.$chemin_miniature.'" '.$taille_html_miniature.' alt="'.$file.'">';
$lien .= '</a>'."\n";
array_push($GLOBALS['tabl_liens'], $lien);
}
ICI PARTIE MODIFIEE PAR MOI !!
// Crée le lien dans le tableau global
function ajoute_lien($chemin_image, $chemin_miniature, $file) {
// Récupère la taille de la miniature sous forme HTML (width="xxx" height="yyy")
$taille_html_miniature = getimagesize($chemin_miniature);
$taille_html_miniature = $taille_html_miniature[3];
// Rajoute le lien vers l'image au tableau global $GLOBALS['tabl_liens']
$lien = '<a onclick="window.open(<?php echo(.$chemin_image.)?>)">';
$lien .= '<img src="'.$chemin_miniature.'" '.$taille_html_miniature.' alt="'.$file.'">';
$lien .= '</a>'."\n";
array_push($GLOBALS['tabl_liens'], $lien); |