Advertisement
Guest User

wwwherewithmefr - amo

a guest
May 1st, 2008
1,608
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.02 KB | None | 0 0
  1. <?php
  2. global $user_ID, $user_identity, $user_login;
  3. get_currentuserinfo();
  4. if (!$user_ID): // Non connecte
  5. ?>
  6.     <form method="post" id="loginform" class="user_box" action="<?php bloginfo('home'); ?>/wp-login.php">
  7.         <div>
  8.             <input type="text" value="<?php echo wp_specialchars(stripslashes($user_login), 1); ?>" name="log" id="login" />
  9.             <input type="password" value="" name="pwd" id="password" />
  10.             <input class="hidden" type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
  11.             <input class="hidden" type="hidden" name="rememberme" value="forever" />
  12.             <input type="submit" id="loginsubmit" value="OK" />                    
  13.         </div>
  14.     </form>        
  15. <?php else : // Connecte ?>
  16.     <div class="user_box" id="user_connected">
  17.         <span><?php echo wp_specialchars(stripslashes($user_identity), 1); ?></span>
  18.         <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout&redirect_to=<?php echo urlencode($_SERVER['REQUEST_URI']); ?>" title="Deconnexion" class="logout">Dconnexion</a>
  19.     </div>
  20. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement