exit_pixlr.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * This file allows creating new svg and png documents with an online editor.
  5. *
  6. * @package chamilo.document
  7. *
  8. * @author Juan Carlos Ra�a Trabado
  9. * @since 30/january/2011
  10. */
  11. /**
  12. * Code
  13. */
  14. //require_once '../inc/global.inc.php';
  15. api_protect_course_script();
  16. api_block_anonymous_users();
  17. //delete temporal file
  18. unlink($_SESSION['temp_realpath_image']);
  19. //Clean sessions and return to Chamilo file list
  20. unset($_SESSION['paint_dir']);
  21. unset($_SESSION['paint_file']);
  22. unset($_SESSION['whereami']);
  23. unset($_SESSION['temp_realpath_image']);
  24. if (!isset($_SESSION['exit_pixlr'])){
  25. $location=api_get_path(WEB_CODE_PATH).'document/document.php';
  26. echo '<script>window.parent.location.href="'.$location.'"</script>';
  27. api_not_allowed(true);
  28. }
  29. else{
  30. echo '<div align="center" style="padding-top:150; font-family:Arial, Helvetica, Sans-serif;font-size:25px;color:#aaa;font-weight:bold;">'.get_lang('PleaseStandBy').'</div>';
  31. $location=api_get_path(WEB_CODE_PATH).'document/document.php?id='.Security::remove_XSS($_SESSION['exit_pixlr']);
  32. echo '<script>window.parent.location.href="'.$location.'"</script>';
  33. unset($_SESSION['exit_pixlr']);
  34. }