source: schedule/Transaction/insert.php@ 15911

Last change on this file since 15911 was 15911, checked in by tanio, 12 years ago
File size: 1.2 KB
Line 
1<?php
2include '../include/factdb.php';
3
4 $Time =$_GET['Time'];
5 $SelectedSource = $_GET['Source'];
6 $Date = $_GET['Date'];
7 $SelectedMeasure = $_GET['measure'];
8$TimeEX = explode("-",$Date);
9
10echo $TimeEX2 = "day=".$TimeEX[0]."&month=".$TimeEX[1]."&year=".$TimeEX[2];
11echo $limtex = count(explode(",",$SelectedSource));
12$insertdate = $TimeEX[2]."-".$TimeEX[1]."-".$TimeEx[0];
13$value = $_GET['Data'];
14//$date = new DateTime($_GET['Date']);
15$n_value = explode(",",$value);
16echo "<br />";
17//echo $date->format('Y-m-d H:i:s');
18//fdgdfgdf
19$Time = explode(",",$Time);
20$select = explode(",",$SelectedSource);
21$measure = explode(",",$SelectedMeasure);
22echo "<br />";
23for($i=0;$i<=$limtex-1;$i++){
24
25
26 $n1 = $n_value[$i];
27
28 $select[$i];
29
30
31 $selectf = $select[$i];
32 $Timef = $Time[$i];
33 $dateTime=new DateTime($date." ".$Time[$i]);
34
35 echo $parsed_date = $dateTime->format('Y-m-d H:i:s');
36 $measuref = $measure[$i];
37
38
39 $insert = mysql_query("INSERT INTO schedule values('','$parsed_date','','','','$n1','$selectf','$measuref')") or die(mysql_error());
40
41}
42 if($insert){
43
44 ?>
45 <script type="text/javascript">
46 alert("Sucessfully save");
47 </script>
48 <?php
49
50 }
51
52?>
Note: See TracBrowser for help on using the repository browser.