- Timestamp:
- 01/04/14 08:28:55 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
schedule/Module/control.php
r17458 r17459 380 380 381 381 <?php 382 while($rows = mysql_fetch_array($fetch)) 382 383 $observations = mysql_query("SELECT * FROM schedule WHERE fStart = '$timestamp'") 384 385 while($rows = mysql_fetch_array($observations)) 383 386 { 384 387 ?> … … 388 391 newtd_c2.appendChild( 389 392 selection = document.createElement("select"), 390 <?php391 $selectm = mysql_query("SELECT * FROM measurement");392 while($rowmeasure = mysql_fetch_array($selectm))393 {394 ?>395 selection.appendChild(396 option = document.createElement("option"),397 option.setAttribute("value","<?php echo $rowmeasure['fMeasurementKey']; ?>"),398 <?php if($rows['fMeasurementTypeKey']==$rowmeasure['fMeasurementKey']){ echo "option.setAttribute('selected',true),";} ?>399 option.appendChild(document.createTextNode("<?php echo $rowmeasure['fMeasurement']; ?>"))400 ),401 <?php402 }403 ?>393 <?php 394 $selectm = mysql_query("SELECT * FROM measurement"); 395 while($rowmeasure = mysql_fetch_array($selectm)) 396 { 397 ?> 398 selection.appendChild( 399 option = document.createElement("option"), 400 option.setAttribute("value","<?php echo $rowmeasure['fMeasurementKey']; ?>"), 401 <?php if($rows['fMeasurementTypeKey']==$rowmeasure['fMeasurementKey']){ echo "option.setAttribute('selected',true),";} ?> 402 option.appendChild(document.createTextNode("<?php echo $rowmeasure['fMeasurement']; ?>")) 403 ), 404 <?php 405 } 406 ?> 404 407 405 408 406 selection.setAttribute('id','measure'), 407 selection.setAttribute('class','measure') 408 ); 409 newtd_c2.setAttribute("width","115"); 410 newtd_c2.setAttribute("align","center"); 411 newtd_c2.appendChild( 412 input_data = document.createElement("input"), 413 input_data.setAttribute("type","button"), 414 input_data.setAttribute("value","+"), 415 input_data.onclick = function(){ 416 return addRow(newtr<?php echo $cnt; ?>); 417 ctr++; 418 }); 419 var newtd_c3 = document.createElement("td"); 420 newtd_c3.setAttribute("width","98"); 421 newtd_c3.setAttribute("align","center"); 422 newtd_c3.appendChild( 423 selection = document.createElement("select"), 409 selection.setAttribute('id','measure'), 410 selection.setAttribute('class','measure') 411 ); 412 newtd_c2.setAttribute("width","115"); 413 newtd_c2.setAttribute("align","center"); 414 newtd_c2.appendChild( 415 input_data = document.createElement("input"), 416 input_data.setAttribute("type","button"), 417 input_data.setAttribute("value","+"), 418 input_data.onclick = function(){ 419 return addRow(newtr<?php echo $cnt; ?>); 420 ctr++; 421 }); 422 var newtd_c3 = document.createElement("td"); 423 newtd_c3.setAttribute("width","98"); 424 newtd_c3.setAttribute("align","center"); 425 newtd_c3.appendChild( 426 selection = document.createElement("select"), 427 <?php 428 $select = mysql_query("SELECT * FROM source"); 429 while($rowsource = mysql_fetch_array($select)) 430 { 431 ?> 432 selection.appendChild( 433 option = document.createElement("option"), 434 option.setAttribute('value','<?php echo $rowsource['fSourceKEY']; ?>'), 435 <?php if($rows['fSourceKey'] == $rowsource['fSourceKEY']){ echo "option.setAttribute('selected',true),"; } ?> 436 option.appendChild(document.createTextNode("<?php echo $rowsource['fSourceName']; ?>")) 437 ), 438 <?php 439 } 440 ?> 441 442 selection.setAttribute('id','source'), // End of retrieving 443 selection.setAttribute('class','source') // End of retrieving 444 ); 445 var newtd_c4 = document.createElement("td"); 446 newtd_c4.setAttribute("width","119"); 447 newtd_c4.setAttribute("align","center"); 448 newtd_c4.appendChild( 449 input_data = document.createElement("input"), 450 input_data.setAttribute("type","text"), 451 input_data.setAttribute("class","selected"), 452 input_data.setAttribute("size","12"), 453 input_data.setAttribute("value","<?php echo $rows['fData']; ?>"), 454 input_data.setAttribute("placeholder","Value") 455 ); 456 var newtd_c5 = document.createElement("td"); 457 newtd_c5.setAttribute("width","115"); 458 newtd_c5.setAttribute("align","center"); 459 newtd_c5.setAttribute("width","115"); 460 newtd_c5.setAttribute("align","center"); 461 newtd_c5.appendChild( 462 input_data = document.createElement("input"), 463 input_data.setAttribute("type","button"), 464 input_data.setAttribute("value","Delete"), 465 input_data.onclick = function(){ return clearNode(newtr<?php echo $cnt; ?>); 466 } 467 ); 468 469 newtr<?php echo $cnt; ?>.appendChild(newtd_c2); 470 newtr<?php echo $cnt; ?>.appendChild(newtd_c3); 471 newtr<?php echo $cnt; ?>.appendChild(newtd_c4); 472 newtr<?php echo $cnt; ?>.appendChild(newtd_c5); 473 newInnertable.appendChild(newtr<?php echo $cnt; ?>); 474 424 475 <?php 425 $select = mysql_query("SELECT * FROM source"); 426 while($rowsource = mysql_fetch_array($select)) 427 { 476 //$rows = mysql_fetch_array($fetch); 477 478 $cnt++; 479 $prevtimestamp = $timestamp; 480 } 428 481 ?> 429 selection.appendChild(430 option = document.createElement("option"),431 option.setAttribute('value','<?php echo $rowsource['fSourceKEY']; ?>'),432 <?php if($rows['fSourceKey'] == $rowsource['fSourceKEY']){ echo "option.setAttribute('selected',true),"; } ?>433 option.appendChild(document.createTextNode("<?php echo $rowsource['fSourceName']; ?>"))434 ),435 <?php436 }437 ?>438 439 selection.setAttribute('id','source'), // End of retrieving440 selection.setAttribute('class','source') // End of retrieving441 );442 var newtd_c4 = document.createElement("td");443 newtd_c4.setAttribute("width","119");444 newtd_c4.setAttribute("align","center");445 newtd_c4.appendChild(446 input_data = document.createElement("input"),447 input_data.setAttribute("type","text"),448 input_data.setAttribute("class","selected"),449 input_data.setAttribute("size","12"),450 input_data.setAttribute("value","<?php echo $rows['fData']; ?>"),451 input_data.setAttribute("placeholder","Value")452 );453 var newtd_c5 = document.createElement("td");454 newtd_c5.setAttribute("width","115");455 newtd_c5.setAttribute("align","center");456 newtd_c5.setAttribute("width","115");457 newtd_c5.setAttribute("align","center");458 newtd_c5.appendChild(459 input_data = document.createElement("input"),460 input_data.setAttribute("type","button"),461 input_data.setAttribute("value","Delete"),462 input_data.onclick = function(){ return clearNode(newtr<?php echo $cnt; ?>);463 }464 );465 466 newtr<?php echo $cnt; ?>.appendChild(newtd_c2);467 newtr<?php echo $cnt; ?>.appendChild(newtd_c3);468 newtr<?php echo $cnt; ?>.appendChild(newtd_c4);469 newtr<?php echo $cnt; ?>.appendChild(newtd_c5);470 newInnertable.appendChild(newtr<?php echo $cnt; ?>);471 472 482 var newtd_c6 = document.createElement("td"); 473 483 newtd_c6.appendChild(newInnertable); … … 498 508 //$(targetView).after(newtr<?php echo $cnt; ?>); 499 509 } 510 500 511 <?php 501 //$rows = mysql_fetch_array($fetch);502 503 $cnt++;504 $prevtimestamp = $timestamp;505 512 } 506 } 507 508 if(mysql_num_rows($fetch)<1) 509 { 510 ?> 511 $('#save').attr('value','SAVE'); 512 addRowClone1(); 513 <?php 514 } 515 516 ?> 513 514 if(mysql_num_rows($fetch)<1) 515 { 516 ?> 517 $('#save').attr('value','SAVE'); 518 addRowClone1(); 519 <?php 520 } 521 522 ?> 517 523 518 524
Note:
See TracChangeset
for help on using the changeset viewer.