exit_pixlr.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. use ChamiloSession as Session;
  4. /**
  5. * This file allows creating new svg and png documents with an online editor.
  6. *
  7. * @package chamilo.document
  8. *
  9. * @author Juan Carlos Ra�a Trabado
  10. * @since 30/january/2011
  11. */
  12. //require_once '../inc/global.inc.php';
  13. api_protect_course_script(true);
  14. api_block_anonymous_users();
  15. //delete temporal file
  16. unlink($_SESSION['temp_realpath_image']);
  17. // Clean sessions and return to Chamilo file list
  18. Session::erase('paint_dir');
  19. Session::erase('paint_file');
  20. Session::erase('whereami');
  21. Session::erase('temp_realpath_image');
  22. if (!isset($_SESSION['exit_pixlr'])){
  23. $location=api_get_path(WEB_CODE_PATH).'document/document.php';
  24. echo '<script>window.parent.location.href="'.$location.'"</script>';
  25. api_not_allowed(true);
  26. } else {
  27. 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>';
  28. $location=api_get_path(WEB_CODE_PATH).'document/document.php?id='.Security::remove_XSS($_SESSION['exit_pixlr']);
  29. echo '<script>window.parent.location.href="'.$location.'"</script>';
  30. unset($_SESSION['exit_pixlr']);
  31. }