exit_pixlr.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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. require_once __DIR__.'/../inc/global.inc.php';
  12. api_protect_course_script(true);
  13. api_block_anonymous_users();
  14. //delete temporal file
  15. unlink($_SESSION['temp_realpath_image']);
  16. //Clean sessions and return to Chamilo file list
  17. unset($_SESSION['paint_dir']);
  18. unset($_SESSION['paint_file']);
  19. unset($_SESSION['whereami']);
  20. unset($_SESSION['temp_realpath_image']);
  21. if (!isset($_SESSION['exit_pixlr'])) {
  22. $location = api_get_path(WEB_CODE_PATH).'document/document.php';
  23. echo '<script>window.parent.location.href="'.$location.'"</script>';
  24. api_not_allowed(true);
  25. } else {
  26. 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>';
  27. $location = api_get_path(WEB_CODE_PATH).'document/document.php?id='.Security::remove_XSS($_SESSION['exit_pixlr']);
  28. echo '<script>window.parent.location.href="'.$location.'"</script>';
  29. unset($_SESSION['exit_pixlr']);
  30. }