| 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/police/prog/ |
Upload File : |
<!DOCTYPE html>
<html>
<style>
table, th, td {
border: 1px solid black;
}
th, td {
padding: 4px;
text-align: center;
}
</style>
<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
/******************************
Project: AMS - Cacak
Version: 2017-03-15
Author : M. Kukic
Note :
******************************/
//
include "config.php";
//
echo "
<hr>
<fieldset>
<legend><h3>Mreža Automatskih Meteoroloških Stanica - AMS</h3></legend>
<table border=\"0\"></fieldset>";
//
// LAST - TEKUCI
echo "<b>Poslednji podaci:</b><br><br>";
//
echo "<table border='1'>";
echo "<tr>";
echo "<th>Stanica</th>";
echo "<th>Baro</th>";
echo "<th>B-MSL</th>";
for ($i = 1; $i < $nparam; $i++) {
echo "<th>".$paramnam[$i]."</th>";
if ($i==1) echo "<th> T-HI</th>";
/*
echo "<th>Temp</th>";
echo "<th>Humi</th>";
echo "<th>Sun</th>";
echo "<th>Wind</th>";
*/
}
echo "<th>Time</th>";
echo "</tr>";
for ($i = 0; $i<$nams; $i++)
{
$sql = "SELECT * FROM datalog WHERE amsid='".$ams[$i]."' ORDER BY id DESC LIMIT 1";
$result = mysql_query($sql, $dbh) or die(mysql_error());
$row = mysql_fetch_array($result);
$msl=$row['baro']+$p0-$amspn[$i];
echo "<tr>";
echo "<td>".$amsnam[$i]."</td>";
echo "<td>".round($row['baro'],1)."</td>";
if ($msl>500){
echo "<td>".$msl."</td>";
}else{
echo "<td> </td>";
}
echo "<td>".round($row['temp'],1)."</td>";
//
$pt=$row['temp'];
$ph=$row['humi'];
if (($pt>25)and($ph>25)){
$hi=heatIndex($pt, $ph);
echo "<td>".round($hi,1)."</td>";
}else{
echo "<td>n/a</td>";
}
//
echo "<td>".round($ph,1)."</td>";
echo "<td>".$row['sun']."</td>";
echo "<td>".$row['wind']."</td>";
if ($nparam>5) echo "<td>".$row['p6']."</td>";
if ($nparam>6)echo "<td>".$row['p7']."</td>";
if ($nparam>7)echo "<td>".$row['p8']."</td>";
echo "<td>".$row['tim']."</td>";
/*
echo "<td>".$row['temp']."</td>";
echo "<td>".$row['humi']."</td>";
echo "<td>".$row['sun']."</td>";
echo "<td>".$row['wind']."</td>";
echo "<td>".$row['tim']."</td>";
*/
echo "</tr>";
}
echo "</table>";
//echo "<br>";
//<form action='numeric-tim.php'>
?>
<hr>
<h4>Vremenski interval za Min/Max/Avr podatke:</h4>
<form action='tim.php'>
Start: <input type='text' name='ys' id='ys' value='yyy' size='2'>.
<input type='text' name='ds' id='ds' value='dd' size='1'>.<input type='text' name='ms' id='ms' value='mm' size='1'>-<input type='text' name='hs' id='hs' value='hh' size='1'>:<input type='text' name='ns' id='ns' value='nn' size='1'>
End: <input type='text' name='ye' id='ye' value='yyyy' size='2'>.
<input type='text' name='de' id='de' value='dd' size='1'>.<input type='text' name='me' id='me' value='mm' size='1'>-<input type='text' name='he' id='he' value='hh' size='1'>:<input type='text' name='ne' id='ne' value='nn' size='1'>
<input type='submit' value='Enter'></form>
<script>document.getElementById('ys').value = dan.getFullYear();</script>
<script>document.getElementById('ds').value = dan.getDate()-1;</script>
<script>document.getElementById('ms').value = dan.getMonth()+1;</script>
<script>document.getElementById('hs').value = dan.getHours();</script>
<script>document.getElementById('ns').value = dan.getMinutes();</script>
<script>document.getElementById('ye').value = dan.getFullYear();</script>
<script>document.getElementById('de').value = dan.getDate();</script>
<script>document.getElementById('me').value = dan.getMonth()+1;</script>
<script>document.getElementById('he').value = dan.getHours();</script>
<script>document.getElementById('ne').value = dan.getMinutes();</script>
<hr>
<?php
// AMS Data
echo "<br>";
echo "<b>AMS Data:</b> ";
for ($i = 0; $i < $nams; $i++) {
echo "<a href='tab.php?st=".$i."'>[".$amsnam[$i]."] </a>";
}
// AMS Izvestaji
echo "<br><br><b>AMS Izvestaji: </b> ";
echo "<a href='numeric.php'>[Sumarni]</a>";
// AMS Grafikoni
echo "<br><br><b>AMS Grafikoni:</b> ";
for ($i = 0; $i < $nams; $i++) {
echo "<br><br>".$amsnam[$i].$pix[$i]." <span style='padding-left:1em'>";
for ($j = 0; $j < $nparam; $j++) {
echo "<a href='graph-".$paramid[$j].".php?st=".$i."'>[".$paramnam[$j]."] </a>";
}
// AMS Komparacije
}
echo "<br><br>Comp".$pix[6]."<span style='padding-left:1em'>";
for ($j = 0; $j < $nparam; $j++) {
echo "<a href='graph-".$paramid[$j]."-ams.php'>[".$paramnam[$j]."] </a>";
}
//
echo "<hr>";
// Ekstremi
echo "<br><b>Ekstremi: </b>";
echo "<a href='extrem.php'>[All-Apsolut]</a>";
echo "<a href='extrem-aps.php'> [Apsolut]</a>";
echo "<b> AMS </b>";
for ($i = 0; $i < $nams; $i++) {
echo "<a href='extrem-ams.php?st=".$i."'>[".$amsnam[$i]."] </a>";
}
// AMS Pristup
echo "<hr>";
echo "<br><b>AMS Pristup: </b>";
echo "<a href='ams-info.php'>[AMS-Info] </a>";
echo "<a href='http://mkukic.ddns.net:8128/CHOM'>[".$amsnam[0]."] </a>";
echo "<a href='http://mkukic.ddns.net:8129/CHOM'>[".$amsnam[1]."] </a>";
echo "<a href='wp.htm'>[".$amsnam[2]."] </a>";
echo "<hr>";
//
// HUMI HI kalk
function heatIndex($T, $H){
$c1=-42.38;
$c2=2.049;
$c3=10.14;
$c4=-0.2248;
$c5=-6.838e-3;
$c6=-5.482e-2;
$c7=1.228e-3;
$c8=8.528e-4;
$c9=-1.99e-6;
$T=$T*1.8+32.0;
$A=(($c5*$T)+$c2)*$T+$c1;
$B=(($c7*$T)+$c4)*$T+$c3;
$C=(($c9*$T)+$c8)*$T+$c6;
$Rv=($C*$H+$B)*$H+$A;
$Rv=($Rv-32.0)/1.8;
return $Rv;
}
//HUMI DP kalk
function dewPoint($T, $H){
$Td=(17.271*$T)/(237.7+$T)+log($H*0.01);
$Td=(237.7*$Td)/(17.271-$Td);
return $Td;
}
//
?>
<!--
<p style='color:gray;'>M. Kukić. 1984-2018. mkukic@live.com</p>
<a href="javascript:history.go(-1)"><img src="img/back.png"></a><a href="wemos-d1.htm"><img src="img/info.png"></a><a href="srbija.php"><img src="img/bar.png"></a>
-->
<a href="http://mkblog.ddns.net"><img src="img/back.png"></a><a href="wemos-d1.htm"><img src="img/info.png"></a><a href="srbija.php"><img src="img/bar.png"></a>
</div>
</body>
</html>