| 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/timoe/ |
Upload File : |
<?php
// Graf heder
$st=0;
$stanica=$ams[$st]; //CA0
$stanica="AWS0";
$sql = "SELECT * FROM meteovtg WHERE ws ='".$stanica."' ORDER BY time ASC";
$result = mysqli_query($dbh, $sql) or die (mysqli_error($dbh));
$row = mysqli_fetch_array($result);
$ts=$row['time'];
$sql = "SELECT * FROM meteovtg WHERE ws ='".$stanica."' ORDER BY time DESC";
$result = mysqli_query($dbh, $sql) or die (mysqli_error($dbh));
$row = mysqli_fetch_array($result);
$te=$row['time'];
$sql = "SELECT * FROM meteovtg WHERE ws ='".$stanica."' ORDER BY time ASC";
$result = mysqli_query($dbh, $sql) or die (mysqli_error($dbh));
$numofrows = mysqli_num_rows($result);
echo "<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='1200' height='50')>";
echo "<rect x = '225' width = '800' height = '50' fill = 'rgb(246,221,204)' stroke-width = '3' stroke = 'rgb(25,111,61)' />";
echo "<g stroke='gray'>";
$tekst1 = "Location: ";
$tekst11 = $awsnam[$st];
$tekst2 = "Number of Measurements: ";
$tekst21 = $numofrows;
echo "<text x='300' y='20' font-size='20' font-family='Verdana' font-weight='bold' fill='green'>".$tekst1."</text>";
echo "<text x='420' y='20' font-size='20' font-family='Verdana' font-weight='bold' fill='blue'>".$tekst11."</text>";
echo "<text x='300' y='40' font-size='20' font-family='Verdana' font-weight='bold' fill='green'>".$tekst2."</text>";
echo "<text x='620' y='40' font-size='20' font-family='Verdana' font-weight='bold' fill='blue'>".$tekst21."</text>";
echo "</svg>";
// echo $tekst;
$xst=32;
if ($numofrows>16) $xst=16;
if ($numofrows>32) $xst=8;
if ($numofrows>64) $xst=4;
if ($numofrows>128) $xst=2;
if ($numofrows>256) $xst=1;
if ($numofrows>512) $xst=0.5;
?>