calendar.php 3.3 KB

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