<?php
/**
 * @var $loader_image_url
 * @var $redirect
 * @var $location
 */
?>

<div id="loader" style="position:relative; width:100%; height:100%;">

	<img
		style="position:absolute; left:50%; top:50%; margin-left:-50px; margin-top:-50px;"
		src="<?php echo $loader_image_url; ?>"
		alt="Loading..."
	/>

</div>

<?php if ( $redirect == 'yes' && $location ) { ?>

	<script>setTimeout( function () { window.location = '<?php echo $location; ?>'; }, 0 );</script>

<?php }