home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Blogs / wordpress2.6.exe / wordpress2.6 / wp-pass.php < prev    next >
Encoding:
PHP Script  |  2008-05-25  |  487 b   |  19 lines

  1. <?php
  2. /**
  3.  * Creates the password cookie and redirects back to where the
  4.  * visitor was before.
  5.  *
  6.  * @package WordPress
  7.  */
  8.  
  9. /** Make sure that the WordPress bootstrap has ran before continuing. */
  10. require( dirname(__FILE__) . '/wp-load.php');
  11.  
  12. if ( get_magic_quotes_gpc() )
  13.     $_POST['post_password'] = stripslashes($_POST['post_password']);
  14.  
  15. // 10 days
  16. setcookie('wp-postpass_' . COOKIEHASH, $_POST['post_password'], time() + 864000, COOKIEPATH);
  17.  
  18. wp_safe_redirect(wp_get_referer());
  19. ?>