403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/projects/meteoca/ams.php
<!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: 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
//
include "config.php";
//
echo "
<fieldset>
    <legend><h3>Mre&#382;a Automatskih Meteorolo&#353;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";
				//$sql = "SELECT * FROM datalog WHERE amsid='CA1' ORDER BY id DESC LIMIT 1";
				$result = mysqli_query($dbh, $sql) or die(mysqli_error($dbh));
				$row = mysqli_fetch_array($result);
				mysqli_close($con);

				$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'>

echo "<hr>";
echo "<b>Vremenski interval za Min/Max/Avr podatke:</b><br><br>"; 
		
?>	

<form action='tim.php'>
Start: <input type='text' name='ys' id='ys' value='yyyy' 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'>
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='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('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>

<?php

echo "<hr>";
// AMS Data	
	echo "<b>AMS Data: </b>"; 	
	echo "<form action='tab.php' method='get'>";
	for ($i = 0; $i < $nams; $i++) { 
		echo "<button type='submit' name='st' id='st' value=".$i.">".$amsnam[$i]."</button> ";
	}
	echo "</form>";

// AMS Grafikoni	
	echo "<br><b>AMS Grafikoni:</b> ";
	for ($i = 0; $i < $nams; $i++) { 
	
	echo "<table style='width:392px;' border='0' cellspacing='1' cellpadding='1'>";
	echo "<td width='60'>".$amsnam[$i].$pix[$i]."</td>";

	for ($j = 0; $j < $nparam; $j++) { 	
		echo "<form action='graph-".$paramid[$j].".php' method='get'>";
		echo "<td><button type='submit' name='st' id='st' value=".$i.">".$paramnam[$j]."</button></td> ";
		echo "</form>";
	}
	}
	echo "</table>";
	echo "<br>";
		
// AMS Komparacije	
	echo "<table style='width:392px;' border='0' cellspacing='1' cellpadding='1'>";
	echo "<td width='60'>KOMP</td>";
	for ($j = 0; $j < $nparam; $j++) { 	
		echo "<form action='graph-".$paramid[$j]."-ams.php' method='get'>";
		echo "<td><button type='submit' name='st' id='st' value=".$j.">".$paramnam[$j]."</button></td> ";
		echo "</form>";
	}
	echo "</table>";
//		
echo "<hr>";
//
// Ekstremi
echo "<b>AMS Izvestaji: </b>";
	echo "<table>";
	echo "<form action='extrem-aps.php' method='get'>";
	echo "<td><button type='submit' name='st' id='st' value='0'>Apsolut Svi</button></td>";
	echo "</form>";
	
	echo "<form action='extrem.php' method='get'>";
	echo "<td><button type='submit' name='st' id='st' value='0'>Apsolut AMS</button></td>";
	echo "</form>";

	echo "<form action='numeric.php' method='get'>";
    echo "<td><button type='submit' value='submit'>Min/Max/Avg</button></td>";
    echo "</form>";
		
	echo "<form action='ams-info.php' method='get'>";
    echo "<td><button type='submit' value='submit'>AMS Info</button></td>";
    echo "</form>";
	echo "</table>";
	
echo "<br><b>AMS Ekstremi:</b>";
	echo "<form action='extrem-ams.php' method='get'>";
	for ($i = 0; $i < $nams; $i++) { 
		echo "<button type='submit' name='st' id='st' value=".$i.">".$amsnam[$i]."</button> ";
	}
	echo "</form>";
	
// AMS Pristup
/*
echo "<hr>";
echo "<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;
}
//
?>

<a href="http://timca.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>
<p style='color:gray; font-family:arial'>TimCA 2018.-2020., TimCA.ddns.net</p>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit