source: schedule/Module/calendar.php@ 16622

Last change on this file since 16622 was 16622, checked in by tanio, 12 years ago
File size: 3.4 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="Module/src/js/lang/en.js"></script>
16 <script src="js/xmlrequest.js"></script>
17 <style type="text/css">
18 .highlight { color: #0f0 !important; font-weight: bold; }
19 .highlight2 { 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 var DATE_INFO = {
31 <?php
32 $sqlSched=mysql_query("SELECT*FROM schedule");
33 $SchedCnt=mysql_num_rows($sqlSched);
34 $src=1;
35 while($rowSched=mysql_fetch_array($sqlSched))
36 {
37 $timestamp=strtotime($rowSched['fStart']);
38 if($SchedCnt==$src)
39 {
40 echo date("Ymd",$timestamp);?>:{klass: "highlight"}<?php
41 }
42 else
43 {
44 echo date("Ymd",$timestamp);?>:{klass: "highlight"},<?php
45 }
46 $src++;
47 ?>
48
49 <?php
50 }
51 ?>
52 };
53
54 function getDateInfo(date, wantsClassName) {
55 var as_number = Calendar.dateToInt(date);
56 return DATE_INFO[as_number];
57 };
58 var CAL = Calendar.setup({
59 cont: "cont",
60 // weekNumbers: true,
61 selectionType: Calendar.SEL_MULTIPLE,
62 showTime: 24,
63 //fdow : 1,
64 dateInfo:getDateInfo
65 // titleFormat: "%B %Y"
66 })
67 </script>
68 </td>
69
70 <tr>
71 <td>
72 <script type="text/javascript">
73 $(document).ready(function(){
74 //Graph();
75 var date= new Date();
76 var Year=date.getFullYear();
77 var Day=date.getDay();
78 var Month=date.getMonth();
79 <?php
80 $sqlSched1=mysql_query("SELECT*FROM schedule");
81 while($rowSched1=mysql_fetch_array($sqlSched1))
82 {
83
84 $timestamp1=strtotime($rowSched1['fStart']);
85 ?>
86 if(Year+""+Day+""+Month==<?php echo date('Ydm',$timestamp1); ?>)
87 {
88 alert('wa');
89 }
90 <?php
91 }
92 ?>
93
94 });
95 </script>
96 <script type="text/javascript">
97 var day;
98 var year;
99 var month;
100 CAL.addEventListener("onSelect", function(){
101 day =this.selection.print("%d").join("\n");
102 month =this.selection.print("%m").join("\n");
103 year =this.selection.print("%Y").join("\n");
104 testData();
105
106 });
107
108
109
110 </script>
111 </td>
112 </tr>
113
114 </table>
115 </td>
116 </tr>
117 </table>
118
119 </body>
120</html>
121
122
Note: See TracBrowser for help on using the repository browser.