-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.php
More file actions
128 lines (102 loc) · 4.01 KB
/
Copy pathprofile.php
File metadata and controls
128 lines (102 loc) · 4.01 KB
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
<?php
/**
* Created by IntelliJ IDEA.
* User: LR050891
* Date: 15-Mar-17
* Time: 11:15 AM
*/
require ('master/header.php');
require ('master.php');
if(isset($_SESSION['username'])!=null)
{
$loggedinuser= $_SESSION['username'];
}
else
{
}
$servername = "localhost";
$dbusername = "root";
$dbpassword = "";
// Create connection
$conn = mysqli_connect($servername, $dbusername, $dbpassword,"patienthealthmonitoringsystem");
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$sql = "SELECT gender, age FROM users where username='$loggedinuser'";
$result = mysqli_query($conn, $sql);
$cookie_value_1="";
$cookie_value_2="";
if (mysqli_num_rows($result) > 0)
{
// output data of each row
while($row = mysqli_fetch_assoc($result))
{
$cookie_name_1 = "c_gender";
$cookie_value_1 = $row['gender'];
setcookie($cookie_name_1, $cookie_value_1, time() + (86400 * 30), "/");
$cookie_name_2 = "c_age";
$cookie_value_2 = $row['age'];
setcookie($cookie_name_2, $cookie_value_2, time() + (86400 * 30), "/");
}
}
else {
// echo "0 results";
}
mysqli_close($conn);
?>
<link rel="stylesheet" href="css/switch.css">
<section class="hero is-black is-large" style="color:black !important;">
<div class="hero-head">
<p class="column is-offset-5 dashboard" ">Dashboard </p>
<div class="column is-offset-10 ">
<p class="_welcomeMsg">Welcome <?php echo $loggedinuser?>!</p>
<p class="_welcomeMsg"><?php echo $cookie_value_2;echo ',';echo $cookie_value_1;?></p>
</div>
</div>
<div class="hero-body " >
<div class="container overridebody ">
<div class=" columns ">
<div class="column is-3 ">
<img src="img/h_b_stop.jpg " class="animated pulse" alt="Heart " height="202 " width="602 " onclick="triggerAlertss() " id="heartbeat">
<p class="_recommHeading"> ✚Recommendations</p>
<div id="recommendationDIV" class="_recDIV">
</div>
</div>
<div class="column is-3 ">
<!--<p class="sensor_reading " id="bpmskeleton">Heart Beats Per Minute: <span style="color:red;">Not Loaded!</span></p>-->
<table cellspacing="0" class="sensor_reading"><tr><td> Heart Beats Per Minute(BPM):</td><td style="color:red; align:left;" ID="bpmskeleton">Not Loaded</td></tr></table>
<p id="live_blink" class="blink_text">Live ⤉</p>
<table class="_statustable " id="statustable"><tr><td><div class="_statusbar" id="statusbar"> Status: </div></td><td class="_statusmsg" ID="statusmsg">None</td></tr></table>
</div>
<div class="column is-1" >
<span class="toggle">
<input type="checkbox" ID="ctrlbutton" onclick="btnctrlfunc();">
<label data-off="Stop" data-on="Start"></label>
</span>
</div>
<div class="column is-offset-2 " id="switch_control" style="display:none;" >
<iframe width="450 " height="260 " style="border: 1px solid #cccccc; " src="https://thingspeak.com/channels/253471/charts/1?bgcolor=%23ffffff&color=%23d62020&dynamic=true&results=5&title=Beats+Per+Minute%28BPM%29&type=spline "></iframe>
<br/><br/><br/>
<iframe width="450 " height="260 " style="border: 1px solid #cccccc; " src="https://thingspeak.com/channels/253471/charts/2?bgcolor=%23ffffff&color=%23d62020&dynamic=true&results=10&title=Pulse&type=spline "></iframe>
</div>
</div>
</div>
</div>
</section>
<script src="js/main.js "></script>
<?php
include ('master/footer.php');
?>
<script>
$( window ).load(function() {
// Run code
//console.log( "asws");
});
function sms()
{
<?php
// include ('sms.php');
?>
}
</script>