Index: /schedule/Transaction/insert.php
===================================================================
--- /schedule/Transaction/insert.php	(revision 16737)
+++ /schedule/Transaction/insert.php	(revision 16738)
@@ -79,5 +79,5 @@
 				   
 					alert("Sucessfully save");
-					window.location = '../index.php?<?php echo $TimeEX2; ?>';
+					window.location = '../index.php?days=<?php echo $date; ?>';
 				</script>
 				<?php
Index: /schedule/authenticate/body.php
===================================================================
--- /schedule/authenticate/body.php	(revision 16737)
+++ /schedule/authenticate/body.php	(revision 16738)
@@ -57,5 +57,8 @@
 					</div>
 					<div style="width:100%;" align="right">
-						<input type="button" id="save" value="SAVE" class="button" title="Click to save">&nbsp;&nbsp;&nbsp;<input type="button" id="LoadPrev" value="Load Previous Night" class="button" title="Click to load previous night">
+					
+					
+						<?php include 'function/button.php';  ?>
+					
 					</div>
 						<div style="border:2px solid white; width:100%;" id="Scheduling">
@@ -63,5 +66,5 @@
 						
 						include 'function/SplitDelete.php';
-					//	include 'Module/Scheduling';
+				
 						?>
 						
@@ -77,10 +80,10 @@
 
 	<tr>
-		<td width="219" style="border:1px solid white; color:#37DFB1; font-size:14px;" align="center"  >Time</td>
+		<td width="184" style="border:1px solid white; color:#37DFB1; font-size:14px;" align="center"  >Time</td>
 		
 		<td width="170" style="border:1px solid white; color:#37DFB1; font-size:14px;" align="center"  >Measurement</td>
-		<td width="200" style="border:1px solid white; color:#37DFB1; font-size:14px;" align="center"  >Source list</td>
-		<td width="265" style="border:1px solid white; color:#37DFB1; font-size:14px;" align="center"  >Value</td>
-		<td width="118" style="border:1px solid white; color:#37DFB1; font-size:14px;" align="center" >Transaction</td>
+		<td width="145" style="border:1px solid white; color:#37DFB1; font-size:14px;" align="center"  >Source list</td>
+		<td width="316" style="border:1px solid white; color:#37DFB1; font-size:14px;" align="center"  >Value</td>
+		<td width="141" style="border:1px solid white; color:#37DFB1; font-size:14px;" align="center" >Transaction</td>
 	</tr>
 	<tr>
Index: /schedule/function/SplitDelete.php
===================================================================
--- /schedule/function/SplitDelete.php	(revision 16737)
+++ /schedule/function/SplitDelete.php	(revision 16738)
@@ -25,5 +25,15 @@
 	
 	include '../include/factdb.php';
+						 
+						 
+						if(isset($_GET['days'])){ 
 						 $day = $_GET['days'];
+						 }else{
+						 
+						 $day =date("Y-m-d");
+						 
+						 }
+						 
+						 
 						$days = Date('Y-m-d',strtotime($day));
 						?>
Index: /schedule/function/function.php
===================================================================
--- /schedule/function/function.php	(revision 16737)
+++ /schedule/function/function.php	(revision 16738)
@@ -22,5 +22,15 @@
 	$('#save').click(function(){
 var dtr;
-		 dtr = '<?php echo $_GET['days'];  ?>';
+	dtr = '<?php 
+		 
+		 if(isset($_GET['days'])){ 
+						echo $_GET['days']; ;
+						 }else{
+						 
+					echo date("Y-m-d");
+						 
+						 }
+		 
+		  ?>';
 			//alert(dtr);
 		var InputValue = [];
@@ -60,4 +70,71 @@
 	});
 	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	$('#update').click(function(){
+var dtr;
+		 dtr = '<?php 
+		 
+		 if(isset($_GET['days'])){ 
+						echo $_GET['days']; ;
+						 }else{
+						 
+					echo date("Y-m-d");
+						 
+						 }
+		 
+		  ?>';
+			//alert(dtr);
+		var InputValue = [];
+		var selectedSource = [];
+		var selectedTime = [];
+		var selectedMeasurement = [];
+		var Time;
+		var Source;
+		var measure;
+		var value;
+		var checks = 0;
+		for(var i=1;i <= cnt;i++)
+		{
+			if($('#Time'+i).val() != '')
+			{
+				Time=$('#Time'+i).val();
+				Source=$('select[id="source'+i+'"]').val();
+				measure=$('select[id="measurement'+i+'"]').val();
+				value=$('#txtData'+i).val();
+				selectedMeasurement.push(measure);
+				selectedSource.push(Source);
+				selectedTime.push(Time);
+				InputValue.push(value);
+				
+			}else{
+			checks++;
+			
+			}
+		}
+		
+		if(checks == 0){
+		window.location = 'Transaction/update.php?Time='+selectedTime+'&Source='+selectedSource+'&measure='+selectedMeasurement+'&Data='+InputValue+'&Date='+dtr;
+	}else{
+	
+	alert("Please fill all the details!");
+	}
+	});
+	
+	
+	
+	
+	
+	
+	
+	
 	});
  </script>
