<?

// Return now if no background style settings have been defined
if (empty($this_website['website_settings']['background_style_position'])
    && empty($this_website['website_settings']['background_style_repeat'])
    && empty($this_website['website_settings']['background_style_size'])){
    return;
}

// Print out the commented title for this stylesheet
echo '/* -- CUSTOM BACKGROUND STYLES -- */'.PHP_EOL;

// Open the body tag for background properties
echo 'body { '.PHP_EOL;

    // If the background position was defined, print out the rule
    if (!empty($this_website['website_settings']['background_style_position'])){
        $value = $this_website['website_settings']['background_style_position'];
        echo 'background-position: '.$value.'; '.PHP_EOL;
    }

    // If the background repeat was defined, print out the rule
    if (!empty($this_website['website_settings']['background_style_repeat'])){
        $value = $this_website['website_settings']['background_style_repeat'];
        echo 'background-repeat: '.$value.'; '.PHP_EOL;
    }

    // If the background size was defined, print out the rule
    if (!empty($this_website['website_settings']['background_style_size'])){
        $value = $this_website['website_settings']['background_style_size'];
        echo 'background-size: '.$value.'; '.PHP_EOL;
    }

// Close the body tag for background properties
echo '} '.PHP_EOL;

?>