=$sec30 order by mkdatetime"; $v_g30 = mysql_query($sql30,$mysql); $pocet_g30i = mysql_Num_Rows($v_g30); $pocet_g30 = Intval($pocet_g30i); // - - - - - - - - - - - - - - // // teplota dekodovani // // - - - - - - - - - - - - - - // $T=mysql_result($v_g30,0,"temp"); ImageString($img,2,90,18,"-teplota: ".$T." C",$cerna); // - - - - - - - - - - - - - - // $max=0;$datawavg=0; $pocet_g30i=6; for($w=0;$w<$pocet_g30i;$w++) { $dataw=mysql_result($v_g30,$w,"speed10savg"); $datawtime=mysql_result($v_g30,$w,"mkdatetime"); if ($w==0) {$cas1=Date("H:i",$datawtime);$datum=Date("d.m.Y",$datawtime);} // CAS POCATKU $datawmax5min=mysql_result($v_g30,$w,"max5min"); if ($datawmax5min>$max) $max=$datawmax5min; // STANOVENI MAXIMALNIHO NARAZU $datawavg=$datawavg+mysql_result($v_g30,$w,"avg5min"); $token=StrTok($dataw,";"); $column=0; while($column<29): $column++; $a[$column]=$token; $token=StrTok(";"); endwhile; // - - - - - - - - - - - - - - // //kresli graf vetru// // - - - - - - - - - - - - - - // for ($i=1;$i<29;$i++) { ImageLine($img,(($i*4)/3.5)+($w*32)+12,(298-$a[$i]*$koef_krivky)/2,((($i+1)*4)/3.5)+($w*32)+12,(298-$a[$i+1]*$koef_krivky)/2,$textcolor02); } // - - - - - - - - - - - - - - // } // - - - - - - - - - - - - - - // // VYKRESLENI CASU OD - DO + DATUMU // - - - - - - - - - - - - - - // ImageString($img,2,5,149,$cas1,$seda); // levy roh $cas2=Date("H:i",$datawtime+300); ImageString($img,2,180,149,$cas2,$seda); // pravy roh ImageString($img,2,85,85,$datum,$modra2); // VYKRESLENI DATUMU ImageString($img,2,90,44,"-max.: ".$max." m/s",$textcolor02); // MAXIMALNI NARAZ $smerv=mysql_result($v_g30,$w-1,"direction"); ImageString($img,2,90,31,"-smer: ".$smerv,$maximumcolor); // SMER VETRU NA KONCI MER. INTERVALU $prumer=$datawavg/$pocet_g30i;$prumer=SubStr($prumer,0,4); ImageString($img,2,90,5,"-prumer ".$prumer." m/s",$textcolor03); // PRUMER VETRU for($l=12;$l<=200;$l+=5) { if($da == 0) { $da = 1; } elseif($da == 1){ imageline($img,$l,(298-$prumer*$koef_krivky)/2,$l+5,(298-$prumer*$koef_krivky)/2,$textcolor03); $da = 0; } } // ImageDashedLine($img,17,(298-$prumer*$koef_krivky)/2,190,(298-$prumer*$koef_krivky)/2,$textcolor03); // - - - - - - - - - - - - - - // Imagepng($img); ?>