Created
August 4, 2020 21:51
-
-
Save AndrewSepic/e24376780881de781b61f01d041f0cdc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Check that the user is logged in/ has been verified and has cookies set | |
if ( isset( $_COOKIE['isAuthorized'] ) ){ | |
$current_user = $_COOKIE['clientName']; | |
echo '<p>Welcome ' . $current_user . ' | <a class="mboLogOut" href="#">Logout</a></p>'; | |
?> | |
<script> | |
jQuery( document ).ready(function( $ ) { | |
$('a.mboLogOut').on('click', function(){ | |
Cookies.remove('isAuthorized'); | |
Cookies.remove('clientName'); | |
location.reload(); | |
}) | |
}); | |
</script> | |
<?php | |
} | |
else { | |
?><h3 class="login-leadin">Login with your MindBody email to access Classes on Demand</h3> | |
<form name="mbologinform" id="mbologin" action="<?php echo site_url(); ?>/mindbody-auth" method="post"> | |
<p class="login-email"> | |
<input type="text" name="email" id="mbo_email" class="input" value="" placeholder="Email" size="30" autocomplete="off"> | |
</p> | |
<p class="login-submit"> | |
<input type="submit" name="submit" id="submit" class="button button-primary" value="Log In"> | |
</p> | |
<a href="https://company.mindbodyonline.com"><img src="<?php echo get_stylesheet_directory_uri();?>/images/[email protected]" alt="Powered by Mindbody"/></a> | |
</form> | |
<?php | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment