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

Source for file calendar_popup.php

Documentation is available at calendar_popup.php

  1. <?php
  2. // $Id: calendar_popup.php 10204 2006-11-26 20:46:53Z pcool $
  3. /*
  4. ==============================================================================
  5.     Dokeos - elearning and course management software
  6.     
  7.     Copyright (c) 2004-2005 Dokeos S.A.
  8.     Copyright (c) Bart Mollet, Hogeschool Gent
  9.     
  10.     For a full list of contributors, see "credits.txt".
  11.     The full license can be read in "license.txt".
  12.     
  13.     This program is free software; you can redistribute it and/or
  14.     modify it under the terms of the GNU General Public License
  15.     as published by the Free Software Foundation; either version 2
  16.     of the License, or (at your option) any later version.
  17.     
  18.     See the GNU General Public License for more details.
  19.     
  20.     Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
  21.     Mail: info@dokeos.com
  22. ==============================================================================
  23. */
  24. // including the relevant language file
  25. // name of the language file that needs to be included 
  26. $language_file 'agenda';
  27. // including the claroline global 
  28. require ('../../../global.inc.php');
  29.  
  30. // the variables for the days and the months
  31. // Defining the shorts for the days
  32. $DaysShort array(get_lang("SundayShort")get_lang("MondayShort")get_lang("TuesdayShort")get_lang("WednesdayShort")get_lang("ThursdayShort")get_lang("FridayShort")get_lang("SaturdayShort"))
  33. // Defining the days of the week to allow translation of the days
  34. $DaysLong array(get_lang("SundayLong")get_lang("MondayLong")get_lang("TuesdayLong")get_lang("WednesdayLong")get_lang("ThursdayLong")get_lang("FridayLong")get_lang("SaturdayLong"))
  35. // Defining the months of the year to allow translation of the months
  36. $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"))
  37. $iso_lang Database :: get_language_isocode($language_interface);
  38. if (empty ($iso_lang) )
  39. {
  40.     //if there was no valid iso-code, use the english one
  41.     $iso_lang 'en';
  42. }
  43. ?>
  44. <!DOCTYPE html 
  45.      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  46.      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  47. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $iso_lang?>" lang="<?php echo $iso_lang?>">
  48. <head>
  49. <title>Calendar</title>
  50. <link rel="stylesheet" type="text/css" href="<?php echo api_get_path(WEB_CODE_PATH)?>/css/default.css"/>
  51. <style type="text/css">
  52. /*<![CDATA[*/
  53. table.calendar
  54. {
  55.     width: 100%;    
  56.     font-size: 11px;
  57.     font-family: verdana, arial, helvetica, sans-serif;
  58. }
  59. table.calendar .monthyear
  60. {
  61.     background-color: #4171B5;
  62.     text-align: center;
  63.     color: #ffffff;
  64. }
  65. table.calendar .daynames
  66. {
  67.     background-color: #D3DFF1;
  68.     text-align: center;
  69. }
  70. table.calendar td
  71. {
  72.     width: 25px;
  73.     height: 25px;
  74.     background-color: #f5f5f5;    
  75.     text-align: center;
  76. }
  77. table.calendar td.selected
  78. {
  79.     border: 1px solid #ff0000; 
  80.     background-color: #FFCECE;
  81. }
  82. table.calendar td a
  83. {
  84.     width: 25px;
  85.     height: 25px;
  86.     text-decoration: none;
  87. }
  88. table.calendar td a:hover
  89. {
  90.     background-color: #ffff00;
  91. }
  92. table.calendar .monthyear a
  93. {
  94.     text-align: center;
  95.     color: #ffffff;
  96. }
  97. table.calendar .monthyear a:hover
  98. {
  99.     text-align: center;
  100.     color: #ff0000;
  101.     background-color: #ffff00;
  102. }
  103. /*]]>*/
  104. </style>
  105. <script type="text/javascript">
  106. /* <![CDATA[ */
  107.     /* added 2004-06-10 by Michael Keck
  108.      *       we need this for Backwards-Compatibility and resolving problems
  109.      *       with non DOM browsers, which may have problems with css 2 (like NC 4)
  110.      */
  111.     var isDOM      = (typeof(document.getElementsByTagName) != 'undefined'
  112.                       && typeof(document.createElement) != 'undefined')
  113.                    ? 1 : 0;
  114.     var isIE4      = (typeof(document.all) != 'undefined'
  115.                       && parseInt(navigator.appVersion) >= 4)
  116.                    ? 1 : 0;
  117.     var isNS4      = (typeof(document.layers) != 'undefined')
  118.                    ? 1 : 0;
  119.     var capable    = (isDOM || isIE4 || isNS4)
  120.                    ? 1 : 0;
  121.     // Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
  122.     if (capable) {
  123.         if (typeof(window.opera) != 'undefined') {
  124.             var browserName = ' ' + navigator.userAgent.toLowerCase();
  125.             if ((browserName.indexOf('konqueror 7') == 0)) {
  126.                 capable = 0;
  127.             }
  128.         } else if (typeof(navigator.userAgent) != 'undefined') {
  129.             var browserName = ' ' + navigator.userAgent.toLowerCase();
  130.             if ((browserName.indexOf('konqueror') > 0) && (browserName.indexOf('konqueror/3') == 0)) {
  131.                 capable = 0;
  132.             }
  133.         } // end if... else if...
  134.     } // end if
  135. /* ]]> */
  136. </script>
  137. <script type="text/javascript" src="tbl_change.js.php"></script>
  138. <script type="text/javascript">
  139. /* <![CDATA[ */
  140. var month_names = new Array(
  141. <?php
  142. foreach($MonthsLong as $index => $month)
  143. {
  144.     echo '"'.$month.'",';
  145. }
  146. ?>
  147. "");
  148. var day_names = new Array(
  149. <?php
  150. foreach($DaysShort as $index => $day)
  151. {
  152.     echo '"'.$day.'",';
  153. }
  154. ?>
  155. "");
  156. /* ]]> */
  157. </script>
  158. </head>
  159. <body onload="initCalendar();">
  160. <div id="calendar_data"></div>
  161. <div id="clock_data"></div>
  162. </body>
  163. </html>

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