- Timestamp:
- 05/22/13 17:17:30 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
schedule/Module/calendar.php
r16021 r16023 28 28 <script type="text/javascript"> 29 29 var DATE_INFO = { 30 20130507: { klass: "highlight", tooltip: "%Y/%m/%d (%A)<br />That was yesterday" }, 31 20130508: { klass: "highlight", tooltip: "And this is TODAY" } 30 <?php 31 $sqlSched=mysql_query("SELECT*FROM schedule"); 32 $SchedCnt=mysql_num_rows($sqlSched); 33 $cntr=1; 34 while($rowSched=mysql_fetch_array($sqlSched)) 35 { 36 $timestamp=strtotime($rowSched['fStart']); 37 if($SchedCnt==$counter) 38 { 39 echo date("Ymd",$timestamp);?>{klass: "highlight", tooltip: "%Y/%m/%d (%A)<br />That was yesterday"}<?php 40 } 41 else 42 { 43 echo date("Ymd",$timestamp);?>{klass: "highlight", tooltip: "%Y/%m/%d (%A)<br />That was yesterday"},<?php 44 } 45 cntr++; 46 ?> 47 48 // 20130507: { klass: "highlight", tooltip: "%Y/%m/%d (%A)<br />That was yesterday" }, 49 // 20130508: { klass: "highlight", tooltip: "And this is TODAY" } 50 <?php 51 } 52 ?> 32 53 }; 33 54 … … 59 80 var year =this.selection.print("%Y").join("\n"); 60 81 var newline = []; 61 var newdata;82 var YaxisData; 62 83 var newtime; 63 84 var source=[]; … … 153 174 s.push(parseFloat(newline[c])); 154 175 } 155 var finaldata=[];176 var Timedata=[]; 156 177 var a=[]; 157 178 for(var i=1;i<arrTime.length-1;i++) … … 161 182 if(Temp[i]==8) 162 183 { 163 finaldata.push(arrTime[i]+24+'.08');164 } 165 else 166 finaldata.push(arrTime[i]+24+'.'+Temp[i]);184 Timedata.push(arrTime[i]+24+'.08'); 185 } 186 else 187 Timedata.push(arrTime[i]+24+'.'+Temp[i]); 167 188 } 168 189 else if(arrTime[i]==1) … … 170 191 if(Temp[i]==8) 171 192 { 172 finaldata.push(arrTime[i]+24+'.08');173 } 174 else 175 finaldata.push(arrTime[i]+24+'.'+Temp[i]);193 Timedata.push(arrTime[i]+24+'.08'); 194 } 195 else 196 Timedata.push(arrTime[i]+24+'.'+Temp[i]); 176 197 } 177 198 else if(arrTime[i]==2) … … 179 200 if(Temp[i]==8) 180 201 { 181 finaldata.push(arrTime[i]+24+'.08');182 } 183 else 184 finaldata.push(arrTime[i]+24+'.'+Temp[i]);202 Timedata.push(arrTime[i]+24+'.08'); 203 } 204 else 205 Timedata.push(arrTime[i]+24+'.'+Temp[i]); 185 206 } 186 207 else if(arrTime[i]==3) … … 188 209 if(Temp[i]==8) 189 210 { 190 finaldata.push(arrTime[i]+24+'.08');191 } 192 else 193 finaldata.push(arrTime[i]+24+'.'+Temp[i]);211 Timedata.push(arrTime[i]+24+'.08'); 212 } 213 else 214 Timedata.push(arrTime[i]+24+'.'+Temp[i]); 194 215 } 195 216 else if(arrTime[i]==4) … … 197 218 if(Temp[i]==8) 198 219 { 199 finaldata.push(arrTime[i]+24+'.08');200 } 201 else 202 finaldata.push(arrTime[i]+24+'.'+Temp[i]);220 Timedata.push(arrTime[i]+24+'.08'); 221 } 222 else 223 Timedata.push(arrTime[i]+24+'.'+Temp[i]); 203 224 } 204 225 else if(arrTime[i]==5) … … 206 227 if(Temp[i]==8) 207 228 { 208 finaldata.push(arrTime[i]+24+'.08');209 } 210 else 211 finaldata.push(arrTime[i]+24+'.'+Temp[i]);229 Timedata.push(arrTime[i]+24+'.08'); 230 } 231 else 232 Timedata.push(arrTime[i]+24+'.'+Temp[i]); 212 233 } 213 234 else if(arrTime[i]==6) … … 215 236 if(Temp[i]==8) 216 237 { 217 finaldata.push(arrTime[i]+24+'.08');218 } 219 else 220 finaldata.push(arrTime[i]+24+'.'+Temp[i]);238 Timedata.push(arrTime[i]+24+'.08'); 239 } 240 else 241 Timedata.push(arrTime[i]+24+'.'+Temp[i]); 221 242 } 222 243 else if(arrTime[i]==7) … … 224 245 if(Temp[i]==8) 225 246 { 226 finaldata.push(arrTime[i]+24+'.08');227 } 228 else 229 finaldata.push(arrTime[i]+24+'.'+Temp[i]);247 Timedata.push(arrTime[i]+24+'.08'); 248 } 249 else 250 Timedata.push(arrTime[i]+24+'.'+Temp[i]); 230 251 } 231 252 else if(arrTime[i]==8) … … 233 254 if(Temp[i]==8) 234 255 { 235 finaldata.push(arrTime[i]+24+'.08');236 } 237 else 238 finaldata.push(arrTime[i]+24+'.'+Temp[i]);256 Timedata.push(arrTime[i]+24+'.08'); 257 } 258 else 259 Timedata.push(arrTime[i]+24+'.'+Temp[i]); 239 260 } 240 261 else if(Temp[i]==8) 241 262 { 242 263 243 finaldata.push(arrTime[i]+'.08');264 Timedata.push(arrTime[i]+'.08'); 244 265 245 266 } 246 267 else 247 finaldata.push(arrTime[i]+'.'+Temp[i]);268 Timedata.push(arrTime[i]+'.'+Temp[i]); 248 269 249 270 } 250 for(var i=0;i< finaldata.length;i++)271 for(var i=0;i<Timedata.length;i++) 251 272 { 252 a.push("["+parseFloat( finaldata[i])+"]");273 a.push("["+parseFloat(Timedata[i])+"]"); 253 274 } 254 275 … … 259 280 260 281 var chart = new Highcharts.Chart(options); 261 newdata=s;262 263 264 //document.getElementById('data').innerHTML= finaldata+"T"+s;282 YaxisData=s; 283 284 285 //document.getElementById('data').innerHTML=Timedata+"T"+s; 265 286 //document.getElementById('sourcelist').innerHTML=; //aki man edit kuya 266 287 … … 268 289 /*options.series.push({ 269 290 270 data:[parseFloat( finaldata),parseFloat(newdata1)]291 data:[parseFloat(Timedata),parseFloat(YaxisData1)] 271 292 });*/ 272 293 for(var src=0;src<source.length;src++) 273 294 { 274 chart.addSeries({name:source[src], data:[]}); 295 chart.addSeries({name:source[src], data:[]}); // created a series of data and add name of displayed source 275 296 for(var i=0;i<s.length;i++) 276 297 { 277 298 278 chart.series[0].addPoint({ 279 x: finaldata[i],280 y: newdata[i]299 chart.series[0].addPoint({ // series[0] means index of zero in data; 300 x:Timedata[i], // Time 301 y:YaxisData[i] // Value 281 302 }) 282 303
Note:
See TracChangeset
for help on using the changeset viewer.