| 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/meteoca/ |
Upload File : |
<!DOCTYPE html>
<!--
******************************
Project: MeteoCA, 2017-2020
Version: PHP-7
Author : M. Kukic
Note :
******************************
-->
<html>
<style>
table, th, td {
border: 1px solid black;
}
th, td {
padding: 5px;
text-align: center;
}
</style>
<head>
<head>
<link rel='shortcut icon' type='image/png' href='favicon.png'/>
<title>AMS METEOCA</title>
<script>var dan = new Date();
document.write('CET '+dan.getDate()+'.'+(dan.getMonth()+1)+'.'+dan.getFullYear()+'. - '+dan.getHours()+':'+dan.getMinutes()+':'+dan.getSeconds());
</script>
</head>
<body>
<div style="width:640px; word-wrap:break-word;">
<?php
include "config.php";
//
echo "
<hr>
<fieldset>
<legend><h3>Mreza AMS - Čačak</h3></legend>
<table border=\"0\"></fieldset>";
// Extrem SVE AMS
echo "<b>Ekstremni podaci za sve AMS:</b><br><br>";
//
echo "<table border='1'>";
echo "<tr>";
echo "<th>Param</th>";
echo "<th>Min</th>";
echo "<th>Time min</th>";
echo "<th>Stanica</th>";
echo "<th>Max</th>";
echo "<th>Time Max</th>";
echo "<th>Stanica</th>";
echo "</tr>";
for ($i = 0; $i < $nparam; $i++) {
$sql = "Select * from datalog ORDER BY ".$param[$i]." ASC, tim DESC LIMIT 1";
$result = mysqli_query($dbh, $sql) or die(mysqli_error());
$row = mysqli_fetch_array($result);
echo "<tr>";
echo "<td>".$paramnam[$i]."</td>";
if ($i==0) echo "<td>".round($row['baro'],1)."</td>";
if ($i==1) echo "<td>".round($row['temp'],1)."</td>";
if ($i==2) echo "<td>".round($row['humi'],0)."</td>";
if ($i==3) echo "<td>".$row['sun']."</td>";
if ($i==4) echo "<td>".$row['wind']."</td>";
if ($i==5) echo "<td>".$row['p6']."</td>";
if ($i==6) echo "<td>".$row['p7']."</td>";
if ($i==7) echo "<td>".$row['p8']."</td>";
echo "<td>".$row['tim']."</td>";
echo "<td>".$row['amsid']."</td>";
$sql = "Select * from datalog ORDER BY ".$param[$i]." DESC, tim DESC LIMIT 1";
$result = mysqli_query($dbh, $sql) or die(mysqli_error());
$row = mysqli_fetch_array($result);
if ($i==0) echo "<td>".round($row['baro'],1)."</td>";
if ($i==1) echo "<td>".round($row['temp'],1)."</td>";
if ($i==2) echo "<td>".round($row['humi'],0)."</td>";
if ($i==3) echo "<td>".$row['sun']."</td>";
if ($i==4) echo "<td>".$row['wind']."</td>";
if ($i==5) echo "<td>".$row['p6']."</td>";
if ($i==6) echo "<td>".$row['p7']."</td>";
if ($i==7) echo "<td>".$row['p8']."</td>";
echo "<td>".$row['tim']."</td>";
echo "<td>".$row['amsid']."</td>";
echo "</tr>";
}
echo "</table>";
echo "<br>";
//
?>
<hr>
<a href="javascript:history.go(-1)"><img src="img/back.png"></a><a href='ams.php'><img src='img/hom.png'><a href="wemos-d1.htm"><img src="img/info.png"></a><a href='wp.htm'><img src='img/bar.png'></a>
</div>
</body>
</html>