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

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