calendar_view.php 3.8 KB

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