ajax_upload.php 1008 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Tidypics ajax upload form body
  4. *
  5. * @uses $vars['entity']
  6. */
  7. $album = $vars['entity'];
  8. $ts = time();
  9. $batch = time();
  10. $tidypics_token = md5(session_id() . get_site_secret() . $ts . elgg_get_logged_in_user_entity()->salt);
  11. $basic_uploader_url = current_page_url() . '/basic';
  12. $maxfilesize = (float) elgg_get_plugin_setting('maxfilesize', 'tidypics');
  13. if (!$maxfilesize) {
  14. $maxfilesize = 5;
  15. }
  16. ?>
  17. <p>
  18. <?php
  19. echo elgg_echo('tidypics:uploader:instructs', array($maxfilesize));
  20. ?>
  21. </p>
  22. <div id="uploader">
  23. <input type="hidden" name="album_guid" value="<?php echo $album->getGUID(); ?>" />
  24. <input type="hidden" name="batch" value="<?php echo $batch; ?>" />
  25. <input type="hidden" name="tidypics_token" value="<?php echo $tidypics_token; ?>" />
  26. <input type="hidden" name="user_guid" value="<?php echo elgg_get_logged_in_user_guid(); ?>" />
  27. <input type="hidden" name="Elgg" value="<?php echo session_id(); ?>" />
  28. <p>
  29. <?php
  30. elgg_echo('tidypics:uploader:no_flash');
  31. ?>
  32. </p>
  33. </div>