calendar_popup.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <?php
  2. // $Id: calendar_popup.php 20456 2009-05-10 17:27:44Z ivantcholakov $
  3. /*
  4. ==============================================================================
  5. Dokeos - elearning and course management software
  6. Copyright (c) 2004-2005 Dokeos S.A.
  7. Copyright (c) Bart Mollet, Hogeschool Gent
  8. For a full list of contributors, see "credits.txt".
  9. The full license can be read in "license.txt".
  10. This program is free software; you can redistribute it and/or
  11. modify it under the terms of the GNU General Public License
  12. as published by the Free Software Foundation; either version 2
  13. of the License, or (at your option) any later version.
  14. See the GNU General Public License for more details.
  15. Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
  16. Mail: info@dokeos.com
  17. ==============================================================================
  18. */
  19. // including the relevant language file
  20. // name of the language file that needs to be included
  21. $language_file = 'agenda';
  22. // including the claroline global
  23. require ('../../../global.inc.php');
  24. // the variables for the days and the months
  25. // Defining the shorts for the days
  26. $DaysShort = array(get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
  27. // Defining the days of the week to allow translation of the days
  28. $DaysLong = array(get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
  29. // Defining the months of the year to allow translation of the months
  30. $MonthsLong = array(get_lang("JanuaryLong"), get_lang("FebruaryLong"), get_lang("MarchLong"), get_lang("AprilLong"), get_lang("MayLong"), get_lang("JuneLong"), get_lang("JulyLong"), get_lang("AugustLong"), get_lang("SeptemberLong"), get_lang("OctoberLong"), get_lang("NovemberLong"), get_lang("DecemberLong"));
  31. @ $iso_lang = Database :: get_language_isocode($language_interface);
  32. if (empty ($iso_lang) )
  33. {
  34. //if there was no valid iso-code, use the english one
  35. $iso_lang = 'en';
  36. }
  37. ?>
  38. <!DOCTYPE html
  39. PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  40. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  41. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $iso_lang; ?>" lang="<?php echo $iso_lang; ?>">
  42. <head>
  43. <title>Calendar</title>
  44. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>">
  45. <link rel="stylesheet" type="text/css" href="<?php echo api_get_path(WEB_CODE_PATH); ?>/css/default.css"/>
  46. <style type="text/css">
  47. /*<![CDATA[*/
  48. table.calendar
  49. {
  50. width: 100%;
  51. font-size: 11px;
  52. font-family: verdana, arial, helvetica, sans-serif;
  53. }
  54. table.calendar .monthyear
  55. {
  56. background-color: #4171B5;
  57. text-align: center;
  58. color: #ffffff;
  59. }
  60. table.calendar .daynames
  61. {
  62. background-color: #D3DFF1;
  63. text-align: center;
  64. }
  65. table.calendar td
  66. {
  67. width: 25px;
  68. height: 25px;
  69. background-color: #f5f5f5;
  70. text-align: center;
  71. }
  72. table.calendar td.selected
  73. {
  74. border: 1px solid #ff0000;
  75. background-color: #FFCECE;
  76. }
  77. table.calendar td a
  78. {
  79. width: 25px;
  80. height: 25px;
  81. text-decoration: none;
  82. }
  83. table.calendar td a:hover
  84. {
  85. background-color: #ffff00;
  86. }
  87. table.calendar .monthyear a
  88. {
  89. text-align: center;
  90. color: #ffffff;
  91. }
  92. table.calendar .monthyear a:hover
  93. {
  94. text-align: center;
  95. color: #ff0000;
  96. background-color: #ffff00;
  97. }
  98. /*]]>*/
  99. </style>
  100. <script type="text/javascript">
  101. /* <![CDATA[ */
  102. /* added 2004-06-10 by Michael Keck
  103. * we need this for Backwards-Compatibility and resolving problems
  104. * with non DOM browsers, which may have problems with css 2 (like NC 4)
  105. */
  106. var isDOM = (typeof(document.getElementsByTagName) != 'undefined'
  107. && typeof(document.createElement) != 'undefined')
  108. ? 1 : 0;
  109. var isIE4 = (typeof(document.all) != 'undefined'
  110. && parseInt(navigator.appVersion) >= 4)
  111. ? 1 : 0;
  112. var isNS4 = (typeof(document.layers) != 'undefined')
  113. ? 1 : 0;
  114. var capable = (isDOM || isIE4 || isNS4)
  115. ? 1 : 0;
  116. // Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
  117. if (capable) {
  118. if (typeof(window.opera) != 'undefined') {
  119. var browserName = ' ' + navigator.userAgent.toLowerCase();
  120. if ((browserName.indexOf('konqueror 7') == 0)) {
  121. capable = 0;
  122. }
  123. } else if (typeof(navigator.userAgent) != 'undefined') {
  124. var browserName = ' ' + navigator.userAgent.toLowerCase();
  125. if ((browserName.indexOf('konqueror') > 0) && (browserName.indexOf('konqueror/3') == 0)) {
  126. capable = 0;
  127. }
  128. } // end if... else if...
  129. } // end if
  130. /* ]]> */
  131. </script>
  132. <script type="text/javascript" src="tbl_change.js.php"></script>
  133. <script type="text/javascript">
  134. /* <![CDATA[ */
  135. var month_names = new Array(
  136. <?php
  137. foreach($MonthsLong as $index => $month)
  138. {
  139. echo '"'.$month.'",';
  140. }
  141. ?>
  142. "");
  143. var day_names = new Array(
  144. <?php
  145. foreach($DaysShort as $index => $day)
  146. {
  147. echo '"'.$day.'",';
  148. }
  149. ?>
  150. "");
  151. /* ]]> */
  152. </script>
  153. </head>
  154. <body onload="initCalendar();">
  155. <div id="calendar_data"></div>
  156. <div id="clock_data"></div>
  157. </body>
  158. </html>