calendar_view.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <?php // $id: $
  2. /*
  3. ==============================================================================
  4. Dokeos - elearning and course management software
  5. Copyright (c) 2008 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.admin
  19. * @author Carlos Vargas
  20. * This file is the calendar/calendar.php
  21. ==============================================================================
  22. */
  23. // name of the language file that needs to be included
  24. $language_file = 'agenda';
  25. // including the claroline global
  26. include('../inc/global.inc.php');
  27. //session
  28. if(isset($_GET['id_session']))
  29. $_SESSION['id_session'] = $_GET['id_session'];
  30. // the variables for the days and the months
  31. // Defining the shorts for the days
  32. $DaysShort = api_get_week_days_short();
  33. // Defining the days of the week to allow translation of the days
  34. $DaysLong = api_get_week_days_long();
  35. // Defining the months of the year to allow translation of the months
  36. $MonthsLong = api_get_months_long();
  37. ?>
  38. <html>
  39. <head>
  40. <title>Calendar</title>
  41. <style type="text/css">
  42. @import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo api_get_setting('stylesheets'); ?>/default.css";
  43. .data_table th
  44. {
  45. font-size: 10px;
  46. }
  47. .data_table td
  48. {
  49. font-size: 10px;
  50. width: 25px;
  51. height: 25px;
  52. }
  53. table.calendar
  54. {
  55. width: 100%;
  56. font-size: 11px;
  57. font-family: verdana, arial, helvetica, sans-serif;
  58. }
  59. table.calendar .monthyear
  60. {
  61. background-color: #4171B5;
  62. text-align: center;
  63. color: #ffffff;
  64. }
  65. table.calendar .daynames
  66. {
  67. background-color: #D3DFF1;
  68. text-align: center;
  69. }
  70. table.calendar td
  71. {
  72. width: 25px;
  73. height: 25px;
  74. background-color: #f5f5f5;
  75. text-align: center;
  76. }
  77. table.calendar td.selected
  78. {
  79. border: 1px solid #ff0000;
  80. background-color: #FFCECE;
  81. }
  82. table.calendar td a
  83. {
  84. width: 25px;
  85. height: 25px;
  86. text-decoration: none;
  87. }
  88. table.calendar td a:hover
  89. {
  90. background-color: #ffff00;
  91. }
  92. table.calendar .monthyear a
  93. {
  94. text-align: center;
  95. color: #ffffff;
  96. }
  97. table.calendar .monthyear a:hover
  98. {
  99. text-align: center;
  100. color: #ff0000;
  101. background-color: #ffff00;
  102. }
  103. </style>
  104. <script language="JavaScript" type="text/javascript">
  105. <!--
  106. /* added 2004-06-10 by Michael Keck
  107. * we need this for Backwards-Compatibility and resolving problems
  108. * with non DOM browsers, which may have problems with css 2 (like NC 4)
  109. */
  110. var isDOM = (typeof(document.getElementsByTagName) != 'undefined'
  111. && typeof(document.createElement) != 'undefined')
  112. ? 1 : 0;
  113. var isIE4 = (typeof(document.all) != 'undefined'
  114. && parseInt(navigator.appVersion) >= 4)
  115. ? 1 : 0;
  116. var isNS4 = (typeof(document.layers) != 'undefined')
  117. ? 1 : 0;
  118. var capable = (isDOM || isIE4 || isNS4)
  119. ? 1 : 0;
  120. // Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
  121. if (capable) {
  122. if (typeof(window.opera) != 'undefined') {
  123. var browserName = ' ' + navigator.userAgent.toLowerCase();
  124. if ((browserName.indexOf('konqueror 7') == 0)) {
  125. capable = 0;
  126. }
  127. } else if (typeof(navigator.userAgent) != 'undefined') {
  128. var browserName = ' ' + navigator.userAgent.toLowerCase();
  129. if ((browserName.indexOf('konqueror') > 0) && (browserName.indexOf('konqueror/3') == 0)) {
  130. capable = 0;
  131. }
  132. } // end if... else if...
  133. } // end if
  134. //-->
  135. </script>
  136. <script type="text/javascript" src="calendar_tbl_change.js"></script>
  137. <script type="text/javascript">
  138. <!--
  139. var month_names = new Array(
  140. <?php
  141. foreach($MonthsLong as $index => $month)
  142. {
  143. echo '"'.$month.'",';
  144. }
  145. ?>
  146. "");
  147. var day_names = new Array(
  148. <?php
  149. foreach($DaysShort as $index => $day)
  150. {
  151. echo '"'.$day.'",';
  152. }
  153. ?>
  154. "");
  155. //-->
  156. </script>
  157. </head>
  158. <body onLoad="initCalendar();">
  159. <div id="calendar_data"></div>
  160. <div id="clock_data"></div>
  161. </body>
  162. </html>