<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
?>
<?php if($this->bgimage): ?>
  <?php $photo = Engine_Api::_()->core()->getFileUrl($this->bgimage); ?>
  <style>
  .layout_core_page_background_image{
    display:none !important;
  }
  #global_footer{
    margin-top:0px !important;
    padding-top:0 !important;
  }
  #global_wrapper{
    background-image:url(<?php echo $photo?>);
    background-size:cover;
    background-position:center;
    background-attachment:fixed;
  }
  .layout_page_footer{
    margin-top:0;
  }
  </style>
  <script type="text/javascript">
    en4.core.runonce.add(function() {document.getElementById('global_wrapper').style.backgroundImage = "url('<?php echo $photo ?>')";});
  </script>
<?php endif; ?>
