calendar.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. // name of the language file that needs to be included
  4. $language_file = 'agenda';
  5. // including the global
  6. require_once '../inc/global.inc.php';
  7. // the variables for the days and the months
  8. // Defining the shorts for the days
  9. $DaysShort = api_get_week_days_short();
  10. // Defining the days of the week to allow translation of the days
  11. $DaysLong = api_get_week_days_long();
  12. // Defining the months of the year to allow translation of the months
  13. $MonthsLong = api_get_months_long();
  14. ?>
  15. <html>
  16. <head>
  17. <title>Calendar</title>
  18. <style type="text/css">
  19. table.calendar
  20. {
  21. width: 100%;
  22. font-size: 11px;
  23. font-family: verdana, arial, helvetica, sans-serif;
  24. }
  25. table.calendar .monthyear
  26. {
  27. background-color: #4171B5;
  28. text-align: center;
  29. color: #ffffff;
  30. }
  31. table.calendar .daynames
  32. {
  33. background-color: #D3DFF1;
  34. text-align: center;
  35. }
  36. table.calendar td
  37. {
  38. width: 25px;
  39. height: 25px;
  40. background-color: #f5f5f5;
  41. text-align: center;
  42. }
  43. table.calendar td.selected
  44. {
  45. border: 1px solid #ff0000;
  46. background-color: #FFCECE;
  47. }
  48. table.calendar td a
  49. {
  50. width: 25px;
  51. height: 25px;
  52. text-decoration: none;
  53. }
  54. table.calendar td a:hover
  55. {
  56. background-color: #ffff00;
  57. }
  58. table.calendar .monthyear a
  59. {
  60. text-align: center;
  61. color: #ffffff;
  62. }
  63. table.calendar .monthyear a:hover
  64. {
  65. text-align: center;
  66. color: #ff0000;
  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. echo '"'.$month.'",';
  109. }
  110. ?>
  111. "");
  112. var day_names = new Array(
  113. <?php
  114. foreach($DaysShort as $index => $day)
  115. {
  116. echo '"'.$day.'",';
  117. }
  118. ?>
  119. "");
  120. //-->
  121. </script>
  122. </head>
  123. <body onLoad="initCalendar();">
  124. <div id="calendar_data"></div>
  125. <div id="clock_data"></div>
  126. </body>
  127. </html>