

<?php require_once($_SERVER['DOCUMENT_ROOT'] . '/common/constants.php'); ?>
    <script>
    $("#optOutEmail_8").closest('.checkbox').remove
      $( 'ul.nav li:has(ul)' ).doubleTapToGo();
      
      $(window).resize(function(){
        var windowWidth = $(window).width();
        //$("#windowWidth").text(windowWidth);
        if(windowWidth < 765){
          $(".rightSide").css("height", "");
        }else{
          var leftHeight = $(".leftSide").height();
          var rightHeight = $(".rightSide").height();
          //console.log("windowWidth: " + windowWidth + "\nleftHeight: " + leftHeight + "\nrightHeight: " + rightHeight);
          if(leftHeight > rightHeight){
            $(".rightSide").css("height", leftHeight);
          }
        }
      });
        
      function setColWidth(){
        var windowWidth = $(window).width();
        //$("#windowWidth").text(windowWidth);
        
        if(windowWidth < 765){
          $(".rightSide").css("height", "");
        }else{
          var leftHeight = $(".leftSide").height();
          var rightHeight = $(".rightSide").height();
          //console.log("leftHeight: " + leftHeight + "\nrightHeight: " + rightHeight);
          if(leftHeight > rightHeight){
            $(".rightSide").height(leftHeight + 75);
          }
        }
      }

        $('#loginModal').modal().on('shown', function(){
          $('body').css('overflow', 'hidden');
      }).on('hidden', function(){
          $('body').css('overflow', 'auto');
      })

    </script>
    
      <!--! KICKSTRAP FOOTER -->
       <div class="hidden"><h1>No Stylesheet Loaded</h1><p><strong>Could not load Kickstrap.</strong>There are <a href="http://getkickstrap.com/docs/1.2/troubleshooting/#lessjs-errors">several common reasons for this error.</a></p></div>
      <div id="push"></div>
  </div> <!-- body padding -->
  </div> <!-- sf-wrapper -->
    <footer class="container" id="footer" style="text-align:center;">
      
      <p><small>Copyright <?php echo date("Y"); ?>. Design and Maintenance by Associated Food Stores. &nbsp;| &nbsp;<a href="/admin">Administration</a> &nbsp;| &nbsp;<a href="/contactUs">Contact Us</a> &nbsp;| &nbsp;<a href="/recalls">Recalls</a></small></p>
    </footer>
</div>

<div style="clear:both"></div>
<!-- Modal -->
<div id="loginModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
    aria-hidden="true">
    <div class="modal-header">
        <!-- <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> -->
        <h3 id="myModalLabel">Login</h3>
    </div>
    <div class="modal-body">
        <?php include($_SERVER['DOCUMENT_ROOT'] . '/includes/loginForm.php'); ?>
    </div>
    <div class="modal-footer">
        <div style="max-width: 70%; float: left;">
            <a href="/register.php" class="pull-left">Register | </a>
            <a href="#forgotPassword" class="pull-left" data-toggle="modal" role="button">&nbsp;Forgot password?</a>
        </div>
        <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
    </div>
</div>

<?php
  require_once($_SERVER['DOCUMENT_ROOT'] . "/admin/inc/class.brdata.inc.php");
  $brdataObj = new brdata();
  $securityQuestions = $brdataObj->getSecurityQuestions();
?>
<style>
@media only screen and (min-width: 768px) {

  div.modal-body{
    width: auto !important;
    max-height: 400px !important;
    height: 400px !important;
    margin-left: 10px;
    text-align: center;
  }

  div.modal-footer{
    width: 90% !important;
    margin-left: 10px;
  }

 

  div.alert.alert-info{
    max-width: auto !important;
    width: auto !important;
  }
  
  

}

@media only screen and (max-width: 768px) {
  
    div.modal-body{
      width: 90% !important;
      max-height: 90% !important;
      height: 90% !important;
      text-align: center;
    }

    div.modal-footer{
      /* width: 350px !important; */
      width: 90% !important;
    }

      #loginModal, {
      width: 90%;
      max-height:60%;
      height:60%;
      overflow-y:scroll;
      margin-left: 20px;
      left: 5%;
      z-index: 10000;
      margin: 0 auto;

  }

    #divOffsetPadLeft{
      padding-left: 0px !important;
      width: 160px !important;
    }
  
    /* body{
      overflow:hidden;
    } */

}

</style>
<!-- Modal -->
<div id="forgotPassword" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
    aria-hidden="true">
    <div class="modal-header">
        <!-- <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> -->
        <h3 id="myModalLabel">Forgot Password?</h3>
    </div>
    <div class="modal-body">
        <p>Fill out the form below with the information you provided when you created your account.</p>
        <form method="POST" action="/admin/lookUp.php" name="passwordResetRequestForm" id="passwordResetRequestForm"
            class="cf" accept-charset="UTF-8">
            <input type="hidden" value="changePasswordRequest" name="action">
            <!-- Text input-->
            <div class="control-group">
                <label class="control-label" for="pwResetEmail">
                    Email Address* <span class="hideObject text-error" id="pwResetEmailErrorMsg"> - Provide an
                        email</span>
                </label>
                <div class="controls">
                    <input id="pwResetEmail" name="pwResetEmail" type="text" placeholder="example@example.com"
                        class="input-xlarge required"">
			
		  </div>
		</div>
		<!-- Select Basic -->
		<div class=" control-group">
                    <label class="control-label" for="pwResetSecurityquestion">Security Question</label>
                    <div class="controls">
                        <select id="pwResetSecurityquestion" name="pwResetSecurityquestion" class="input-xlarge">
                            <?php echo $securityQuestions; ?>
                        </select>
                    </div>
                </div>

                <!-- Text input-->
                <div class="control-group">
                    <label class="control-label" for="pwResetSecurityanswer">
                        Security Answer* <span class="hideObject text-error" id="pwResetSecurityanswerErrorMsg"> -
                            Provide a security answer</span>
                    </label>
                    <div class="controls">
                        <input id="pwResetSecurityanswer" name="pwResetSecurityanswer" type="text" placeholder=""
                            class="input-xlarge required">

                    </div>
                </div>

                <!-- Text input-->
                <div class="control-group">
                    <label class="control-label" for="newPW">New Password*</label>
                    <div class="controls">
                        <input id="newPW" name="newPW" type="password" placeholder="New Password"
                            class="input-xlarge required"">
			
		  </div>
		</div>
		
		<button class=" btn" type="submit">Request Password Reset</button>
        </form>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
    </div>
</div>
<?php
  if(isset($loggedIn) && $loggedIn === true){
?>
<div id="loggedInContainerMobile" class="visible-phone">
    Hello, <?php echo $_SESSION['Username']; ?>
    <?php
	  if(isset($_SESSION['MyStoreAFS']['store_name']) && isset($purposefullyFalse)){
	?>
    <br>
    My Store:<?php echo $_SESSION['MyStoreAFS']['store_name']; ?>
    <?php
	  }
	?>
    <br>
    <a href="/account.php">My Account</a><br>
    <a href="/admin/logout.php">Log Out</a>
</div>
<?php
  }else{
?>
<div id="loggedOutContainerMobile" class="visible-phone">
    <a href="#loginModal" data-toggle="modal" role="button" class="btn btn-primary" style="float:left;width:100px; margin-bottom:25px;">Log
        In</a>
    <a href="/register.php" class="btn btn-default" style="float:right;width:100px; color: #DA262A; margin-right:60px;margin-bottom:25px">Register</a>
</div>
<?php
  }
?>
  
  
  
  
  
