calendar_view.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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. @import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo api_get_setting('stylesheets'); ?>/default.css";
  29. .data_table th
  30. {
  31. font-size: 10px;
  32. }
  33. .data_table td
  34. {
  35. font-size: 10px;
  36. width: 25px;
  37. height: 25px;
  38. }
  39. table.calendar
  40. {
  41. width: 100%;
  42. font-size: 11px;
  43. font-family: verdana, arial, helvetica, sans-serif;
  44. }
  45. table.calendar .monthyear
  46. {
  47. background-color: #4171B5;
  48. text-align: center;
  49. color: #ffffff;
  50. }
  51. table.calendar .daynames
  52. {
  53. background-color: #D3DFF1;
  54. text-align: center;
  55. }
  56. table.calendar td
  57. {
  58. width: 25px;
  59. height: 25px;
  60. background-color: #f5f5f5;
  61. text-align: center;
  62. }
  63. table.calendar td.selected
  64. {
  65. border: 1px solid #ff0000;
  66. background-color: #FFCECE;
  67. }
  68. table.calendar td a
  69. {
  70. width: 25px;
  71. height: 25px;
  72. text-decoration: none;
  73. }
  74. table.calendar td a:hover
  75. {
  76. background-color: #ffff00;
  77. }
  78. table.calendar .monthyear a
  79. {
  80. text-align: center;
  81. color: #ffffff;
  82. }
  83. table.calendar .monthyear a:hover
  84. {
  85. text-align: center;
  86. color: #ff0000;
  87. background-color: #ffff00;
  88. }
  89. </style>
  90. <script src=<?php echo api_get_path(WEB_LIBRARY_PATH).'javascript/calendar/calendar_tbl_change.js'; ?>" type="text/javascript" ></script>
  91. <script type="text/javascript">
  92. /* added 2004-06-10 by Michael Keck
  93. * we need this for Backwards-Compatibility and resolving problems
  94. * with non DOM browsers, which may have problems with css 2 (like NC 4)
  95. */
  96. var isDOM = (typeof(document.getElementsByTagName) != 'undefined'
  97. && typeof(document.createElement) != 'undefined')
  98. ? 1 : 0;
  99. var isIE4 = (typeof(document.all) != 'undefined'
  100. && parseInt(navigator.appVersion) >= 4)
  101. ? 1 : 0;
  102. var isNS4 = (typeof(document.layers) != 'undefined')
  103. ? 1 : 0;
  104. var capable = (isDOM || isIE4 || isNS4)
  105. ? 1 : 0;
  106. // Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
  107. if (capable) {
  108. if (typeof(window.opera) != 'undefined') {
  109. var browserName = ' ' + navigator.userAgent.toLowerCase();
  110. if ((browserName.indexOf('konqueror 7') == 0)) {
  111. capable = 0;
  112. }
  113. } else if (typeof(navigator.userAgent) != 'undefined') {
  114. var browserName = ' ' + navigator.userAgent.toLowerCase();
  115. if ((browserName.indexOf('konqueror') > 0) && (browserName.indexOf('konqueror/3') == 0)) {
  116. capable = 0;
  117. }
  118. } // end if... else if...
  119. } // end if
  120. var month_names = new Array(
  121. <?php
  122. foreach($MonthsLong as $index => $month)
  123. {
  124. echo '"'.$month.'",';
  125. }
  126. ?>
  127. "");
  128. var day_names = new Array(
  129. <?php
  130. foreach($DaysShort as $index => $day)
  131. {
  132. echo '"'.$day.'",';
  133. }
  134. ?>
  135. "");
  136. </script>
  137. </head>
  138. <body onLoad="initCalendar();">
  139. <div id="calendar_data"></div>
  140. <div id="clock_data"></div>
  141. </body>
  142. </html>