<?php
  
  include_once($_SERVER['DOCUMENT_ROOT'] . "/admin/inc/sessionStartGeneral.php");
?>
<?php
  if(!isset($_GET['id'])){
    header('Location: index.php');
  }else{
    $featureID = $_GET['id'];
  }
?>
<?php
  $pageTitle = "Promotions";
  $pageDescription = "Get all of your promotion information right here.";
  $pageKeywords = "promotions, deals, savings";
  
  $theSiteParts = explode(".", $_SERVER['HTTP_HOST']);
  $theSite = $theSiteParts[0];
?>
<?php include_once($_SERVER['DOCUMENT_ROOT'] . "/common/header.php") ?>
<?php include_once($_SERVER['DOCUMENT_ROOT'] . "/common/mainNav.php")?>
    
    
    
    <section class="container">
      <div id="blankBuffer" class="carousel-buffer"></div>
      
      <section class="container" id="mainContent">
		<article class="row" id="promotionContain">
		  <?php
			include('https://afsshareportal.com/features/' . $featureID . '.php?theSite=' . $theSite);
		  ?>
		  <div class="span4 offset1 rightSide">
			<div class="paddingHelpRight">
              <?php include("includes/sidebar.php"); ?>
            </div>
		  </div>
		</article>
        
      </section>
    </section>
      
    
    
    
    <?php include_once($_SERVER['DOCUMENT_ROOT'] . "/common/footer.php"); ?>
  <script>
		var featureID = <?php echo $featureID; ?>;
  	var thePromo = <?php echo json_encode($thePromo); ?>;
  	
  	
    $(".needTheState").text(theState);
    $(".needFacebookLink").attr("href", facebookURL);
    
    $("#rightSidebarCollapse h4").bind("click", function(){
      $this = $(this).children("i");
      $siblings = $(this).parents(".accordion-group").siblings();
      $("h4", $siblings).children("i").removeClass("icon-minus-sign").addClass("icon-plus-sign");
      if($this.hasClass("icon-plus-sign")){
        $this.removeClass("icon-plus-sign").addClass("icon-minus-sign");
      }else{
        $this.removeClass("icon-minus-sign").addClass("icon-plus-sign");
      }
    });
   
  </script>
  
</body>
</html>
