dokeos-online
[ class tree: dokeos-online ] [ index: dokeos-online ] [ all elements ]

Source for file header_frame.inc.php

Documentation is available at header_frame.inc.php

  1. <?php
  2. /*
  3. ==============================================================================
  4.     Dokeos - elearning and course management software
  5.  
  6.     Copyright (c) 2004 Dokeos S.A.
  7.     Copyright (c) 2003 Ghent University (UGent)
  8.     Copyright (c) 2001 Universite catholique de Louvain (UCL)
  9.     Copyright (c) Olivier Brouckaert
  10.  
  11.     For a full list of contributors, see "credits.txt".
  12.     The full license can be read in "license.txt".
  13.  
  14.     This program is free software; you can redistribute it and/or
  15.     modify it under the terms of the GNU General Public License
  16.     as published by the Free Software Foundation; either version 2
  17.     of the License, or (at your option) any later version.
  18.  
  19.     See the GNU General Public License for more details.
  20.  
  21.     Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com
  22. ==============================================================================
  23. */
  24. /**
  25. ==============================================================================
  26. *    Header of each frame of the Online conference tool
  27. *
  28. *    @author Olivier Brouckaert
  29. *    @package dokeos.online
  30. ==============================================================================
  31. */
  32.  
  33. if(!defined('FRAME'))
  34. {
  35.     exit();
  36. }
  37.  
  38. $bodyXtra='';
  39.  
  40. if(FRAME == 'hidden1')
  41. {
  42.     $bodyXtra='onload="javascript:'.($isMaster?'saveDocumentURL();':'getDocumentURL(); updateStreaming();').' updateChat(); updateConnected(); setTimeout(\'submitHiddenForm();\',5000);"';
  43. }
  44. elseif(FRAME == 'htmlarea')
  45. {
  46.     if($isMaster)
  47.     {
  48.         $bodyXtra='onload="javascript:setTimeout(\'saveHTMLareaContent();\',3000);"';
  49.     }
  50. }
  51. elseif(FRAME == 'master' || FRAME == 'streaming')
  52. {
  53.     if($isMaster)
  54.     {
  55.         $bodyXtra='scroll="no"';
  56.     }
  57. }
  58. elseif(FRAME == 'message')
  59. {
  60.     $bodyXtra='onload="javascript:eventMessage();"';
  61. }
  62. ?>
  63.  
  64. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  65. <html>
  66. <head>
  67. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  68. <title>Online Conference</title>
  69.  
  70. <?php
  71. if(FRAME != 'htmlarea' || $isMaster)
  72. {
  73. ?>
  74.  
  75. <link rel="stylesheet" type="text/css" href="../css/online.css">
  76.  
  77. <?php
  78. }
  79. ?>
  80.  
  81. <script type="text/javascript">
  82. /* <![CDATA[ */
  83. function saveDocumentURL()
  84. {
  85.     document.formHidden.document.value=parent.online_working_area.location.href;
  86. }
  87.  
  88. function getDocumentURL()
  89. {
  90.     currentDocument=parent.online_working_area.location.href;
  91.     newDocument=document.formHidden.document.value;
  92.  
  93.     if(currentDocument != newDocument)
  94.     {
  95.         parent.online_working_area.location.href=newDocument;
  96.     }
  97. }
  98.  
  99. function updateChat()
  100. {
  101.     if('<?php echo $chat_size_old?>' != '<?php echo $chat_size_new?>')
  102.     {
  103.         parent.online_chat.location.href='online_chat.php?size=<?php echo $chat_size_new?>#bottom';
  104.     }
  105. }
  106.  
  107. function updateConnected()
  108. {
  109.     if('<?php echo $connected_old?>' != '<?php echo $connected_new?>')
  110.     {
  111.         parent.online_whoisonline.location.href='online_whoisonline.php?size=<?php echo $connected_new?>';
  112.     }
  113. }
  114.  
  115. function updateStreaming()
  116. {
  117.     if('<?php echo $streaming_old?>' != '<?php echo $streaming_new?>')
  118.     {
  119.         parent.online_master.location.href='online_master.php?md5=<?php echo $streaming_new?>';
  120.     }
  121. }
  122.  
  123. function submitHiddenForm()
  124. {
  125.     document.formHidden.submit();
  126. }
  127.  
  128. function saveHTMLareaContent()
  129. {
  130.     document.formHTMLarea.onsubmit();
  131.  
  132.     document.formHTMLarea.submit();
  133.  
  134.     setTimeout('saveHTMLareaContent();',3000);
  135. }
  136.  
  137. function eventMessage()
  138. {
  139.     <?php if($chat_size)?>
  140.     parent.online_hidden1.document.formHidden.chat_size_old.value='<?php echo $chat_size?>';
  141.     parent.online_chat.location.href='online_chat.php?size=<?php echo $chat_size?>#bottom';
  142.     <?php endif?>
  143.  
  144.     document.formMessage.message.focus();
  145. }
  146. /* ]]> */
  147. </script>
  148.  
  149. </head>
  150. <body <?php echo $bodyXtra?> >

Documentation generated on Thu, 12 Jun 2008 13:38:39 -0500 by phpDocumentor 1.4.1