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/kos-hitac/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/projects/kos-hitac//kos-hitac.php
<!DOCTYPE html>
<html>
<link rel='shortcut icon' type='image/png' href='img/favicon.png'/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Kos-Hitac</title>
<body>
<div style="width:740px; word-wrap:break-word;">

<?php
/******************************
 Project: Kos-Hitac 
 Version: 2019-01-12
 Author : M. Kukic 
******************************/
// Preuzimanje pocetnih podataka
$v0 = $_GET["v0"];
$ug = $_GET["ug"];
$y0 = $_GET["y0"];
// Parametri
$k=1/15;
$st=10;
$sek=100;
$sek=$sek*$st;
$g=9.81;
$ugr=$ug*3.14/180;
// Konfig. grafike
$dx=15;
$dy=620;
$dx2=700;
$dy2=70;
$dx3=$dx+10;
$dy3=$dy2+10;
$dy4=$dy-12;
// Smene
$ssin=sin($ugr);
$scos=cos($ugr);
$v02=$v0*$v0;
// Proracuni 
$d=round($v02*sin(2*$ugr)/$g,1);
$h=$y0+round($v02*$ssin*$ssin/$g/2,1);
$t=round(2*$v0*$ssin/$g,1);
// 
$y0h=$dy-$y0*$k;
$d0h=$dx+$d*$k;
// SVG Boje
// https://www.december.com/html/spec/colorsvg.html 
//
// Inicijalizacija prozora za crtanje
echo "<fieldset><legend><h3>Kos-Hitac</h3></legend><table border=\"0\"></fieldset>";
// Sivi okvir
echo "<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='725' height='640'>";
//echo "<svg width='320' height='640'>"; 
echo "<rect width='720' height='640' fill='rgb(253,248,243)' stroke-width='1' stroke='rgb(0,0,0)' />";
//
// Graficki ekran koordinatni sistem i tekst
echo "<g stroke='blue'>";
// Koordinatni sistem
echo "<line x1=".$dx." y1=".$dy." x2=".$dx2." y2=".$dy." stroke='blue' stroke-width='2'/>";
echo "<line x1=".$dx." y1=".$dy." x2=".$dx." y2=".$dy2." stroke='blue' stroke-width='2'/>";
echo "<text x=".$dx2." y=".$dy4." stroke='darkblue' font-size='15' font-weight='normal' font-family='monospace'>X</text>";
echo "<text x=".$dx3." y=".$dy3." stroke='darkblue' font-size='15' font-weight='normal' font-family='monospace'>Y</text>";
// Horizontalna ravan
echo "<line x1=".$dx." y1=".$y0h." x2=".$d0h." y2=".$y0h." stroke='black' stroke-dasharray='10,10' fill='none' stroke-width='1'/>";
echo "<line x1=".$d0h." y1=".$y0h." x2=".$d0h." y2=".$dy." stroke='black' stroke-dasharray='10,10' fill='none' stroke-width='1'/>";
// Pocetni podaci
echo "<text x='10' y='20' font-size='15' stroke='darkviolet' font-weight='normal' font-family='monospace'>Vo=".$v0."m/s</text>";
echo "<text x='10' y='40' font-size='15' stroke='darkviolet' font-weight='normal' font-family='monospace'>Alfa=".$ug."deg</text>";
echo "<text x='10' y='60' font-size='15' stroke='darkviolet' font-weight='normal' font-family='monospace'>Ho=".$y0."m</text>";
// Sumarni rezultati
echo "<text x='600' y='20' font-size='15' stroke='red' font-weight='normal' font-family='monospace'>h=".$h."m</text>";
echo "<text x='600' y='40' font-size='15' stroke='red' font-weight='normal' font-family='monospace'>d=".$d."m</text>";
echo "<text x='600' y='60' font-size='15' stroke='red' font-weight='normal' font-family='monospace'>t=".$t."s</text>";
// Mreza
$n=0;
for ($i = $dx+67; $i <= 700; $i=$i+67) { 
$n=$n+1;
$y=$dy+15;
$x=$i-5;
echo "<line x1=".$i." y1=".$dy." x2=".$i." y2=".$dy2." stroke='lightgreen' stroke-dasharray='5,5' fill='none' stroke-width='1'/>";
echo "<text x=".$x." y=".$y." font-size='15' stroke='lightgreen' font-weight='normal' font-family='monospace'>".$n."</text>";
}
$n=0;
for ($i = (620-67); $i > 70; $i=$i-67) { 
$n=$n+1;
echo "<line x1=".$dx." y1=".$i." x2=".$dx2." y2=".$i." stroke='lightgreen' stroke-dasharray='5,5' fill='none' stroke-width='1'/>";
echo "<text x=".$dx2." y=".$i." font-size='15' stroke='lightgreen' font-weight='normal' font-family='monospace'>".$n."</text>";
}
// Kraj grafickog segmenta
echo "</g>";
//	
// Ciklus iscrtavanja putanje
echo "<g stroke='blue'>";
			for ($i = 0; $i < $sek; $i=$i+1) { 	
			
				$t=$i/10;
			    $x=$t*$v0*$scos;
				$y=$y0+$t*$v0*$ssin-$g*($t*$t)/2;
  				$x=$dx+$x*$k;
				$y=$dy-$y*$k;
				if (($x<$dx2)and($y>($dy2-50))and($y<($dy+5))){
				   echo "<circle cx='".$x."' cy='".$y."' r='1' stroke='red' stroke-width='1' fill='red' />";		
      			//echo "<text x='0' y='".$x."'>".$x1." ".$y1." ".$x2." ".$y2."</text>";	  
				}		
			}
// Kraj grafickog segmenta		
echo "</g>";			
// Zatvaranje grafickog prozora
echo "</svg>";
//
?>
<br>
<a href="javascript:history.go(-1)"><img src="img/ret.png" border="0"></a>
</div>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit