Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Register form
- <?php
- get_header('page');
- /*
- Template Name: Registration Form
- */
- ?>
- <div class="container bodybg">
- <div class="row">
- <div class="contian clearfix">
- <div class="col-xs-12 col-sm-8 col-md-9 clickHide">
- <div id="login-register-password">
- <!--content-->
- <?php if(have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
- <!-- Contact Form Goes Here -->
- <?php the_content(); ?>
- <!-- End -->
- <?php endwhile; ?>
- <?php else : ?>
- <center><h2>Page Not Found</h2><br />
- <img src="<?php echo get_template_directory_uri(); ?>/images/404.png" alt="" />
- </center>
- <?php endif; ?>
- <!--content end-->
- <?php global $user_ID, $user_identity; get_currentuserinfo(); if (!$user_ID) { ?>
- <div class="col-xs-12 col-sm-6 col-md-6">
- <div id="tab1_login" class="tab_content_login">
- <?php $register = $_GET['register']; $reset = $_GET['reset']; if ($register == true) { ?>
- <h3>Success!</h3>
- <p>Check your email for the password and then return to log in.</p>
- <?php } elseif ($reset == true) { ?>
- <h3>Success!</h3>
- <p>Check your email to reset your password.</p>
- <?php } else { ?>
- <h1>Have an account?</h1>
- <?php } ?>
- <h4>Login</h4>
- <form method="post" action="<?php bloginfo('url') ?>/wp-login.php" class="wp-user-form">
- <div class="username">
- <input class="con_textfield checkUserName checkUserName2" type="text" name="log" value="User Name" id="user_login" onfocus="if(this.value == 'User Name') { this.value = ''; } " onblur="if(this.value == '') { this.value = 'User Name'; } " required="required" />
- </div>
- <div class="password">
- <input class="con_textfield checkUserPwd" type="password" name="pwd" value="Password" id="user_pass" onfocus="if(this.value == 'Password') { this.value = ''; } " onblur="if(this.value == '') { this.value = 'Password'; } " required="required" />
- </div>
- <div class="login_fields">
- <?php do_action('login_form'); ?>
- <input class="submit-button user-submit" type="submit" name="user-submit" value="<?php _e('Login'); ?>" tabindex="14" id="login_button" />
- <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
- <input type="hidden" name="user-cookie" value="1" />
- </div>
- </form>
- </div>
- </div>
- <div class="col-xs-12 col-sm-6 col-md-6">
- <div id="tab2_login" class="tab_content_login">
- <h1>Don't have an account?</h1>
- <h4>Register</h4>
- <form method="post" action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" class="wp-user-form">
- <div class="username">
- <input class="con_textfield" type="text" name="user_login" value="User Name" id="user_login" onfocus="if(this.value == 'User Name') { this.value = ''; } " onblur="if(this.value == '') { this.value = 'User Name'; } " required="required" />
- </div>
- <div class="password">
- <input class="con_textfield" type="text" name="user_email" value="Email" id="user_email" onfocus="if(this.value == 'Email') { this.value = ''; } " onblur="if(this.value == '') { this.value = 'Email'; } " required="required" />
- </div>
- <div class="login_fields">
- <?php do_action('register_form'); ?>
- <input class="submit-button" type="submit" name="user-submit" value="<?php _e('Sign up!'); ?>" class="user-submit" tabindex="103" />
- <?php $register = $_GET['register']; if($register == true) { echo '<p style="font-size: 20px;color: green;float: right;margin-top: -30px;">Check your email for the password!</p>'; } ?>
- <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>?register=true" />
- <input type="hidden" name="user-cookie" value="1" />
- </div>
- </form>
- </div>
- </div>
- <?php } else { // is logged in ?>
- <div class="sidebox" style="text-align:center;">
- <h3>Welcome, <?php echo $user_identity; ?></h3>
- <div class="usericon">
- <?php global $userdata; get_currentuserinfo(); echo get_avatar($userdata->ID, 60); ?>
- </div>
- <div class="userinfo">
- <p>You’re logged in as <strong><?php echo $user_identity; ?></strong></p>
- <p>
- <a href="<?php echo wp_logout_url('index.php'); ?>">Log out</a> | <a href="<?php bloginfo('home'); ?>">Welcome Page</a> |
- <?php if (current_user_can('manage_options')) {
- echo '<a href="' . admin_url() . '">' . __('Dashboard') . '</a>'; } else {
- echo '<a href="' . admin_url() . 'profile.php">' . __('Profile') . '</a>'; } ?>
- </p>
- </div>
- </div>
- <?php } ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment