<?php
  
  include_once($_SERVER['DOCUMENT_ROOT'] . "/admin/inc/sessionStartGeneral.php");
  
  require_once($_SERVER['DOCUMENT_ROOT'] . "/admin/inc/class.brdata.inc.php");
  $brdataObj = new brdata();
  
  $theUser = [];
  
  $couponsURL = "https://www.softcoin.com/programs/iframe/?banner=Petersons_Fresh_Market";
  
  if(isset($loggedIn) && $loggedIn === true){
	$theUser = $brdataObj->getUser($_SESSION['FrequentShopperNum']);
	$couponsURL = $couponsURL . "&cardnumber=" . $theUser['FrqShopperNo'] . "&store=" . $theUser['MyStore']['MyStoreNumber'];
  }
  
  $theError = false;
?>

<?php
  $pageTitle = "Digital Coupons";
  $pageDescription = "Get even more savings through digital coupons by linking your Google account to your Rewards account";
  $pageKeywords = "Coupons, digital coupons, savings ";
?>
<?php include_once($_SERVER['DOCUMENT_ROOT'] . "/common/header.php") ?>

<style>
	body #contentWrapper #sf-wrapper #bodyPadding #trueContentWrapper #mainContent .span12{
		width:97%;
	}
</style>

<?php include_once($_SERVER['DOCUMENT_ROOT'] . "/common/mainNav.php")?>
    
    
    
    <section class="container">
      <div id="blankBuffer" class="carousel-buffer"></div>
      
      <section class="row" id="mainContent">
          <div class="span12">
            <?php
			  if(isset($loggedIn) && $loggedIn !== true){
			?>
			  <!--<div class="alert alert-block alert-info" style="width:93%;">
				<button type="button" class="close" data-dismiss="alert">&times;</button>
				Sign in to access over $400 in digital coupons on items you buy every day <a href="#" data-dismiss="alert">or not today</a>!
			  </div>-->
			<?php
			  }
			?>
			
			<iframe src="<?php echo $couponsURL; ?>" width="100%" height="1450px"></iframe>
          </div><!--end left side div-->
            
          
        
      </section>
    </section>
      
    
    
    
    <?php include_once($_SERVER['DOCUMENT_ROOT'] . "/common/footer.php"); ?>
    <?php include($_SERVER['DOCUMENT_ROOT'] . '/admin/js/rewardsJS.js'); ?>
  
  
</body>
</html>
