source: schedule/Module/calendar.php

Last change on this file was 17554, checked in by tose, 11 years ago
Modified calendar view
File size: 2.6 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html>
3 <head>
4 <link type="text/css" rel="stylesheet" href="Module/src/css/jscal2.css" />
5 <link type="text/css" rel="stylesheet" href="Module/src/css/border-radius.css" />
6
7 <link id="skin-win2k" title="Win 2K" type="text/css" rel="alternate stylesheet" href="Module/src/css/win2k/win2k.css" />
8 <script src="Module/src/js/jscal2.js"></script>
9 <script src="Module/src/js/unicode-letter.js"></script>
10 <script src="Module/src/js/lang/en.js"></script>
11 <style type="text/css">
12 .highlight { color: #0f0 !important; font-weight: bold; }
13 </style>
14
15 </head>
16 <body style="background-color: #fff">
17
18 <table>
19 <tr>
20 <td valign="top" style="width: 30em;">
21 <div id="cont"></div>
22 <script type="text/javascript">
23 'use strict';
24 var DATE_INFO = {
25 <?php
26 $sqlSched=mysql_query("SELECT DISTINCT(date(fStart)) AS SchedDate FROM schedule");
27 $SchedCnt=mysql_num_rows($sqlSched);
28 $src=1;
29 while($rowSched=mysql_fetch_array($sqlSched))
30 {
31 $timestamp=strtotime($rowSched['SchedDate']);
32 if($SchedCnt==$src)
33 {
34 echo date("Ymd",$timestamp);?>:{klass: "highlight"}<?php
35 }
36 else
37 {
38 echo date("Ymd",$timestamp);?>:{klass: "highlight"},<?php
39 }
40 $src++;
41 ?>
42
43 <?php
44 }
45 ?>
46 };
47
48 function getDateInfo(date, wantsClassName) {
49 var as_number = Calendar.dateToInt(date);
50 return DATE_INFO[as_number];
51 };
52 var CAL = Calendar.setup({
53 cont: "cont",
54 selectionType: Calendar.SEL_MULTIPLE,
55bottomBar: false,
56 dateInfo:getDateInfo
57 })
58 </script>
59 </td>
60 <tr>
61 <td>
62 <script type="text/javascript">
63 'use strict';
64 $(document).ready(function(){
65 //Graph();
66 });
67 var day;
68 var year;
69 var month;
70 CAL.addEventListener("onSelect", function(){
71 day =this.selection.print("%d").join("\n");
72 month =this.selection.print("%m").join("\n");
73 year =this.selection.print("%Y").join("\n");
74 //GetData();
75 GetDate(day,month,year);
76 $('#Scheduling').load('Module/Scheduling.php?days='+year+'-'+month+'-'+day);
77 });
78 </script>
79 </td>
80 </tr>
81
82 </table>
83 </td>
84 </tr>
85 </table>
86 </body>
87</html>
88
89
Note: See TracBrowser for help on using the repository browser.