Changeset 16535
- Timestamp:
- 06/01/13 02:25:37 (12 years ago)
- Location:
- schedule
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
schedule/Transaction/insert.php
r16276 r16535 52 52 $dateTime=new DateTime($date." ".$Times[$i]); 53 53 $parsed_date = $dateTime->format('Y-m-d H:i:s'); 54 54 $new = 0; 55 55 56 56 $select = mysql_query("SELECT * FROM schedule WHERE fLastUpdate = '$parsed_date'"); -
schedule/function/SplitDelete.php
r16507 r16535 4 4 var meas; 5 5 var meas2; 6 var getTableId; 6 7 window.cnt=2; 7 8 var table = document.createElement("table"); … … 26 27 button.setAttribute('id','btnAddTime'), 27 28 button.onclick=function(){ 29 30 31 28 32 if($('#Time1').val() != ""){ var splitting = $('#Time1').val().split(':'); var add = 01; 29 33 … … 41 45 } 42 46 43 meas = "name"; meas2 = "time"; split1(); }else{ alert("please enter value for time to add measurement"); }47 meas = "name"; meas2 = "time"; getTableId = '#table2'; split1(); }else{ alert("please enter value for time to add measurement"); } 44 48 45 49 … … 99 103 button.setAttribute('id','btnAddTime'), 100 104 button.onclick=function(){ 101 if($('#Time1').val() != ""){ timeValue = $('#Time1').val(); meas = "hidden"; meas2 = true; 105 if($('#Time1').val() != ""){ timeValue = $('#Time1').val(); meas = "hidden"; meas2 = true; getTableId = '#table2'; split1(); }else{ alert("please enter value for time to add measurement"); } 102 106 103 107 … … 122 126 button.onclick= function() 123 127 { 124 if($('#Time1').val() != ""){ var splitting = $('#Time1').val().split(':'); var add = 30; 128 129 if($('#Time1').val() != ""){ var splitting = $('#Time1').val().split(':'); var add = 30; 130 125 131 126 132 timeValue =pad(splitting[0],2)+':'+ pad((Number(splitting[1]) + Number(add)),2); … … 137 143 } 138 144 139 meas = "name"; meas2 = "time"; split1(); }else{ alert("please enter value for time to add measurement"); }145 meas = "name"; meas2 = "time"; getTableId = '#table2'; split1(); }else{ alert("please enter value for time to add measurement"); } 140 146 141 147 … … 160 166 tr.appendChild(td4); 161 167 table.appendChild(tr); 162 $('#TableH1').append(table); 168 169 $('#TableH1').append(table); 170 163 171 164 172 … … 198 206 return str; 199 207 200 } meas = "name"; meas2 = "time"; split(); }else{ alert("please enter value for time to add measurement"); }208 } meas = "name"; meas2 = "time"; getTableId = '#table1'; split(); }else{ alert("please enter value for time to add measurement"); } 201 209 202 210 … … 253 261 button.setAttribute('id','btnAddTime'), 254 262 button.onclick=function(){ 255 if($('#Time2').val() != ""){ timeValue = $('#Time2').val(); meas = "hidden"; meas2 = true; split(); }else{ alert("please enter value for time to add measurement"); }263 if($('#Time2').val() != ""){ timeValue = $('#Time2').val(); meas = "hidden"; meas2 = true; getTableId = '#table1'; split(); }else{ alert("please enter value for time to add measurement"); } 256 264 257 265 … … 290 298 } 291 299 292 meas = "name"; meas2 = "time"; split(); }else{ alert("please enter value for time to add measurement"); }300 meas = "name"; meas2 = "time"; getTableId = '#table1'; split(); }else{ alert("please enter value for time to add measurement"); } 293 301 294 302 } … … 312 320 tr.appendChild(td4); 313 321 table.appendChild(tr); 314 $('#TableH').append(table); 322 323 $('#TableH1').append(table); 324 315 325 var meas; 316 326 var timeValue; … … 318 328 function split() 319 329 { 320 if(cnt <= 10){330 321 331 cnt++; 322 332 var table = document.createElement("table"); … … 362 372 return str; 363 373 364 } meas = "name"; meas2 = "time"; split1(); }else{ alert("please enter value for time to add measurement"); }374 } meas = "name"; meas2 = "time"; getTableId = '#table'+cnt; split1(); }else{ alert("please enter value for time to add measurement"); } 365 375 366 376 … … 419 429 button.onclick=function(){ 420 430 421 if($('#Time'+cnt).val() != ""){ timeValue = $('#Time'+cnt).val(); meas = "hidden"; meas2 = true; split1(); }else{ alert("please enter value for time to add measurement"); }431 if($('#Time'+cnt).val() != ""){ timeValue = $('#Time'+cnt).val(); meas = "hidden"; meas2 = true; getTableId = '#table'+cnt; split1(); }else{ alert("please enter value for time to add measurement"); } 422 432 423 433 … … 456 466 } 457 467 458 meas = "name"; meas2 = "time"; split(); }else{ alert("please enter value for time to add measurement"); }468 meas = "name"; meas2 = "time"; getTableId = '#table'+cnt; split(); }else{ alert("please enter value for time to add measurement"); } 459 469 } 460 470 ); … … 477 487 tr.appendChild(td4); 478 488 table.appendChild(tr); 479 $('#TableH').append(table); 480 }else{ 481 482 alert(" only 10 sources are allowed! "); 483 484 } 489 490 $(table).insertAfter($(getTableId)); 491 492 485 493 486 494 } 487 495 function split1() 488 496 { 489 if(cnt <= 10){497 490 498 cnt++; 491 499 var table = document.createElement("table"); … … 529 537 return str; 530 538 531 } meas = "name"; meas2 = "time"; split1(); }else{ alert("please enter value for time to add measurement"); }539 } meas = "name"; meas2 = "time"; getTableId = '#table'+cnt; split1(); }else{ alert("please enter value for time to add measurement"); } 532 540 533 541 … … 587 595 button.onclick=function(){ 588 596 589 if($('#Time'+cnt).val() != ""){ timeValue = $('#Time'+cnt).val(); meas = "hidden"; meas2 = true; split1(); }else{ alert("please enter value for time to add measurement"); }597 if($('#Time'+cnt).val() != ""){ timeValue = $('#Time'+cnt).val(); meas = "hidden"; meas2 = true; getTableId = '#table'+cnt; split1(); }else{ alert("please enter value for time to add measurement"); } 590 598 591 599 … … 623 631 624 632 } 625 626 meas = "name"; meas2 = "time"; split(); }else{ alert("please enter value for time to add measurement"); }633 634 meas = "name"; meas2 = "time"; getTableId = '#table'+cnt; split(); }else{ alert("please enter value for time to add measurement"); } 627 635 } 628 636 ); … … 644 652 tr.appendChild(td4); 645 653 table.appendChild(tr); 646 $('#TableH1').append(table); 647 }else{ 648 649 alert(" only 10 sources are allowed! "); 650 } 654 655 $(table).insertAfter($(getTableId)); 651 656 } 652 657
Note:
See TracChangeset
for help on using the changeset viewer.