<?php
ob_start();
error_reporting(0); 
if ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'log-in' ) :

	global $error;
	$login = wp_login( $_POST['user-name'], $_POST['password'] );
	$login = wp_signon( array( 'user_login' => $_POST['user-name'], 'user_password' => $_POST['password'], 'remember' => $_POST['remember-me'] ), false );

endif;
?>

<div id="connect-form">

<h1>Se connecter</h1>
<?php if ( $error ) : ?>
<p class="error-login-form">
<?php echo $error; ?>
</p><!-- .error -->
<?php endif; ?>

<form action="<?php echo get_option('home'); ?>/wp-login.php" method="post">
			
				<p><label>Identifiant : </label>
				<input class="wdlogin-input" type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>"/></p>
			<!-- .form-username -->
<div class="clear"></div>
				<p><label>Mot de passe : </label>
				<input class="wdlogin-input" type="password" name="pwd" id="pwd"/></p>
			<!-- .form-password -->
<div class="clear"></div>
				<p class="rememberme"><label for="rememberme">Se souvenir de moi</label>
       			<input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" />
				<input type="hidden" name="action" value="log-in" /></p>
                
                <input type="submit" name="submit" class="submit button" id="wp-submit" value="<?php _e('Se connecter'); ?>" />
    <div class="clear"></div>

		</form><!-- .sign-in -->
        	<h1>Mot de passe perdu ?</h1>
<form name="lostpasswordform" id="lostpasswordform" action="<?php echo esc_url( site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ); ?>" method="post">
	
		<label for="user_login" ><?php _e('Username or E-mail:') ?></label>
		<input type="text" name="user_login" id="user_login" class="login-input" value="<?php echo esc_attr($user_login); ?>"/>
	
<?php do_action('lostpassword_form'); ?>

	<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
	<input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Get New Password'); ?>" tabindex="100" />
</form>

<div class="clear"></div>
</div>