Index: schedule/Transaction/insert.php
===================================================================
--- schedule/Transaction/insert.php	(revision 15804)
+++ schedule/Transaction/insert.php	(revision 15805)
@@ -1,3 +1,5 @@
 <?php
+include 'include/factdb.php';
+
  $Time =$_GET['Time'];
  $SelectedSource = $_GET['Source'];
Index: schedule/function/function.php
===================================================================
--- schedule/function/function.php	(revision 15804)
+++ schedule/function/function.php	(revision 15805)
@@ -1,3 +1,23 @@
  <script type="text/javascript">
+ 
+ <?php
+ if($_GET['day'] || $_GET['month'] || $_GET['year']){
+ 
+ ?>
+ 
+	var day = <?php echo $_GET['day'];  ?>
+	var month = <?php  echo $_GET['month']; ?>
+	var year = <?php echo $_GET['year']; ?>
+	var fullday=day+'-'+month+'-'+year;
+		
+ 
+ 
+ <?php
+ 
+ 
+ }else{
+ 
+ ?>
+ 
 	$(document).ready(function(){
 	var currentDate = new Date();
@@ -6,6 +26,8 @@
 	var year = currentDate.getFullYear();
 	var fullday=day+'-'+month+'-'+year;
+	<?php    }  ?>
+	<?php
 	
-	<?php
+	
 	
 		$cntsource=mysql_query("SELECT COUNT(*) as `SourceID` FROM source");
@@ -24,5 +46,5 @@
 		for(var i=1;i<<?php echo $Total; ?>;i++)
 		{
-			if($('#Time').val()||$('#Time').val()>0)
+			if($('#Time'+cnt).val()||$('#Time'+cnt).val()>0)
 			{
 				Time=$('#Time'+i).val();
