| 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 : |
<?php
include('phpgraphlib.php');
$n = $_GET["dt"];
$sir=100*$nams;
$vis=280;
//citanje file
if ($n==1) $myfile = fopen("extrem-baro.txt", "r") or die("Unable to open file!");
if ($n==2) $myfile = fopen("extrem-temp.txt", "r") or die("Unable to open file!");
if ($n==3) $myfile = fopen("extrem-humi.txt", "r") or die("Unable to open file!");
if ($n==4) $myfile = fopen("extrem-sun.txt", "r") or die("Unable to open file!");
if ($n==5) $myfile = fopen("extrem-wind.txt", "r") or die("Unable to open file!");
$data1["CA1"]=1*fgets($myfile);
$data2["CA1"]=1*fgets($myfile);
$data1["CA2"]=1*fgets($myfile);
$data2["CA2"]=1*fgets($myfile);
$data1["CA3"]=1*fgets($myfile);
$data2["CA3"]=1*fgets($myfile);
/*
$data1["CA4"]=1*fgets($myfile);
$data2["CA4"]=1*fgets($myfile);
$data1["CA5"]=1*fgets($myfile);
$data2["CA6"]=1*fgets($myfile);
$data1["CA6"]=1*fgets($myfile);
$data2["CA6"]=1*fgets($myfile);
*/
$graph=new PHPGraphLib($sir,$vis);
$graph->addData($data1, $data2);
$graph->setBarColor('blue', 'green', 'lime');
if ($n==1) $graph->setRange(950,1025);
//
if ($n==1) $graph->setTitle('Baro [mb]');
if ($n==2) $graph->setTitle('Termo [C]');
if ($n==3) $graph->setTitle('Humi [%]');
if ($n==4) $graph->setTitle('Sun [%]');
if ($n==5) $graph->setTitle('Wind [bp/min]');
if ($n==6) $graph->setTitle('');
if ($n==7) $graph->setTitle('');
if ($n==8) $graph->setTitle('');
//
$graph->setupYAxis(12, 'blue');
$graph->setupXAxis(20);
//$graph->setGrid(false);
$graph->setGrid(true);
$graph->setLegend(true);
$graph->setTitleLocation('left');
$graph->setTitleColor('blue');
$graph->setLegendOutlineColor('white');
$graph->setLegendTitle('Min', 'Max');
$graph->setXValuesHorizontal(true);
if ($n==1) $graph->setGradient('blue', 'aqua');
if ($n==2) $graph->setGradient('red', 'maroon');
if ($n==3) $graph->setGradient('green', 'olive');
if ($n==4) $graph->setGradient('fuscia', 'purple');
if ($n==5) $graph->setGradient('gray', 'silver');
$graph->setBackgroundColor("black");
$graph->addData($data);
$graph->setBarColor('255,255,204');
//$graph->setTitle('IQ Scores');
$graph->setTitleColor('yellow');
$graph->setupYAxis(12, 'yellow');
$graph->setupXAxis(20, 'yellow');
$graph->setGrid(false);
$graph->setGradient('silver', 'gray');
$graph->setBarOutlineColor('white');
$graph->setTextColor('white');
$graph->setDataPoints(true);
$graph->setDataPointColor('yellow');
$graph->setDataValues(true);
$graph->setDataValueColor('yellow');
$graph->setLine(true);
$graph->setLineColor('yellow');
$graph->createGraph();
$graph->createGraph();
fclose($myfile);
?>