blank.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Script that displays a blank page (with later a message saying why)
  5. * @package chamilo.learnpath
  6. * @author Yannick Warnier <ywarnier@beeznest.org>
  7. */
  8. // Flag to allow for anonymous user - needs to be set before global.inc.php.
  9. $use_anonymous = true;
  10. require_once '../inc/global.inc.php';
  11. $htmlHeadXtra[] = "
  12. <style>
  13. body { background: none;}
  14. </style>
  15. ";
  16. Display::display_reduced_header();
  17. if (isset($_GET['error'])) {
  18. switch ($_GET['error']){
  19. case 'document_deleted':
  20. echo '<br /><br />';
  21. Display::display_error_message(get_lang('DocumentHasBeenDeleted'));
  22. break;
  23. case 'prerequisites':
  24. echo '<br /><br />';
  25. Display::display_warning_message(get_lang('LearnpathPrereqNotCompleted'));
  26. break;
  27. case 'document_not_found':
  28. echo '<br /><br />';
  29. Display::display_warning_message(get_lang('FileNotFound'));
  30. break;
  31. case 'reached_one_attempt':
  32. echo '<br /><br />';
  33. Display::display_warning_message(get_lang('ReachedOneAttempt'));
  34. break;
  35. case 'x_frames_options':
  36. if (isset($_SESSION['x_frame_source'])) {
  37. $src = $_SESSION['x_frame_source'];
  38. $icon = '<em class="icon-play-sign icon-2x"></em>&nbsp;';
  39. echo Display::return_message(
  40. Display::url($icon.$src, $src, ['class' => 'btn generated', 'target' => '_blank']),
  41. 'normal',
  42. false
  43. );
  44. unset($_SESSION['x_frame_source']);
  45. }
  46. break;
  47. default:
  48. break;
  49. }
  50. } elseif (isset($_GET['msg']) && $_GET['msg'] == 'exerciseFinished') {
  51. echo '<br /><br />';
  52. Display::display_normal_message(get_lang('ExerciseFinished'));
  53. }
  54. ?>
  55. </body>
  56. </html>