calendar.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <?php //$Id: calendar.php 16723 2008-11-12 15:41:34Z pcool $
  2. /*
  3. ==============================================================================
  4. Dokeos - elearning and course management software
  5. Copyright (c) 2004-2008 Dokeos SPRL
  6. Copyright (c) 2003-2005 Ghent University (UGent)
  7. Copyright (c) various contributors
  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, rue du Corbeau, 108, B-1030 Brussels, Belgium
  16. Mail: info@dokeos.com
  17. ==============================================================================
  18. */
  19. // name of the language file that needs to be included
  20. $language_file = 'agenda';
  21. // including the claroline global
  22. include('../inc/global.inc.php');
  23. //session
  24. if(isset($_GET['id_session']))
  25. $_SESSION['id_session'] = $_GET['id_session'];
  26. // the variables for the days and the months
  27. // Defining the shorts for the days
  28. $DaysShort = array(get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
  29. // Defining the days of the week to allow translation of the days
  30. $DaysLong = array(get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
  31. // Defining the months of the year to allow translation of the months
  32. $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"));
  33. ?>
  34. <html>
  35. <head>
  36. <title>Calendar</title>
  37. <style type="text/css">
  38. @import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo api_get_setting('stylesheets'); ?>/default.css";
  39. .data_table th
  40. {
  41. font-size: 10px;
  42. }
  43. .data_table td
  44. {
  45. font-size: 10px;
  46. width: 25px;
  47. height: 25px;
  48. }
  49. table.calendar td
  50. {
  51. background-color: #f5f5f5;
  52. text-align: center;
  53. }
  54. .data_table td.selected
  55. {
  56. border: 1px solid #ff0000;
  57. background-color: #FFCECE;
  58. }
  59. .data_table td a
  60. {
  61. width: 25px;
  62. height: 25px;
  63. text-decoration: none;
  64. }
  65. .data_table td a:hover
  66. {
  67. background-color: #ffff00;
  68. }
  69. </style>
  70. <script language="JavaScript" type="text/javascript">
  71. <!--
  72. /* added 2004-06-10 by Michael Keck
  73. * we need this for Backwards-Compatibility and resolving problems
  74. * with non DOM browsers, which may have problems with css 2 (like NC 4)
  75. */
  76. var isDOM = (typeof(document.getElementsByTagName) != 'undefined'
  77. && typeof(document.createElement) != 'undefined')
  78. ? 1 : 0;
  79. var isIE4 = (typeof(document.all) != 'undefined'
  80. && parseInt(navigator.appVersion) >= 4)
  81. ? 1 : 0;
  82. var isNS4 = (typeof(document.layers) != 'undefined')
  83. ? 1 : 0;
  84. var capable = (isDOM || isIE4 || isNS4)
  85. ? 1 : 0;
  86. // Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
  87. if (capable) {
  88. if (typeof(window.opera) != 'undefined') {
  89. var browserName = ' ' + navigator.userAgent.toLowerCase();
  90. if ((browserName.indexOf('konqueror 7') == 0)) {
  91. capable = 0;
  92. }
  93. } else if (typeof(navigator.userAgent) != 'undefined') {
  94. var browserName = ' ' + navigator.userAgent.toLowerCase();
  95. if ((browserName.indexOf('konqueror') > 0) && (browserName.indexOf('konqueror/3') == 0)) {
  96. capable = 0;
  97. }
  98. } // end if... else if...
  99. } // end if
  100. //-->
  101. </script>
  102. <script type="text/javascript" src="tbl_change.js"></script>
  103. <script type="text/javascript">
  104. <!--
  105. var month_names = new Array(
  106. <?php
  107. foreach($MonthsLong as $index => $month)
  108. {
  109. echo '"'.$month.'",';
  110. }
  111. ?>
  112. "");
  113. var day_names = new Array(
  114. <?php
  115. foreach($DaysShort as $index => $day)
  116. {
  117. echo '"'.$day.'",';
  118. }
  119. ?>
  120. "");
  121. //-->
  122. </script>
  123. </head>
  124. <body onLoad="initCalendar();">
  125. <div id="calendar_data"></div>
  126. <div id="clock_data"></div>
  127. </body>
  128. </html>