calendar.php 3.2 KB

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