<?php

require_once( 'wallpaper_functions.php' );
 
 function spitOutWallpaperCSS() {
    global $vl_wallpapers;
    global $vl_thumbnails;
	$countwallpapers = 0;
	foreach($vl_wallpapers as $format => $sub_wallpapers) {
		foreach($sub_wallpapers as $name => $wallpaper) {
			print "#wallpaper" . $countwallpapers . " { background-image: url('";
			print $wallpaper . "');";
			if( $format == 'bottom-left' )
			{
				print "background-repeat:no-repeat;background-position: bottom left;";
			}
			print "}\n";
			$countwallpapers++;
	    }
	}
}

header('Content-type: text/css'); 
spitOutWallpaperCSS();

?>