Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2. /**
  3.  * Accepts file uploads from swfupload.
  4.  *
  5.  * @package NextGEN-Gallery
  6.  * @subpackage Administration
  7.  */
  8.  
  9. // Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
  10. // We then have to validate the cookie manually. NOTE: WordPress functions, like
  11. // get_current_user_id() and the like are NOT available in this file.
  12. if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
  13. [... snip ..]
  14.  
  15. header('Content-Type: text/plain; charset=' . get_option('blog_charset'));
  16.  
  17. if (wp_validate_auth_cookie()) {
  18.         $results = wp_parse_auth_cookie();
  19. [... snip ...]
  20. }
  21.  
  22. //check for nggallery
  23. if ( !defined('NGGALLERY_ABSPATH') )
  24.         die('NextGEN Gallery not available. -3');
  25.  
  26. include_once (NGGALLERY_ABSPATH. 'admin/functions.php');
  27.  
  28. // get the gallery
  29. $galleryID = (int) $_POST['galleryselect'];
  30.  
  31. echo nggAdmin::swfupload_image($galleryID);
  32.  
  33. ?>