source: schedule/Module/calendar.php@ 17553

Last change on this file since 17553 was 17507, checked in by tose, 11 years ago
Modified query fetching dates with schedule
File size: 2.7 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
9 <script src="js/highcharts.js"></script>
10 <script src="js/exporting.js"></script>
11
12 <script src="Module/src/js/jscal2.js"></script>
13 <script src="Module/src/js/unicode-letter.js"></script>
14 <script src="js/chart.js"></script>
15 <script src="js/Graph.js"></script>
16
17 <script src="Module/src/js/lang/en.js"></script>
18 <style type="text/css">
19 .highlight { color: #0f0 !important; font-weight: bold; }
20 </style>
21
22 </head>
23 <body style="background-color: #fff">
24
25 <table>
26 <tr>
27 <td valign="top" style="width: 30em;">
28 <div id="cont"></div>
29 <script type="text/javascript">
30 'use strict';
31 var DATE_INFO = {
32 <?php
33 $sqlSched=mysql_query("SELECT DISTINCT(date(fStart)) AS SchedDate FROM schedule");
34 $SchedCnt=mysql_num_rows($sqlSched);
35 $src=1;
36 while($rowSched=mysql_fetch_array($sqlSched))
37 {
38 $timestamp=strtotime($rowSched['SchedDate']);
39 if($SchedCnt==$src)
40 {
41 echo date("Ymd",$timestamp);?>:{klass: "highlight"}<?php
42 }
43 else
44 {
45 echo date("Ymd",$timestamp);?>:{klass: "highlight"},<?php
46 }
47 $src++;
48 ?>
49
50 <?php
51 }
52 ?>
53 };
54
55 function getDateInfo(date, wantsClassName) {
56 var as_number = Calendar.dateToInt(date);
57 return DATE_INFO[as_number];
58 };
59 var CAL = Calendar.setup({
60 cont: "cont",
61 selectionType: Calendar.SEL_MULTIPLE,
62 showTime: 24,
63 dateInfo:getDateInfo
64 })
65 </script>
66 </td>
67 <tr>
68 <td>
69 <script type="text/javascript">
70 'use strict';
71 $(document).ready(function(){
72 Graph();
73 });
74 var day;
75 var year;
76 var month;
77 CAL.addEventListener("onSelect", function(){
78 day =this.selection.print("%d").join("\n");
79 month =this.selection.print("%m").join("\n");
80 year =this.selection.print("%Y").join("\n");
81 GetData();
82 GetDate(day,month,year);
83 $('#Scheduling').load('Module/Scheduling.php?days='+year+'-'+month+'-'+day);
84 });
85 </script>
86 </td>
87 </tr>
88
89 </table>
90 </td>
91 </tr>
92 </table>
93 </body>
94</html>
95
96
Note: See TracBrowser for help on using the repository browser.