<?php require_once($_SERVER['DOCUMENT_ROOT'] . '/common/constants.php'); ?>

<div id="socialIconsContain" class="feedFacebookWall clearfix img-rounded">
    <div class="text-center">
        <h4> <a href='<?php echo FACEBOOK_URL;?>'>CONNECT WITH US ON FACEBOOK <i class="fa fa-facebook fa-2x"></i></a>
        </h4>
    </div>
</div>

<script>
$('ul.nav li:has(ul)').doubleTapToGo();
$("#babyLink").remove();
setTimeout(function() {
    $("#theServices").append(
        "<li><a href='personalshopper'>Online shopping for in-store pick up or delivery</a></li>");
    $("#theServices li:contains('No Services')").remove();
}, 1500);

$("#optOutEmail_2").closest('.checkbox').remove();
$("#optOutEmail_7").closest('.checkbox').remove();
</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">
    <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>&nbsp;| &nbsp;<a href="/plus">Employee Rewards</a></small></p>
</footer>
</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" 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();
?>

<!-- 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">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:42.5%;">Log
        In</a>
    <a href="/register" class="btn btn-default" style="float:right;width:42.5%; color: #DA262A">Register</a>
</div>
<?php
  }
?>