* @copyright 2011 Romain d'Alverny
* @license MIT License, see LICENSE.txt
* @link http://svnweb.mageia.org/svn/web/hugs/
*/
$app_root = realpath(dirname(__FILE__));
$images = glob(sprintf('%s/var/hugs/*.jpg', $app_root));
if (count($images) > 0) {
$img_tmpl = '';
$img = $images[array_rand($images)];
$out = sprintf($img_tmpl,
str_replace($app_root, '', $img));
// TODO $exif = exif_read_data($img, null, true);
} else {
$out = '
';
}
?>
Free Hugs! @ Mageia