| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/projects/Vetrogenerator.InfoSys/ |
Upload File : |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="20" />
<title>Untitled Document</title>
</head>
<body style = "text-align: ceneter; background-color: beige;"></body>
<body>
<?php include "isvtg_header.php"; ?>
<h1 style="color: green; font-family: Verdana; font-size: 24px; text-align: center"><b>Atmospheric/Light Parameters</b></h1>
<?php
$servername = "localhost";
$username = "rasintest";
$password = "testl0zink@";
$dbname = "isvtg";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn -> connect_error) {
die("Connection failed: " . $conn -> connect_error);
}
?>
<table align="center" width="800" font-family="Verdana">
<tr bgcolor="#008000" style="color:white" align="center">
<th>Serial number</th>
<th>Time</th>
<th>Weather station [ID]</th>
<th>Atmospheric pressure [mbar]</th>
<th>Temperature [ÂșC]</th>
<th>Relative humidity [%]</th>
<th>Wind speed [m/s]</th>
<th>Light level [lux]</th>
</tr>
<?php
$id_number = 0;
// Output data of each row
$sql = "SELECT * FROM meteovtg ORDER BY id DESC";
/*$result = $conn -> query($sql);*/
$result = mysqli_query($conn, $sql);
while($node_name_row = $result -> fetch_assoc()) {
$id_number = $node_name_row['id'];
$time = $node_name_row['time'];
$idvtg = $node_name_row['ws'];
$pressure = $node_name_row['pres'];
$temperature = $node_name_row['temp'];
$rel_humidity = $node_name_row['humi'];
$windspeed = $node_name_row['wind'];
$light = $node_name_row['sunl'];
if ($row_color){
echo "<tr bgcolor=\"#9ad1f8\" align=\"center\">";
}
else {
echo "<tr bgcolor=\"#cee7f9\" align=\"center\">";
}
echo "<td>$id_number</td>";
echo "<td>$time</td>";
echo "<td>$idvtg</td>";
echo "<td>$pressure</td>";
echo "<td>$temperature</td>";
echo "<td>$rel_humidity</td>";
echo "<td>$windspeed</td>";
echo "<td>$light</td>";
echo "</tr>";
$row_color = !$row_color;
}
echo "</table>";
$status=0;
include 'closedbconn.php';
?>
</body>
</html>