Changeset 15685 for schedule/function/function.php
- Timestamp:
- 05/18/13 14:10:04 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
schedule/function/function.php
r15684 r15685 1 1 <script type="text/javascript"> 2 3 2 var currentDate = new Date(); 4 3 var day = currentDate.getDate(); 5 4 var month = currentDate.getMonth() + 1; 6 5 var year = currentDate.getFullYear(); 7 document.getElementById('day').innerHTML=day; 6 var fullday=day+'-'+month+'-'+year; 7 <?php 8 $cntsource=mysql_query("SELECT COUNT(*) as `SourceID` FROM source"); 9 $rowcnt=mysql_fetch_array($cntsource); 10 $Total= $rowcnt['SourceID']; 11 ?> 8 12 $('#save').click(function(){ 9 13 var InputValue = []; 14 var selectedSource = []; 15 var selectedTime = []; 16 var selectedMeasurement = []; 17 var Time; 18 var Source; 19 var measure; 20 var value; 21 for(var i=1;i<<?php echo $Total; ?>;i++) 22 { 23 if($('#Time').val()||$('#Time').val()>0) 24 { 25 Time=$('#Time'+i).val(); 26 Source=$('select[id="source'+i+'"]').val(); 27 measure=$('select[id="measurement'+i+'"]').val(); 28 value=$('#txtData'+i).val(); 29 selectedMeasurement.push(measure); 30 selectedSource.push(Source); 31 selectedTime.push(Time); 32 InputValue.push(value); 33 } 34 } 35 window.location = 'Transaction/insert.php?Time='+selectedTime+'&Source='+selectedSource+'&measure='+selectedMeasurement+'&Data='+InputValue+'&Date='+fullday; 36 }); 37 $('#loadprev').click(function(){ 10 38 11 39 });
Note:
See TracChangeset
for help on using the changeset viewer.