Image Galery

simple function that dispalay images in galery

Image galery function

IThis is a simple function that encapsulate bootstrap image galery


Image Galery
BootStrap and Image galery funciotn
This is a simple function for encapsulation Image Galery I use bootstrap as my favorite, you can change as you like it
THIS CLASS IS A COPYRIGHT WORK AND IS FREE FOR USE, MODIFICATION, ADDITION TO ALL PHP FAVORITES
by Miroslav Mitic 06.10.2017.
email : php@wind.in.rs
<?php
$slike = array( "1.JPG", "2.jpg", "3.JPG", "4.JPG" , "9.JPG" , "15.JPG" , "19.jpg" , "50.jpg", "51.jpg" , "101.jpg" , "102.jpg" );

$labels = array ("Stajni trap sa leve strane T17", "Transport - kolski slog", "T18 zatezni bubanj", "Mehanizam sajle i koturače kiper kolica","T17 kod aksij kugl.lez." , "Skliznica radnog točka", "Demontiranje HC metoda sa 2 lukas pumpe", "Blok wickers wentila hidor cilindra","isip T19-T17", "Mehanizam transformacije","Uška kašike");
/* main loop */
for($i = 0; $i< $redovi ; $i++)
}
print('<div class="row">');
for($j=0; $j< $kolone; $j++)
}
$magic = $kolone * $i +$j; // magic zero
draw_image($slike[$magic], $labels[$magic]);
}
print('</div>');
}
//-- function display galery images in 3 rows
function draw_image($slika, $label)
}
if ($label !="")
}
print('<div class="col-md-4">');
print(' <div class="thumbnail">');
printf('<img src="slike/rse/%s" alt="%s" >', $slika, $slika);
print('<div class="caption">');
printf(' <p> %s </p>', $label);
print('</div> </div> </div>');
}
}
// -- end of function --
?>

 pvc:  3134