calendar_popup.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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. /*<![CDATA[*/
  27. @import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo api_get_setting('stylesheets'); ?>/default.css";
  28. table.calendar {
  29. width: 100%;
  30. font-size: 12px;
  31. font-family: verdana, arial, helvetica, sans-serif;
  32. }
  33. table.calendar .monthyear
  34. {
  35. background-color: #4171B5;
  36. text-align: center;
  37. color: #ffffff;
  38. font-size:12px;
  39. padding:5px;
  40. margin:10px;
  41. }
  42. table.calendar .daynames {
  43. background-color: #D3DFF1;
  44. text-align: center;
  45. }
  46. table.calendar td
  47. {
  48. width: 25px;
  49. height: 25px;
  50. background-color: #f5f5f5;
  51. text-align: center;
  52. }
  53. table.calendar td.selected
  54. {
  55. border: 1px solid #ff0000;
  56. background-color: #FFCECE;
  57. }
  58. table.calendar td a
  59. {
  60. width: 25px;
  61. height: 25px;
  62. text-decoration: none;
  63. }
  64. table.calendar td a:hover
  65. {
  66. background-color: #ffff00;
  67. }
  68. table.calendar td a div
  69. {
  70. padding:5px;
  71. }
  72. table.calendar td a div:hover
  73. {
  74. background-color: #ffff00;
  75. }
  76. table.calendar .monthyear a {
  77. text-align: center;
  78. /* color: #ffffff; */
  79. }
  80. table.calendar .monthyear a:hover
  81. {
  82. text-align: center;
  83. /*color: #ff0000;*/
  84. /*background-color: #ffff00;*/
  85. }
  86. /*]]>*/
  87. </style>
  88. <script type="text/javascript">
  89. /* <![CDATA[ */
  90. /* added 2004-06-10 by Michael Keck
  91. * we need this for Backwards-Compatibility and resolving problems
  92. * with non DOM browsers, which may have problems with css 2 (like NC 4)
  93. */
  94. var isDOM = (typeof(document.getElementsByTagName) != 'undefined'
  95. && typeof(document.createElement) != 'undefined')
  96. ? 1 : 0;
  97. var isIE4 = (typeof(document.all) != 'undefined'
  98. && parseInt(navigator.appVersion) >= 4)
  99. ? 1 : 0;
  100. var isNS4 = (typeof(document.layers) != 'undefined')
  101. ? 1 : 0;
  102. var capable = (isDOM || isIE4 || isNS4)
  103. ? 1 : 0;
  104. // Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
  105. if (capable) {
  106. if (typeof(window.opera) != 'undefined') {
  107. var browserName = ' ' + navigator.userAgent.toLowerCase();
  108. if ((browserName.indexOf('konqueror 7') == 0)) {
  109. capable = 0;
  110. }
  111. } else if (typeof(navigator.userAgent) != 'undefined') {
  112. var browserName = ' ' + navigator.userAgent.toLowerCase();
  113. if ((browserName.indexOf('konqueror') > 0) && (browserName.indexOf('konqueror/3') == 0)) {
  114. capable = 0;
  115. }
  116. } // end if... else if...
  117. } // end if
  118. /* ]]> */
  119. </script>
  120. <script type="text/javascript" src="tbl_change.js.php"></script>
  121. <script type="text/javascript">
  122. /* <![CDATA[ */
  123. var month_names = new Array(
  124. <?php
  125. foreach($MonthsLong as $index => $month)
  126. {
  127. echo '"'.$month.'",';
  128. }
  129. ?>
  130. "");
  131. var day_names = new Array(
  132. <?php
  133. foreach($DaysShort as $index => $day)
  134. {
  135. echo '"'.$day.'",';
  136. }
  137. ?>
  138. "");
  139. /* ]]> */
  140. </script>
  141. </head>
  142. <body dir="<?php echo api_get_text_direction(); ?>" onLoad="javascript: initCalendar();">
  143. <div id="calendar_data"></div>
  144. <div id="clock_data"></div>
  145. </body>
  146. </html>