scormbuilder.php 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /*
  3. ==============================================================================
  4. Dokeos - elearning and course management software
  5. Copyright (c) 2004 Dokeos S.A.
  6. For a full list of contributors, see "credits.txt".
  7. The full license can be read in "license.txt".
  8. This program is free software; you can redistribute it and/or
  9. modify it under the terms of the GNU General Public License
  10. as published by the Free Software Foundation; either version 2
  11. of the License, or (at your option) any later version.
  12. See the GNU General Public License for more details.
  13. Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com
  14. ==============================================================================
  15. */
  16. /**
  17. ==============================================================================
  18. * @package dokeos.scorm
  19. ==============================================================================
  20. */
  21. $langFile = "scormdocument";
  22. include('../inc/global.inc.php');
  23. $this_section=SECTION_COURSES;
  24. api_session_register('items');
  25. echo "<html><head><title>".get_lang('ScormBuilder')." - Dokeos</title>";
  26. ?>
  27. <script type='text/javascript'>
  28. /* <![CDATA[ */
  29. function gonnadie() {
  30. if (window.opener && !window.opener.closed) {
  31. opener.document.theform.starter.value='dead';
  32. }
  33. }
  34. function aliveagain() {
  35. opener.document.theform.starter.value='alive';
  36. window.resizeTo(screen.width-250,screen.height-70-112);
  37. window.moveTo(200,200);
  38. alert('onload happened in new window');
  39. }
  40. /* ]]> */
  41. </script>
  42. </head>
  43. <?php
  44. if ($open=='builderwindow') { //opening the new browsing window and saving the title of Path
  45. echo "<frameset rows='27,100%' frameborder='yes' framespacing='1' onunload='javascript:gonnadie()' onload='javascript:aliveagain()'>",
  46. " <frame name='builderheader' scrolling='no' src='scormbuilderstarter.php'>",
  47. " <frame name='buildernet' src='http://www.google.com'>",
  48. "</frameset>"; //$rootWeb/index.php (Dokeos)
  49. // UNDER CONSTRUCTION -----------------------------------------------------
  50. //$result = api_sql_query("INSERT INTO `$TBL_SCORM_MAIN` VALUES ('".$index."','".$defaultorgtitle."','".$_course['official_code']."')");
  51. // UNDER CONSTRUCTION END -------------------------------------------------
  52. } else {
  53. //opening the normal Dokeos window
  54. echo "<frameset rows='112,*' frameborder='yes' framespacing='1' onload='javascript:window.resizeTo(screen.width-200,screen.height-25)'>",
  55. //if you put this : onload='javascript:window.resizeTo(screen.width-600,screen.height-50)' then
  56. //the original Dokeos window will be resized
  57. " <frame name='top' scrolling='no' target='contents' src='scormbuilderheader.php'>",
  58. " <frameset cols='245,100%' frameborder='yes' framespacing='1'>",
  59. " <frameset rows='143,*' frameborder='no' framespacing='0'>",
  60. " <frame name='toc1' scrolling='no' src='scormbuilderadditem.php'>",
  61. " <frame name='toc2' scrolling='no' src='scormbuilderbrowse.php'>",
  62. " </frameset>",
  63. " <frame name='net' scrolling='auto'";
  64. echo ">",
  65. "</frameset>";
  66. }
  67. ?>
  68. <noframes>
  69. <body>
  70. <p>This page uses frames, but your browser doesn't support them.
  71. If you cannot use a more modern browser, please contact us to ask for a non-frames version.
  72. </p>
  73. </body>
  74. </noframes>
  75. </html>