calendar_popup.php 3.8 KB

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