calendar_view.php 3.3 KB

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