dokeos
[ class tree: dokeos ] [ index: dokeos ] [ all elements ]

Source for file calendar.php

Documentation is available at calendar.php

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

Documentation generated on Thu, 12 Jun 2008 13:01:48 -0500 by phpDocumentor 1.4.1