[Phphtmllib-devel] SF.net SVN: phphtmllib:[3237] trunk/open2300/lib/modules/home/widgets/ CurrentCo
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2009-03-03 18:49:47
|
Revision: 3237 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3237&view=rev Author: hemna Date: 2009-03-03 18:49:46 +0000 (Tue, 03 Mar 2009) Log Message: ----------- peak winds Modified Paths: -------------- trunk/open2300/lib/modules/home/widgets/CurrentConditions.inc Modified: trunk/open2300/lib/modules/home/widgets/CurrentConditions.inc =================================================================== --- trunk/open2300/lib/modules/home/widgets/CurrentConditions.inc 2009-03-01 21:29:45 UTC (rev 3236) +++ trunk/open2300/lib/modules/home/widgets/CurrentConditions.inc 2009-03-03 18:49:46 UTC (rev 3237) @@ -50,7 +50,15 @@ array(":date" => $year.'%')); $year_rain_start = $stmt->rain_total; - $this->rain_total = sprintf("%0.2f", $this->wx->get_rain_total() - $year_rain_start); + $this->rain_total = sprintf("%0.2f", $this->wx->get_rain_total() - $year_rain_start); + + //get the peak winds + $stmt = $db->queryBindOneRowCache("select datetime,max(wind_speed) as max_wind, wind_angle, wind_direction from weather where datetime like :date", + array(":date" => $today.'%')); + $this->peak_wind['speed'] = $stmt->max_wind; + $this->peak_wind['angle'] = $stmt->wind_angle; + $this->peak_wind['direction'] = $stmt->wind_direction; + $this->peak_wind['time'] = $stmt->datetime; } public function get_content() { @@ -82,7 +90,8 @@ //wind $table->add_row("Wind : ",new TDtag(array(), SPANtag::factory('',"From the ".$this->wx->get_wind_direction()." ".$this->wx->get_wind_angle(). "@".$this->wx->get_wind_speed().'mph'), - $this->get_wind_angle_image($this->wx->get_wind_angle()))); + $this->get_wind_angle_image($this->wx->get_wind_angle()), + SPANtag::factory('',"Peak winds :".$this->peak_wind['direction']." ".$this->peak_wind['angle'].'@'.$this->peak_wind['speed'].'mph '.$this->peak_wind['time']))); $table->add_row(" ", " "); $pressure = $this->wx->get_rel_pressure(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |