-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinput.php
135 lines (117 loc) · 2.54 KB
/
input.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?php
session_start();
$values=$_SESSION['values'];
json_encode($values);
echo "Trial data value : ";
print_r($values);
echo "<br/><br/>";
$cgxy=count($values);
$cgxy=$cgxy/5;
$j=1;
$k=2;
$nxy=array();
for($i=0; $i < $cgxy/2 ; $i++){
$ab=array();
$ab['x']=$values[$i.$j];
$ab['y']=$values[$i.$k];
array_push($nxy,$ab);
}
echo "Non Potencial value : ";
print_r($nxy);
echo "<br/><br/>";
$pxy=array();
for($i=$cgxy/2; $i < $cgxy ; $i++){
$bc=array();
$bc['x']=$values[$i.$j];
$bc['y']=$values[$i.$k];
array_push($pxy,$bc);
}
echo "Potencial value : ";
print_r($pxy);
echo "<br/><br/>";
echo "<br/><br/>";
echo "<br/><br/>";
echo "<br/><br/>";
?>
<!DOCTYPE HTML>
<html>
<head>
<script>
window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer", {
animationEnabled: true,
exportEnabled: true,
theme: "light1",
title:{
text: "Potencial Non-Potencial Graph Chart"
},
axisX:{
title: "X-axis wise distance",
suffix: " ",
includeZero: true
},
axisY:{
title: "Y-axis wise distance",
suffix: " inch",
includeZero: true
},
data: [{
type: "scatter",
markerType: "triangle",
markerSize: 20,
toolTipContent: "Non-Potencial<br>Y position: {y} <br>X position: {x} ",
dataPoints: <?php echo json_encode($pxy, JSON_NUMERIC_CHECK);?>
},
{
type: "scatter",
markerType: "square",
markerSize: 20,
toolTipContent: "Potencial<br>Y position: {y} <br>X position: {x} ",
dataPoints: <?php echo json_encode($nxy, JSON_NUMERIC_CHECK); ?>
}]
});
chart.render();
}
</script>
</head>
<body>
<div id="chartContainer" style="height: 370px; width: 100%;"></div>
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<link rel="stylesheet" type="text/css" href="text2.css">
<head>
<title>
</title>
</head>
<body>
<?php
if($_SERVER['REQUEST_METHOD']=='POST'){
$value=$_POST['regName'];
header('location:inputresult.php?value='.$value);
}
?>
<form method="post">
<div class="but">
<!input type="submit" id="button">
<button id="button">REAL-DATA</button>
</div>
</form>
</div>
</body>
</html>
?>
<?php
echo "<table>
<tr><th>X Co-ordinate</th><th>Y Co-ordinate</th><th>No of Message</th><th>Battery Percentage</th></tr>";
for ($row = 0; $row <$cgxy; $row++) {
echo"<tr>";
for ($col = 1; $col < 5; $col++) {
echo"<td>".$values[$row.$col]."</td>";
}
echo "</tr>\n";
}
echo "</table>";
?>