} else { header("Location: " . get_bloginfo("wpurl") . "/dashboard/"); } } } elseif (empty($_POST['user-name']) || empty($_POST['password'])) { } else { // Reload header("Location: " . get_bloginfo("wpurl") . "/login/"); } } // ****************************************************************************************** // // Already logged in if (is_user_logged_in()) { global $user_ID; $login = get_userdata($user_ID); get_user_login_info(); /* echo " <p class=\"alert\">\n"; printf( __('You have successfully logged in as <a href="%1$s" title="%2$s">%2$s</a>.', rb_login_TEXTDOMAIN), "/dashboard/", $login->display_name ); echo " <a href=\"". wp_logout_url( get_permalink() ) ."\" title=\"". __('Log out of this account', rb_login_TEXTDOMAIN) ."\">". __('Log out »', rb_login_TEXTDOMAIN) ."</a>\n"; echo " </p><!-- .alert -->\n"; */ // ****************************************************************************************** // // Not logged in } else { // *************************************************************************************************** // // Prepare Page get_header(); echo "<div class=\"content_wrapper\">\n"; // Theme Wrapper echo "<div class=\"PageTitle\"><h1></h1></div>\n";
<li><a href="about.php">About Us</a></li> <li><a href="blog.php">Blog</a></li> <li><a href="contact.php">Contact Us</a></li> </ul> <div class="clr"></div> </div> </div> <div class="content"> <div class="content_bg"> <div class="mainbar"> <div class="article"> <?php //print_r($_POST); if (isset($_POST["user_name"]) && isset($_POST["password"]) && !empty($_POST["user_name"]) && !empty($_POST["password"])) { if (get_user_login_info($_POST["user_name"], $_POST["password"])) { redirect_to('user_home.php'); } else { echo "<div class=\"error\">Please enter correct username and password</div>"; } } ?> <h2><span>Login</span></h2> <div class="clr"></div> <form action="login.php" method="post" > <ol> <li> <label for="user_name">User Name</label> <input id="user_name" name="user_name" class="text" /> </li> <li>