| 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
/******************************
Project: AMS - Cacak
File :
Version: 2017-03-15
Author : M. Kukic
Note :
******************************/
//
include "config.php";
include('phpgraphlib.php');
$dt = $_GET["dt"];
//
//citanje file
$myfile = fopen("tste.txt", "r") or die("Unable to open file!");
$ts=fgets($myfile);
$te=fgets($myfile);
fclose($myfile);
$sql = "SELECT * FROM datatim_".$dt." ORDER BY tim ASC";
$result = mysql_query($sql, $dbh) or die(mysql_error());
$numofrows = mysql_num_rows($result);
for ($i = 1; $i < ($numofrows+1); $i=$i+3) {
$row = mysql_fetch_array($result);
$data[$row['tim']]=round($row['baro'],1);
$row = mysql_fetch_array($result);
$row = mysql_fetch_array($result);
}
$graph = new PHPGraphLib(960,320);
$graph->addData($data);
$graph->setRange(980,1010);
$graph->setupXAxis(18);
$graph->setTitle('Atmosverski pritisak [mb]');
$graph->setBars(false);
$graph->setLine(true);
$graph->setDataPoints(true);
$graph->setDataPointColor('blue');
$graph->setDataValues(true);
$graph->setDataValueColor('blue');
$graph->setGoalLine(984);
$graph->setGoalLineColor('red');
$graph->setDataPointSize(4);
$graph->createGraph();
?>