phphtmllib-devel Mailing List for phpHtmlLib (Page 6)
Status: Beta
Brought to you by:
hemna
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(33) |
Jul
(2) |
Aug
(3) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
(3) |
Jun
(1) |
Jul
(10) |
Aug
(5) |
Sep
|
Oct
|
Nov
(2) |
Dec
(5) |
2004 |
Jan
(1) |
Feb
(8) |
Mar
(139) |
Apr
(65) |
May
(32) |
Jun
(55) |
Jul
(21) |
Aug
(60) |
Sep
(43) |
Oct
(1) |
Nov
(18) |
Dec
(34) |
2005 |
Jan
(25) |
Feb
(2) |
Mar
(49) |
Apr
(13) |
May
(40) |
Jun
(22) |
Jul
(21) |
Aug
(59) |
Sep
(178) |
Oct
(54) |
Nov
(3) |
Dec
(49) |
2006 |
Jan
(21) |
Feb
(1) |
Mar
(5) |
Apr
(29) |
May
(86) |
Jun
(79) |
Jul
(52) |
Aug
(127) |
Sep
(187) |
Oct
(90) |
Nov
(61) |
Dec
(48) |
2007 |
Jan
(79) |
Feb
(136) |
Mar
(58) |
Apr
(139) |
May
(293) |
Jun
(112) |
Jul
(138) |
Aug
(112) |
Sep
(148) |
Oct
(76) |
Nov
(29) |
Dec
(66) |
2008 |
Jan
(45) |
Feb
(60) |
Mar
(119) |
Apr
(169) |
May
(172) |
Jun
(136) |
Jul
(107) |
Aug
(114) |
Sep
(104) |
Oct
(26) |
Nov
(50) |
Dec
(48) |
2009 |
Jan
(9) |
Feb
(35) |
Mar
(22) |
Apr
(43) |
May
(83) |
Jun
(68) |
Jul
(58) |
Aug
(21) |
Sep
(23) |
Oct
(62) |
Nov
(36) |
Dec
(26) |
2010 |
Jan
(16) |
Feb
(83) |
Mar
(73) |
Apr
(51) |
May
(76) |
Jun
(96) |
Jul
(70) |
Aug
(33) |
Sep
(10) |
Oct
(1) |
Nov
(2) |
Dec
|
2011 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
(12) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(3) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(5) |
Oct
(1) |
Nov
|
Dec
(1) |
2014 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(2) |
Oct
(2) |
Nov
(3) |
Dec
|
2015 |
Jan
(1) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <he...@us...> - 2010-03-03 19:16:41
|
Revision: 3412 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3412&view=rev Author: hemna Date: 2010-03-03 19:16:23 +0000 (Wed, 03 Mar 2010) Log Message: ----------- pulled debug Modified Paths: -------------- trunk/open2300/lib/modules/graphs/TempDewPointLineGraph.inc Modified: trunk/open2300/lib/modules/graphs/TempDewPointLineGraph.inc =================================================================== --- trunk/open2300/lib/modules/graphs/TempDewPointLineGraph.inc 2010-03-03 19:12:25 UTC (rev 3411) +++ trunk/open2300/lib/modules/graphs/TempDewPointLineGraph.inc 2010-03-03 19:16:23 UTC (rev 3412) @@ -17,7 +17,6 @@ public function load_data() { $today = $this->date; - Log::singleton()->debug("looking up data for ".$today); $collection = weatherDataObject::find_all("datetime like :date order by datetime asc", array(':date'=> $today.'%')); @@ -90,4 +89,4 @@ $graph->Stroke(); } } -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-03-03 19:12:31
|
Revision: 3411 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3411&view=rev Author: hemna Date: 2010-03-03 19:12:25 +0000 (Wed, 03 Mar 2010) Log Message: ----------- added Added Paths: ----------- trunk/open2300/htdocs/images/banners/spring/midday_rain.jpg Added: trunk/open2300/htdocs/images/banners/spring/midday_rain.jpg =================================================================== (Binary files differ) Property changes on: trunk/open2300/htdocs/images/banners/spring/midday_rain.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-03-03 18:06:39
|
Revision: 3410 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3410&view=rev Author: hemna Date: 2010-03-03 18:06:33 +0000 (Wed, 03 Mar 2010) Log Message: ----------- updates to pull out debug code Modified Paths: -------------- trunk/open2300/lib/modules/api/RemoteUpdate.inc trunk/open2300/lib/modules/home/widgets/CurrentConditions.inc trunk/open2300/lib/modules/home/widgets/RemoteMetarConditions.inc Modified: trunk/open2300/lib/modules/api/RemoteUpdate.inc =================================================================== --- trunk/open2300/lib/modules/api/RemoteUpdate.inc 2010-03-03 17:13:33 UTC (rev 3409) +++ trunk/open2300/lib/modules/api/RemoteUpdate.inc 2010-03-03 18:06:33 UTC (rev 3410) @@ -12,7 +12,7 @@ } function render($indent_level=0, $output_debug=0) { - $GLOBALS['log']->debug('RemoteUpdate called'); + //$GLOBALS['log']->debug('RemoteUpdate called'); $r = Request::singleton(); //first lets make sure we don't already have this entry @@ -46,8 +46,7 @@ //now save it to the db $wx->save(); - $GLOBALS['log']->debug('RemoteUpdate -- saved new entry.'); - + //$GLOBALS['log']->debug('RemoteUpdate -- saved new entry.'); } } ?> \ No newline at end of file Modified: trunk/open2300/lib/modules/home/widgets/CurrentConditions.inc =================================================================== --- trunk/open2300/lib/modules/home/widgets/CurrentConditions.inc 2010-03-03 17:13:33 UTC (rev 3409) +++ trunk/open2300/lib/modules/home/widgets/CurrentConditions.inc 2010-03-03 18:06:33 UTC (rev 3410) @@ -1,142 +1,141 @@ <?php /** - * This file contains the CurrentConditions + * This file contains the CurrentConditions * widget class. */ - + class CurrentConditions extends AjaxableHTMLWidget { - - /** - * This contains the current - * weatherDataObject for - * the conditions that you want to display - * - * @var weatherDataObject - */ - protected $wx; - - protected $rain_total; - - protected $temp_low_high = array("low" => 0, + + /** + * This contains the current + * weatherDataObject for + * the conditions that you want to display + * + * @var weatherDataObject + */ + protected $wx; + + protected $rain_total; + + protected $temp_low_high = array("low" => 0, "high" => 0); - /** - * Class Constructor - * - */ - public function __construct(weatherDataObject $wx=null) { - $log = Log::singleton(); - parent::__construct(); - if ($wx == null) { - //we don't have the current conditions. - //we need to get them - $this->wx = weatherDataObject::find("1=1 order by datetime desc limit 0,1"); - } else { - $this->wx = $wx; - } - - //load min max temps - $db = open2300DB::singleton(); - $today = date("Y-m-d"); - $stmt = $db->queryBindOneRowCache("Select min(temp_out) as low, max(temp_out) as high from weather where datetime like :date", - array(":date" => $today.'%')); - $this->temp_low_high["low"] = $stmt->low; - $this->temp_low_high["high"] = $stmt->high; - - $year = date("Y"); - $stmt = $db->queryBindOneRowCache("Select rain_total from weather where datetime like :date order by datetime asc limit 0,1", - array(":date" => $year.'%')); - $year_rain_start = $stmt->rain_total; - - $this->rain_total = sprintf("%0.2f", $this->wx->get_rain_total() - $year_rain_start); + /** + * Class Constructor + * + */ + public function __construct(weatherDataObject $wx=null) { + $log = Log::singleton(); + parent::__construct(); + if ($wx == null) { + //we don't have the current conditions. + //we need to get them + $this->wx = weatherDataObject::find("1=1 order by datetime desc limit 0,1"); + } else { + $this->wx = $wx; + } - //get the peak winds - //$db->set_debug_flag(true); - $sql = "select datetime,wind_speed, wind_angle, wind_direction from weather where ". + //load min max temps + $db = open2300DB::singleton(); + $today = date("Y-m-d"); + $stmt = $db->queryBindOneRowCache("Select min(temp_out) as low, max(temp_out) as high from weather where datetime like :date", + array(":date" => $today.'%')); + $this->temp_low_high["low"] = $stmt->low; + $this->temp_low_high["high"] = $stmt->high; + + $year = date("Y"); + $stmt = $db->queryBindOneRowCache("Select rain_total from weather where datetime like :date order by datetime asc limit 0,1", + array(":date" => $year.'%')); + $year_rain_start = $stmt->rain_total; + + $this->rain_total = sprintf("%0.2f", $this->wx->get_rain_total() - $year_rain_start); + + //get the peak winds + //$db->set_debug_flag(true); + $sql = "select datetime,wind_speed, wind_angle, wind_direction from weather where ". "wind_speed = (select max(wind_speed) from weather where datetime like :date) ". "and datetime like :date2"; - $stmt = $db->queryBindOneRow($sql, - array(":date" => $today.'%', - ":date2" => $today.'%')); - $log->debug(var_export($stmt,true)); - $this->peak_wind['speed'] = $stmt->wind_speed; - $this->peak_wind['angle'] = $stmt->wind_angle; - $this->peak_wind['direction'] = $stmt->wind_direction; - $this->peak_wind['time'] = substr($stmt->datetime,10); - $log->debug("peak wind was ".$stmt->wind_speed); - } - - public function get_content() { - - $div = new DIVtag(array('id'=>$this->get_ajax_replacement_divid().'contents')); + $stmt = $db->queryBindOneRow($sql, + array(":date" => $today.'%', ":date2" => $today.'%')); + //$log->debug(var_export($stmt,true)); + $this->peak_wind['speed'] = $stmt->wind_speed; + $this->peak_wind['angle'] = $stmt->wind_angle; + $this->peak_wind['direction'] = $stmt->wind_direction; + $this->peak_wind['time'] = substr($stmt->datetime,10); + //$log->debug("peak wind was ".$stmt->wind_speed); + } - //build the title - //$title = DIVtag::factory('cctitle', Atag::factory(AjaxRequestBuilder::build_replace_url('CurrentConditions', array(), $this->get_ajax_replacement_divid()), 'Current Conditions', 'linkrefresh')); - $title = DIVtag::factory('cctitle', "Current Conditions -- Updated : ", new SPANtag(array('id' => 'idUpdateSeconds'),'')); - $div->add($title); - - //now add the update block - $update_div = new DIVtag(array('id' => 'idcclastupdate'), $this->wx->get_datetime()); - $div->add($update_div); - - - $table = TABLEtag::factory("100%",0,2); - $outside_temp = $this->wx->get_temp_out(); - $table->add_row(new TDtag(array("width" => "120"),"Outside :"), - new DIVtag(array('style' => 'text-align:center; padding-top:2px;height:75px; background-color:#ffffcc;'), - new SPANtag(array('id' => 'idTempF', 'style' => 'font-weight:bold;'),$outside_temp)," F / ", - new SPANtag(array('id' => 'idTempC','style' => 'font-weight:bold;'),WXConversion::fahrenheit_to_celsius($outside_temp)),' C / ', - new SPANtag(array('id' => 'idTempK','style' => 'font-weight:bold;'),WXConversion::fahrenheit_to_kelvin($outside_temp)), " K", - BRtag::factory(), $this->wx->get_forecast(), - new DIVtag(array('style' => 'padding-top:5px;'), 'Feels like '.$this->wx->get_wind_chill()." F"), - new DIVtag(array('style' => 'padding-top:5px;'), $this->temp_low_high["low"].' F / '.$this->temp_low_high["high"].' F Low/High'))); - - $table->add_row("Relative Humidity : ", $this->wx->get_rel_hum_out().' %'); - - //wind - $table->add_row("Wind : ",new TDtag(array(), SPANtag::factory('',"From the ".$this->wx->get_wind_direction()." ".$this->wx->get_wind_speed().'mph@'.$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['speed'].'mph@'.$this->peak_wind['angle']." ".$this->peak_wind['time']))); - - $table->add_row(" ", " "); - $pressure = $this->wx->get_rel_pressure(); - $table->add_row("Pressure : ", $pressure. ' inHG / '.WXConversion::inchmercury_to_millibars($pressure). ' mbar'); - - - $table->add_row('Rainfall : ',$this->wx->get_rain_1h().'"/ '.$this->wx->get_rain_24h().'" / '.$this->rain_total.'"<br>'. + public function get_content() { + + $div = new DIVtag(array('id'=>$this->get_ajax_replacement_divid().'contents')); + + //build the title + //$title = DIVtag::factory('cctitle', Atag::factory(AjaxRequestBuilder::build_replace_url('CurrentConditions', array(), $this->get_ajax_replacement_divid()), 'Current Conditions', 'linkrefresh')); + $title = DIVtag::factory('cctitle', "Current Conditions -- Updated : ", new SPANtag(array('id' => 'idUpdateSeconds'),'')); + $div->add($title); + + //now add the update block + $update_div = new DIVtag(array('id' => 'idcclastupdate'), $this->wx->get_datetime()); + $div->add($update_div); + + + $table = TABLEtag::factory("100%",0,2); + $outside_temp = $this->wx->get_temp_out(); + $table->add_row(new TDtag(array("width" => "120"),"Outside :"), + new DIVtag(array('style' => 'text-align:center; padding-top:2px;height:75px; background-color:#ffffcc;'), + new SPANtag(array('id' => 'idTempF', 'style' => 'font-weight:bold;'),$outside_temp)," F / ", + new SPANtag(array('id' => 'idTempC','style' => 'font-weight:bold;'),WXConversion::fahrenheit_to_celsius($outside_temp)),' C / ', + new SPANtag(array('id' => 'idTempK','style' => 'font-weight:bold;'),WXConversion::fahrenheit_to_kelvin($outside_temp)), " K", + BRtag::factory(), $this->wx->get_forecast(), + new DIVtag(array('style' => 'padding-top:5px;'), 'Feels like '.$this->wx->get_wind_chill()." F"), + new DIVtag(array('style' => 'padding-top:5px;'), $this->temp_low_high["low"].' F / '.$this->temp_low_high["high"].' F Low/High'))); + + $table->add_row("Relative Humidity : ", $this->wx->get_rel_hum_out().' %'); + + //wind + $table->add_row("Wind : ",new TDtag(array(), SPANtag::factory('',"From the ".$this->wx->get_wind_direction()." ".$this->wx->get_wind_speed().'mph@'.$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['speed'].'mph@'.$this->peak_wind['angle']." ".$this->peak_wind['time']))); + + $table->add_row(" ", " "); + $pressure = $this->wx->get_rel_pressure(); + $table->add_row("Pressure : ", $pressure. ' inHG / '.WXConversion::inchmercury_to_millibars($pressure). ' mbar'); + + + $table->add_row('Rainfall : ',$this->wx->get_rain_1h().'"/ '.$this->wx->get_rain_24h().'" / '.$this->rain_total.'"<br>'. ' 1hr / 24hrs / total.'); - - $table->add_row(" ", " "); - $inside_temp = $this->wx->get_temp_in(); - $table->add_row('Inside : ', $inside_temp." F / ". WXConversion::fahrenheit_to_celsius($inside_temp).'C / '.WXConversion::fahrenheit_to_kelvin($inside_temp). " K");; - - - $div->add($table); - - //$div->add(new DIVtag(array('style' => 'padding-top:10px;background-color: #aaaaaa;'),$this->wx)); - - $script = SCRIPTtag::factory(); - $ts = time(); - $script->add("set_orig_time_ts(".$ts.");"); - - //$div->add($script); - return $div; - } - - - protected function get_wind_angle_image($angle) { - - //calculate the offset to the image from the angle. - if ($angle == 360) { - $angle = 0; - } - - $offset = -1*round($angle) * 14; - $img = new IMGtag(array('id' => 'idWindArrow', 'style' => 'overflow: hidden; left: '.$offset.'px; position: relative;', + + $table->add_row(" ", " "); + $inside_temp = $this->wx->get_temp_in(); + $table->add_row('Inside : ', $inside_temp." F / ". WXConversion::fahrenheit_to_celsius($inside_temp).'C / '.WXConversion::fahrenheit_to_kelvin($inside_temp). " K");; + + + $div->add($table); + + //$div->add(new DIVtag(array('style' => 'padding-top:10px;background-color: #aaaaaa;'),$this->wx)); + + $script = SCRIPTtag::factory(); + $ts = time(); + $script->add("set_orig_time_ts(".$ts.");"); + + //$div->add($script); + return $div; + } + + + protected function get_wind_angle_image($angle) { + + //calculate the offset to the image from the angle. + if ($angle == 360) { + $angle = 0; + } + + $offset = -1*round($angle) * 14; + $img = new IMGtag(array('id' => 'idWindArrow', 'style' => 'overflow: hidden; left: '.$offset.'px; position: relative;', 'src' =>'/images/360arrows_blue.gif')); - return new DIVtag(array('id' => 'idWindArrowDiv', 'style' => 'position:relative;overflow:hidden;top:1px;left:1px;width:14px;height:14px;'), $img); - } + return new DIVtag(array('id' => 'idWindArrowDiv', 'style' => 'position:relative;overflow:hidden;top:1px;left:1px;width:14px;height:14px;'), $img); + } } ?> Modified: trunk/open2300/lib/modules/home/widgets/RemoteMetarConditions.inc =================================================================== --- trunk/open2300/lib/modules/home/widgets/RemoteMetarConditions.inc 2010-03-03 17:13:33 UTC (rev 3409) +++ trunk/open2300/lib/modules/home/widgets/RemoteMetarConditions.inc 2010-03-03 18:06:33 UTC (rev 3410) @@ -52,17 +52,17 @@ $proxy = $GLOBALS["config"]->get("proxy"); if (!empty($proxy)) { - $context = stream_context_create(array("http" => array("proxy" => "tcp://web-proxy.rose.hp.com:8088"))); + $context = stream_context_create(array("http" => array("proxy" => "tcp://".$proxy))); } else { $context = null; } $json = file_get_contents($this->url,0, $context); - Log::singleton()->debug("json returned is ".$json); + //Log::singleton()->debug("json returned is ".$json); $metar = json_decode($json); //echo var_export($metar, true)."\n"; $metar->season = "Spring"; - Log::singleton()->debug(var_export($metar, true)); + //Log::singleton()->debug(var_export($metar, true)); $conditions = array(); $conditions["season"] = $GLOBALS["config"]->get("season"); @@ -70,7 +70,7 @@ $conditions["clouds"] = $clouds; $rained = $this->has_rained(); $conditions["rained"] = $rained; - $conditions["banner"] = $this->get_banner_filename($conditions["season"], $clouds, $rained); + $conditions = $this->get_banner_filename(&$conditions, $rained); return $conditions; //return $metar; @@ -137,7 +137,9 @@ } - private function get_banner_filename($season, $clouds, $rain, $offset=null) { + private function get_banner_filename($conditions, $rain, $offset=null) { + $season = $conditions["season"]; + $clouds = $conditions["clouds"]; $tod = $this->get_time_of_day($offset); //echo (var_export($tod, true)."\n"); $filename = "/images/banners/".$season."/".$tod."_"; @@ -148,11 +150,12 @@ $filename .= $clouds.".jpg"; } - //echo var_export($filename, true)."\n"; + $conditions["filename"] = $filename; if (file_exists($GLOBALS['path_base']."/htdocs".$filename)) { - return $filename; + $conditions["banner"] = "yes"; } else { - return null; + $conditions["banner"] = "no"; + Log::singleton()->debug("Need banner image ".$filename); // if (!is_null($offset)) { // $offset += 1; // } else { @@ -160,6 +163,7 @@ // } // return $this->get_banner_filename($season, $clouds, $rain, $offset); } + return $conditions; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-03-03 17:13:39
|
Revision: 3409 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3409&view=rev Author: hemna Date: 2010-03-03 17:13:33 +0000 (Wed, 03 Mar 2010) Log Message: ----------- oops Modified Paths: -------------- trunk/open2300/lib/modules/home/widgets/RemoteMetarConditions.inc Modified: trunk/open2300/lib/modules/home/widgets/RemoteMetarConditions.inc =================================================================== --- trunk/open2300/lib/modules/home/widgets/RemoteMetarConditions.inc 2010-03-03 16:59:55 UTC (rev 3408) +++ trunk/open2300/lib/modules/home/widgets/RemoteMetarConditions.inc 2010-03-03 17:13:33 UTC (rev 3409) @@ -138,7 +138,6 @@ private function get_banner_filename($season, $clouds, $rain, $offset=null) { - return null; $tod = $this->get_time_of_day($offset); //echo (var_export($tod, true)."\n"); $filename = "/images/banners/".$season."/".$tod."_"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-03-03 17:00:01
|
Revision: 3408 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3408&view=rev Author: hemna Date: 2010-03-03 16:59:55 +0000 (Wed, 03 Mar 2010) Log Message: ----------- added forecast Modified Paths: -------------- trunk/open2300/lib/modules/home/datalist/WXDataList.inc Modified: trunk/open2300/lib/modules/home/datalist/WXDataList.inc =================================================================== --- trunk/open2300/lib/modules/home/datalist/WXDataList.inc 2010-03-03 16:58:52 UTC (rev 3407) +++ trunk/open2300/lib/modules/home/datalist/WXDataList.inc 2010-03-03 16:59:55 UTC (rev 3408) @@ -15,6 +15,7 @@ const LABEL_RAIN_24H = "Rain last 24hrs"; const LABEL_RAIN_TOTAL = "Rain Total"; const LABEL_PRESSURE = "Pressure"; + const LABEL_FORECAST = "Forecast"; /** * the constructor @@ -52,6 +53,8 @@ $this->add_header_item(self::LABEL_PRESSURE, "20", "rel_pressure", HTMLDataList::SORTABLE, HTMLDataList::SEARCHABLE,"center"); + $this->add_header_item(self::LABEL_FORECAST, "20", "forecast", HTMLDataList::SORTABLE, HTMLDataList::SEARCHABLE,"center"); + //$this->add_action_column(DefaultHTMLDataList::ACTION_CHECKBOX, DefaultHTMLDataList::ACTION_FIRST, 'datetime'); $this->_datalistsource->setup_db_options("*", "weather"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-03-03 16:58:58
|
Revision: 3407 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3407&view=rev Author: hemna Date: 2010-03-03 16:58:52 +0000 (Wed, 03 Mar 2010) Log Message: ----------- added new remote metar fetcher for the dynamic banner image replacement Modified Paths: -------------- trunk/open2300/lib/autoload.inc trunk/open2300/lib/core/page/open2300Page.inc Added Paths: ----------- trunk/open2300/lib/modules/home/widgets/RemoteMetarConditions.inc Modified: trunk/open2300/lib/autoload.inc =================================================================== --- trunk/open2300/lib/autoload.inc 2010-03-03 16:57:32 UTC (rev 3406) +++ trunk/open2300/lib/autoload.inc 2010-03-03 16:58:52 UTC (rev 3407) @@ -1,7 +1,7 @@ <?php /** * This is an auto-generated file. Please do not modify! - * Generated on 2010-02-27T10:41:33-08:00 by AutoloadGenerator + * Generated on 2010-03-02T10:13:35-08:00 by AutoloadGenerator * * @package open2300 */ @@ -199,6 +199,7 @@ 'ProjectGenerator'=>'external/phphtmllib/src/generator/ProjectGenerator.inc', 'RainLineGraph'=>'modules/graphs/RainLineGraph.inc', 'RedTheme'=>'external/phphtmllib/data/css/RedTheme.inc', +'RemoteMetarConditions'=>'modules/home/widgets/RemoteMetarConditions.inc', 'RemoteUpdate'=>'modules/api/RemoteUpdate.inc', 'Request'=>'external/phphtmllib/src/request/Request.inc', 'RequestBuilder'=>'external/phphtmllib/src/request/RequestBuilder.inc', @@ -301,6 +302,7 @@ 'rain-line-graph'=>'RainLineGraph', 'red-theme'=>'RedTheme', 'remote-update'=>'RemoteUpdate', +'rmetar'=>'RemoteMetarConditions', 'round-title-table'=>'RoundTitleTable', 'standard-dialog-w'=>'StandardDialogWidget', 'standard-theme'=>'StandardTheme', @@ -383,6 +385,7 @@ 'RainLineGraph'=>'rain-line-graph', 'RedTheme'=>'red-theme', 'RemoteUpdate'=>'remote-update', +'RemoteMetarConditions'=>'rmetar', 'RoundTitleTable'=>'round-title-table', 'StandardDialogWidget'=>'standard-dialog-w', 'StandardTheme'=>'standard-theme', Modified: trunk/open2300/lib/core/page/open2300Page.inc =================================================================== --- trunk/open2300/lib/core/page/open2300Page.inc 2010-03-03 16:57:32 UTC (rev 3406) +++ trunk/open2300/lib/core/page/open2300Page.inc 2010-03-03 16:58:52 UTC (rev 3407) @@ -124,8 +124,8 @@ $this->add_js_link( 'http://ajax.googleapis.com/ajax/libs/prototype/1/prototype.js' ); $this->add_js_link( 'http://ajax.googleapis.com/ajax/libs/scriptaculous/1/scriptaculous.js' ); $this->add_js_link( '/js/ajax.js' ); - $this->add_js_link( '/js/main.js' ); - $this->add_js_link( '/js/ticker.js' ); + $this->add_js_link( '/js/main.js' ); + $this->add_js_link( '/js/banner.js' ); } protected function header_block() { @@ -133,9 +133,7 @@ if ($this->include_ticker) { - $script = SCRIPTtag::factory(); - $script->add("Event.observe(window, 'load', start_ticker);"); - $header->add($script); + $this->add_js_link( '/js/ticker.js' ); } Added: trunk/open2300/lib/modules/home/widgets/RemoteMetarConditions.inc =================================================================== --- trunk/open2300/lib/modules/home/widgets/RemoteMetarConditions.inc (rev 0) +++ trunk/open2300/lib/modules/home/widgets/RemoteMetarConditions.inc 2010-03-03 16:58:52 UTC (rev 3407) @@ -0,0 +1,193 @@ +<?php +/** + * This file contains the Metar conditions + * for our local area. + */ + + +/** + * We need to do this due to cross domain js issues. + * We can't make a direct js ajax call to the url, unless + * we are running in the same domain as the url. + * + * @author waboring + * + */ +class RemoteMetarConditions extends JSONWidget { + + const TOD_MORNING = "morning"; + const TOD_MIDDAY = "midday"; + const TOD_AFTERNOON = "afternoon"; + const TOD_EVENING = "evening"; + const TOD_NIGHT = "night"; + + + public static $tod_lookup = array(0=> RemoteMetarConditions::TOD_NIGHT, + 1=>RemoteMetarConditions::TOD_MORNING, + 2=>RemoteMetarConditions::TOD_MIDDAY, + 3=>RemoteMetarConditions::TOD_AFTERNOON, + 4=>RemoteMetarConditions::TOD_EVENING); + + public static $cloud_lookup = array(0 => "clear", + 1 => "few", + 2 => "scattered", + 3 => "broken", + 4 => "overcast"); + + const ID = "rmetar"; + + protected $url="http://api.itimeteo.com/metar.ims?icao=kaun&format=json&decoded=true"; + + /** + * Class Constructor + * + */ + public function init() { + + } + + + + public function build_object() { + + $proxy = $GLOBALS["config"]->get("proxy"); + if (!empty($proxy)) { + $context = stream_context_create(array("http" => array("proxy" => "tcp://web-proxy.rose.hp.com:8088"))); + } else { + $context = null; + } + + $json = file_get_contents($this->url,0, $context); + Log::singleton()->debug("json returned is ".$json); + $metar = json_decode($json); + //echo var_export($metar, true)."\n"; + $metar->season = "Spring"; + Log::singleton()->debug(var_export($metar, true)); + + $conditions = array(); + $conditions["season"] = $GLOBALS["config"]->get("season"); + $clouds = $this->decode_clouds($metar->Metar->DecodeLine0->Clouds); + $conditions["clouds"] = $clouds; + $rained = $this->has_rained(); + $conditions["rained"] = $rained; + $conditions["banner"] = $this->get_banner_filename($conditions["season"], $clouds, $rained); + + return $conditions; + //return $metar; + } + + private function decode_clouds($cloudVar, $offset=null) { + $clouds = 0; + + if ($cloudVar->Overcast) { + $clouds = 4; + } else if ($cloudVar->Broken) { + $clouds = 3; + } else if ($cloudVar->Scattered) { + $clouds = 2; + } else if ($cloudVar->Few) { + $clouds = 1; + } else { + $clouds = 0; + } + + if (!is_null($offset)) { + $clouds += $offset; + + if ($clouds > 4) { + $clouds = 0; + } else if ($clouds < 0) { + $clouds = 4; + } + } + + return RemoteMetarConditions::$cloud_lookup[$clouds]; + } + + private function get_time_of_day($offset=null) { + $hour = date("G"); + $tod = null; + + if ($hour == 00 || $hour > 0 && $hour <6) { + $tod = 0; + } else if ($hour >= 6 && $hour <11) { + $tod = 1; + } else if ($hour >=11 && $hour < 16 ) { + $tod = 2; + } else if ($hour >=16 && $hour <19) { + $tod = 3; + } else if ($hour >=19 && $hour <24) { + $tod = 4; + } + + if (!is_null($offset)) { + $tod += $offset; + echo "tod = ".$tod." "; + + if ($tod > 4) { + $tod = 0; + } else if ($tod < 0) { + $tod = 4; + } + + echo "tod2 = ".$tod."\n"; + } + + return RemoteMetarConditions::$tod_lookup[$tod]; + } + + + private function get_banner_filename($season, $clouds, $rain, $offset=null) { + return null; + $tod = $this->get_time_of_day($offset); + //echo (var_export($tod, true)."\n"); + $filename = "/images/banners/".$season."/".$tod."_"; + + if ($rain) { + $filename .= "rain.jpg"; + } else { + $filename .= $clouds.".jpg"; + } + + //echo var_export($filename, true)."\n"; + if (file_exists($GLOBALS['path_base']."/htdocs".$filename)) { + return $filename; + } else { + return null; +// if (!is_null($offset)) { +// $offset += 1; +// } else { +// $offset = 1; +// } +// return $this->get_banner_filename($season, $clouds, $rain, $offset); + } + } + + /** + * Has it rained in the last 2 hours? + * If so, we are in "rain" mode. + * + * @return unknown_type + */ + private function has_rained() { + $db = open2300DB::singleton(); + $today = date("Y-m-d"); + + $sql = "select rain_1h from weather where datetime like :date order by datetime desc limit 0,1"; + $stmt = $db->queryBindOneRow($sql, array(":date" => $today."%")); + + //echo var_export($stmt->rain_1h,true)."\n"; + + if ( !is_null($stmt) ) { + $rain = $stmt->rain_1h; + if ($rain > 0) { + return true; + } else { + return false; + } + } else { + return false; + } + } +} +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-03-03 16:57:38
|
Revision: 3406 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3406&view=rev Author: hemna Date: 2010-03-03 16:57:32 +0000 (Wed, 03 Mar 2010) Log Message: ----------- added Added Paths: ----------- trunk/open2300/htdocs/js/banner.js Added: trunk/open2300/htdocs/js/banner.js =================================================================== --- trunk/open2300/htdocs/js/banner.js (rev 0) +++ trunk/open2300/htdocs/js/banner.js 2010-03-03 16:57:32 UTC (rev 3406) @@ -0,0 +1,61 @@ +var bannerC; +Event.observe(window, 'load', start_banner); + +function start_banner() { + bannerC = new BannerControl; +} + +var BannerControl = Class.create({ + + initialize: function() { + this.metar = null; + this.getMetar(); + var data = new PeriodicalExecuter(this.getMetar,60*10); + }, + + getMetar: function() { + new Ajax.Request("/?target=rmetar", + { method:'get', + asynchronous:true, + evalJSON:true, + sanitizeJSON:true, + onSuccess: function(req,json) { + var metar = eval('(' + req.responseText + ')'); + + bannerC.metar = metar; + bannerC.processMetar(); + }, + onFailure: function(req) { + console.log("wholy shit!"); + } + }); + }, + + + processMetar: function() { + console.log("Process"); + //console.log(this.metar); + + try { + var img_src = this.metar.banner; + if (img_src != undefined && img_src != null) { + console.log("changing to "+img_src); + + Effect.Fade('pageheader', {duration: 0.7, afterFinish: function() { + img = new Image(); + img.src = bannerC.metar.banner+get_junk(); + $('pageheader').style.backgroundImage = img; + Effect.Appear('pageheader', {duration: 0.7}); + }}); + } else { + console.log("we need a new image!"); + } + + } catch(err) { + //console.log("FUCK!"); + console.log(err.message); + } + + } + +}); \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-03-03 16:20:02
|
Revision: 3405 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3405&view=rev Author: hemna Date: 2010-03-03 16:19:54 +0000 (Wed, 03 Mar 2010) Log Message: ----------- rain Modified Paths: -------------- trunk/open2300/htdocs/css/main.css Modified: trunk/open2300/htdocs/css/main.css =================================================================== --- trunk/open2300/htdocs/css/main.css 2010-03-03 16:19:23 UTC (rev 3404) +++ trunk/open2300/htdocs/css/main.css 2010-03-03 16:19:54 UTC (rev 3405) @@ -18,7 +18,7 @@ background-color: #FFFFFF; width: 100%; height:150px; - background: url('/images/banners/spring/morning_sunny.jpg') no-repeat top center; + background: url('/images/banners/spring/morning_rain.jpg') no-repeat top center; } #headtopleft { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-03-03 16:19:29
|
Revision: 3404 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3404&view=rev Author: hemna Date: 2010-03-03 16:19:23 +0000 (Wed, 03 Mar 2010) Log Message: ----------- pulled comments Modified Paths: -------------- trunk/open2300/htdocs/css/menu.css Modified: trunk/open2300/htdocs/css/menu.css =================================================================== --- trunk/open2300/htdocs/css/menu.css 2010-03-03 04:04:16 UTC (rev 3403) +++ trunk/open2300/htdocs/css/menu.css 2010-03-03 16:19:23 UTC (rev 3404) @@ -3,13 +3,11 @@ font-size: .7em; margin: 0px; padding-top: -10px; - //border: 1px solid green; } #idMenu #idMenuItems { margin:0px; padding:0px; - //border: 1px solid red; } #idMenu #idMenuItems li { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-03-03 04:04:22
|
Revision: 3403 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3403&view=rev Author: hemna Date: 2010-03-03 04:04:16 +0000 (Wed, 03 Mar 2010) Log Message: ----------- renamed Added Paths: ----------- trunk/open2300/htdocs/images/banners/spring/evening_broken.jpg Removed Paths: ------------- trunk/open2300/htdocs/images/banners/spring/evening_partly.jpg Copied: trunk/open2300/htdocs/images/banners/spring/evening_broken.jpg (from rev 3398, trunk/open2300/htdocs/images/banners/spring/evening_partly.jpg) =================================================================== (Binary files differ) Deleted: trunk/open2300/htdocs/images/banners/spring/evening_partly.jpg =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-03-03 04:03:36
|
Revision: 3402 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3402&view=rev Author: hemna Date: 2010-03-03 04:03:29 +0000 (Wed, 03 Mar 2010) Log Message: ----------- renamed Added Paths: ----------- trunk/open2300/htdocs/images/banners/spring/evening_overcast.jpg trunk/open2300/htdocs/images/banners/spring/morning_clear.jpg trunk/open2300/htdocs/images/banners/spring/morning_overcast.jpg Removed Paths: ------------- trunk/open2300/htdocs/images/banners/spring/evening_mostly.jpg trunk/open2300/htdocs/images/banners/spring/morning_cloudy.jpg trunk/open2300/htdocs/images/banners/spring/morning_sunny.jpg Deleted: trunk/open2300/htdocs/images/banners/spring/evening_mostly.jpg =================================================================== (Binary files differ) Copied: trunk/open2300/htdocs/images/banners/spring/evening_overcast.jpg (from rev 3398, trunk/open2300/htdocs/images/banners/spring/evening_mostly.jpg) =================================================================== (Binary files differ) Copied: trunk/open2300/htdocs/images/banners/spring/morning_clear.jpg (from rev 3400, trunk/open2300/htdocs/images/banners/spring/morning_sunny.jpg) =================================================================== (Binary files differ) Deleted: trunk/open2300/htdocs/images/banners/spring/morning_cloudy.jpg =================================================================== (Binary files differ) Copied: trunk/open2300/htdocs/images/banners/spring/morning_overcast.jpg (from rev 3392, trunk/open2300/htdocs/images/banners/spring/morning_cloudy.jpg) =================================================================== (Binary files differ) Deleted: trunk/open2300/htdocs/images/banners/spring/morning_sunny.jpg =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: ED T. P. <php...@li...> - 2010-03-02 05:19:02
|
Use this link for shop http://7fa.hurryyard.ruz6+/ ahixe pipyuwa oixyyekun alyponylet upauvoo euatoeha dufivyzeza eavy neneucyla emasypuhiv iyviwuukof huti niysa oniquf iripyze ojyu wiwah yvyecyxuji huhatoee lejevyraz ytyuzugoli jipigop pife ykalyqyvus kenyqun mevogyfa zuqoyfika fomikoaw aqysawigo zagymiyfy ytiakam epiri olyl igeco kufodup mipuziafy wosenimi ibeo ebizy izoxe buneao ixyvag vocainyv hubokuaaj ielo eidyzy eyguwi ealo ezewa efawano nugoupy ywygalemas gyeuharu ruvevycydy voac arogooaj yuekoaaba utua doxut myjyyde geyt oeageyany ylooen yqadikea iwuz atem keoynyda dowep tanupoyqyo ovyupev muxu eriadiqi |
From: <he...@us...> - 2010-02-28 16:28:14
|
Revision: 3401 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3401&view=rev Author: hemna Date: 2010-02-28 16:28:07 +0000 (Sun, 28 Feb 2010) Log Message: ----------- morning sunny Modified Paths: -------------- trunk/open2300/htdocs/css/main.css Modified: trunk/open2300/htdocs/css/main.css =================================================================== --- trunk/open2300/htdocs/css/main.css 2010-02-28 16:26:31 UTC (rev 3400) +++ trunk/open2300/htdocs/css/main.css 2010-02-28 16:28:07 UTC (rev 3401) @@ -18,7 +18,7 @@ background-color: #FFFFFF; width: 100%; height:150px; - background: url('/images/banners/spring/evening_mostly.jpg') no-repeat top center; + background: url('/images/banners/spring/morning_sunny.jpg') no-repeat top center; } #headtopleft { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-28 16:26:56
|
Revision: 3400 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3400&view=rev Author: hemna Date: 2010-02-28 16:26:31 +0000 (Sun, 28 Feb 2010) Log Message: ----------- added Added Paths: ----------- trunk/open2300/htdocs/images/banners/spring/morning_sunny.jpg Added: trunk/open2300/htdocs/images/banners/spring/morning_sunny.jpg =================================================================== (Binary files differ) Property changes on: trunk/open2300/htdocs/images/banners/spring/morning_sunny.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-28 02:37:41
|
Revision: 3399 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3399&view=rev Author: hemna Date: 2010-02-28 02:37:35 +0000 (Sun, 28 Feb 2010) Log Message: ----------- new evening_mostly.jpg Modified Paths: -------------- trunk/open2300/htdocs/css/main.css Modified: trunk/open2300/htdocs/css/main.css =================================================================== --- trunk/open2300/htdocs/css/main.css 2010-02-28 02:36:49 UTC (rev 3398) +++ trunk/open2300/htdocs/css/main.css 2010-02-28 02:37:35 UTC (rev 3399) @@ -18,7 +18,7 @@ background-color: #FFFFFF; width: 100%; height:150px; - background: url('/images/banners/spring/afternoon_rain.jpg') no-repeat top center; + background: url('/images/banners/spring/evening_mostly.jpg') no-repeat top center; } #headtopleft { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-28 02:36:55
|
Revision: 3398 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3398&view=rev Author: hemna Date: 2010-02-28 02:36:49 +0000 (Sun, 28 Feb 2010) Log Message: ----------- added Added Paths: ----------- trunk/open2300/htdocs/images/banners/spring/evening_mostly.jpg trunk/open2300/htdocs/images/banners/spring/evening_partly.jpg Added: trunk/open2300/htdocs/images/banners/spring/evening_mostly.jpg =================================================================== (Binary files differ) Property changes on: trunk/open2300/htdocs/images/banners/spring/evening_mostly.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/open2300/htdocs/images/banners/spring/evening_partly.jpg =================================================================== (Binary files differ) Property changes on: trunk/open2300/htdocs/images/banners/spring/evening_partly.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-28 01:43:15
|
Revision: 3397 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3397&view=rev Author: hemna Date: 2010-02-28 01:43:09 +0000 (Sun, 28 Feb 2010) Log Message: ----------- afternoon Modified Paths: -------------- trunk/open2300/htdocs/css/main.css Modified: trunk/open2300/htdocs/css/main.css =================================================================== --- trunk/open2300/htdocs/css/main.css 2010-02-27 18:52:47 UTC (rev 3396) +++ trunk/open2300/htdocs/css/main.css 2010-02-28 01:43:09 UTC (rev 3397) @@ -18,7 +18,7 @@ background-color: #FFFFFF; width: 100%; height:150px; - background: url('/images/banners/spring/morning_cloudy.jpg') no-repeat top center; + background: url('/images/banners/spring/afternoon_rain.jpg') no-repeat top center; } #headtopleft { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-27 18:52:53
|
Revision: 3396 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3396&view=rev Author: hemna Date: 2010-02-27 18:52:47 +0000 (Sat, 27 Feb 2010) Log Message: ----------- made the raw data(datalist) available Modified Paths: -------------- trunk/open2300/htdocs/css/main.css trunk/open2300/htdocs/js/main.js trunk/open2300/lib/core/page/open2300Page.inc trunk/open2300/lib/modules/home/page/WeatherDataListPage.inc Modified: trunk/open2300/htdocs/css/main.css =================================================================== --- trunk/open2300/htdocs/css/main.css 2010-02-27 18:47:26 UTC (rev 3395) +++ trunk/open2300/htdocs/css/main.css 2010-02-27 18:52:47 UTC (rev 3396) @@ -15,7 +15,7 @@ } #pageheader { - background-color: #AFB5FF; + background-color: #FFFFFF; width: 100%; height:150px; background: url('/images/banners/spring/morning_cloudy.jpg') no-repeat top center; @@ -190,6 +190,9 @@ table.prevnext td a{text-decoration: none} +#idWxDataList { + padding-top:5px; +} .datalist_col_head { Modified: trunk/open2300/htdocs/js/main.js =================================================================== --- trunk/open2300/htdocs/js/main.js 2010-02-27 18:47:26 UTC (rev 3395) +++ trunk/open2300/htdocs/js/main.js 2010-02-27 18:52:47 UTC (rev 3396) @@ -115,35 +115,9 @@ } -function start_weather_dl_updates() { - set_orig_time(new Date()); - var counter = new PeriodicalExecuter(function() { - - var time = new Date(); - var new_ts = Math.round( (time.getTime())/1000); - var conds = new Array(); - conds['ageh'] = time.getHours() - orig_time.getHours(); - conds['agem'] = time.getMinutes() - orig_time.getMinutes(); - conds['ages'] = time.getSeconds() - orig_time.getSeconds(); - $('idUpdateSeconds').update(convertTime(new_ts - orig_ts)); - },2); - new PeriodicalExecuter(function(pe) { - new Ajax.Updater('idCurrentConditions','/?ajax=1&ajaxid=idCurrentConditions&target=current-conditions&junk='+get_junk() , - {method:'get',asynchronous:true,evalScripts:true, - onComplete: function() { - new Effect.Highlight('idcclastupdate', {duration: 5.0}); - set_orig_time(new Date()); - }}) - }, - 63); - } - - - - function get_junk() { var d = new Date(); var junk=d.getMonth()+1+''+d.getDay()+''+d.getHours()+''+d.getMinutes()+''+d.getSeconds(); Modified: trunk/open2300/lib/core/page/open2300Page.inc =================================================================== --- trunk/open2300/lib/core/page/open2300Page.inc 2010-02-27 18:47:26 UTC (rev 3395) +++ trunk/open2300/lib/core/page/open2300Page.inc 2010-02-27 18:52:47 UTC (rev 3396) @@ -165,7 +165,8 @@ $div = new DIVtag(array('id' => 'idMenuItems')); $ul = ULtag::factory( LItag::factory(Atag::factory(RequestBuilder::build_url('HomePage'), 'Home')), - LItag::factory(Atag::factory(RequestBuilder::build_url('WxDate'), 'Old Data')) + LItag::factory(Atag::factory(RequestBuilder::build_url('WxDate'), 'Old Data')), + LItag::factory(Atag::factory(RequestBuilder::build_url('WeatherDataListPage'), 'Raw Data')) ); $div->add($ul); Modified: trunk/open2300/lib/modules/home/page/WeatherDataListPage.inc =================================================================== --- trunk/open2300/lib/modules/home/page/WeatherDataListPage.inc 2010-02-27 18:47:26 UTC (rev 3395) +++ trunk/open2300/lib/modules/home/page/WeatherDataListPage.inc 2010-02-27 18:52:47 UTC (rev 3396) @@ -44,15 +44,10 @@ $container = Container::factory(); //add some graphs - $right_div = new DIVtag(array('id' => 'idRightContent')); + $right_div = new DIVtag(array('id' => 'idWxDataList')); $right_div->add(new WXDataList); - $container->add($right_div); - - $script = SCRIPTtag::factory(); - $script->add("Event.observe(window, 'load', start_weather_dl_updates);"); - - $container->add($script); + $container->add($right_div); return $container; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-27 18:47:34
|
Revision: 3395 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3395&view=rev Author: hemna Date: 2010-02-27 18:47:26 +0000 (Sat, 27 Feb 2010) Log Message: ----------- fixed datalist Modified Paths: -------------- trunk/open2300/lib/autoload.inc trunk/open2300/lib/modules/home/datalist/WXDataList.inc trunk/open2300/lib/modules/home/page/WeatherDataListPage.inc Modified: trunk/open2300/lib/autoload.inc =================================================================== --- trunk/open2300/lib/autoload.inc 2010-02-27 18:34:40 UTC (rev 3394) +++ trunk/open2300/lib/autoload.inc 2010-02-27 18:47:26 UTC (rev 3395) @@ -1,7 +1,7 @@ <?php /** * This is an auto-generated file. Please do not modify! - * Generated on 2010-02-25T19:54:06-08:00 by AutoloadGenerator + * Generated on 2010-02-27T10:41:33-08:00 by AutoloadGenerator * * @package open2300 */ @@ -270,6 +270,7 @@ 'dark-blue-theme'=>'DarkBlueTheme', 'debug-panel-w'=>'DebugPanelWidget', 'dialog-w'=>'DialogWidget', +'dl'=>'WeatherDataListPage', 'error-box-w'=>'ErrorBoxWidget', 'exception-error'=>'ExceptionErrorPage', 'footer-nav'=>'FooterNav', @@ -319,7 +320,6 @@ 'ticker'=>'TickerConditions', 'tree-item-w'=>'TreeItemWidget', 'vertical-c-s-s-nav-table'=>'VerticalCSSNavTable', -'weather-dl'=>'WeatherDataListPage', 'web-cam'=>'WebCam', 'wind-flash-graph'=>'WindFlashGraph', 'wind-speed-line-graph'=>'WindSpeedLineGraph', @@ -352,6 +352,7 @@ 'DarkBlueTheme'=>'dark-blue-theme', 'DebugPanelWidget'=>'debug-panel-w', 'DialogWidget'=>'dialog-w', +'WeatherDataListPage'=>'dl', 'ErrorBoxWidget'=>'error-box-w', 'ExceptionErrorPage'=>'exception-error', 'FooterNav'=>'footer-nav', @@ -401,7 +402,6 @@ 'TickerConditions'=>'ticker', 'TreeItemWidget'=>'tree-item-w', 'VerticalCSSNavTable'=>'vertical-c-s-s-nav-table', -'WeatherDataListPage'=>'weather-dl', 'WebCam'=>'web-cam', 'WindFlashGraph'=>'wind-flash-graph', 'WindSpeedLineGraph'=>'wind-speed-line-graph', Modified: trunk/open2300/lib/modules/home/datalist/WXDataList.inc =================================================================== --- trunk/open2300/lib/modules/home/datalist/WXDataList.inc 2010-02-27 18:34:40 UTC (rev 3394) +++ trunk/open2300/lib/modules/home/datalist/WXDataList.inc 2010-02-27 18:47:26 UTC (rev 3395) @@ -40,7 +40,7 @@ $this->process_action(); - $this->add_header_item(self::LABEL_DATE, "100", "datetime", HTMLDataList::SORTABLE, HTMLDataList::SEARCHABLE, "left"); + $this->add_header_item(self::LABEL_DATE, "120", "datetime", HTMLDataList::SORTABLE, HTMLDataList::SEARCHABLE, "left"); $this->add_header_item(self::LABEL_OUT_TEMP, "20", "temp_out", HTMLDataList::SORTABLE, HTMLDataList::SEARCHABLE,"center"); $this->add_header_item(self::LABEL_DEWPOINT, "20", "dewpoint", HTMLDataList::SORTABLE, HTMLDataList::SEARCHABLE,"center"); $this->add_header_item(self::LABEL_WINDSPEED, "20", "wind_speed", HTMLDataList::SORTABLE, HTMLDataList::SEARCHABLE,"center"); @@ -79,13 +79,14 @@ $obj = $row_data['wind_speed'] . " mph"; break; - case self::LABEL_OUT_TEMP: + /* case self::LABEL_OUT_TEMP: $obj = $row_data['temp_out']. " F / ". WXConversion::fahrenheit_to_celsius($row_data['temp_out']). " C"; break; case self::LABEL_DEWPOINT: $obj = $row_data['dewpoint']. " F / ". WXConversion::fahrenheit_to_celsius($row_data['dewpoint']). " C"; break; + */ default: $obj = parent::build_column_item($row_data, $col_name); Modified: trunk/open2300/lib/modules/home/page/WeatherDataListPage.inc =================================================================== --- trunk/open2300/lib/modules/home/page/WeatherDataListPage.inc 2010-02-27 18:34:40 UTC (rev 3394) +++ trunk/open2300/lib/modules/home/page/WeatherDataListPage.inc 2010-02-27 18:47:26 UTC (rev 3395) @@ -4,6 +4,10 @@ */ class WeatherDataListPage extends open2300Page { + + const ID = "dl"; + + protected $centering_width = "900px"; /** * Class Constructor @@ -13,6 +17,22 @@ parent::__construct('Hemna WX Station'); } +protected function main_block() { + + $main = new DIVtag(array("id" => self::ID_BODY, + "style" => "width: ".$this->centering_width."; margin-left: auto; margin-right:auto;")); + + $table = TABLEtag::factory("100%", 0); + + $table->add_row( TDtag::factory("", "", $this->content_block() )); + + $table->add_row(new TDtag(array(), + $this->footer_block())); + $main->add( $table ); + + return $main; + } + /** * build the main content for the page * and return it all inside a container object @@ -21,22 +41,13 @@ */ function content_block() { - $container = Container::factory(); - $container->add(' ', BRtag::factory(3)); - - $wx = weatherDataObject::find("1=1 order by datetime desc limit 0,1"); + $container = Container::factory(); - $left_div = new DIVtag(array('id'=> 'idLeftContent')); - - $left_div->add(new DIVtag(array('style' => "width: 300px;"),new CurrentConditions($wx))); - $left_div->add(BRtag::factory(2)); - $left_div->add('<object width="290" height="130"><param name="movie" value="http://www.wunderground.com/swf/pws_mini_rf_nc.swf?station=KCASANJO77&freq=2.5&units=english&lang=EN" /><embed src="http://www.wunderground.com/swf/pws_mini_rf_nc.swf?station=KCASANJO77&freq=2.5&units=english&lang=EN" type="application/x-shockwave-flash" width="290" height="130" /></object>'); - //add some graphs $right_div = new DIVtag(array('id' => 'idRightContent')); $right_div->add(new WXDataList); - $container->add($left_div, $right_div); + $container->add($right_div); $script = SCRIPTtag::factory(); $script->add("Event.observe(window, 'load', start_weather_dl_updates);"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-27 18:34:46
|
Revision: 3394 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3394&view=rev Author: hemna Date: 2010-02-27 18:34:40 +0000 (Sat, 27 Feb 2010) Log Message: ----------- added Added Paths: ----------- trunk/open2300/htdocs/images/banners/spring/morning_rain.jpg Added: trunk/open2300/htdocs/images/banners/spring/morning_rain.jpg =================================================================== (Binary files differ) Property changes on: trunk/open2300/htdocs/images/banners/spring/morning_rain.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-27 18:26:29
|
Revision: 3393 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3393&view=rev Author: hemna Date: 2010-02-27 18:26:23 +0000 (Sat, 27 Feb 2010) Log Message: ----------- morning cloudy Modified Paths: -------------- trunk/open2300/htdocs/css/main.css Modified: trunk/open2300/htdocs/css/main.css =================================================================== --- trunk/open2300/htdocs/css/main.css 2010-02-27 18:25:43 UTC (rev 3392) +++ trunk/open2300/htdocs/css/main.css 2010-02-27 18:26:23 UTC (rev 3393) @@ -18,7 +18,7 @@ background-color: #AFB5FF; width: 100%; height:150px; - background: url('/images/banners/spring/afternoon_rain.jpg') no-repeat top center; + background: url('/images/banners/spring/morning_cloudy.jpg') no-repeat top center; } #headtopleft { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-27 18:25:50
|
Revision: 3392 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3392&view=rev Author: hemna Date: 2010-02-27 18:25:43 +0000 (Sat, 27 Feb 2010) Log Message: ----------- added Added Paths: ----------- trunk/open2300/htdocs/images/banners/spring/morning_cloudy.jpg Added: trunk/open2300/htdocs/images/banners/spring/morning_cloudy.jpg =================================================================== (Binary files differ) Property changes on: trunk/open2300/htdocs/images/banners/spring/morning_cloudy.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-27 05:25:33
|
Revision: 3391 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3391&view=rev Author: hemna Date: 2010-02-27 05:25:27 +0000 (Sat, 27 Feb 2010) Log Message: ----------- rainbow Modified Paths: -------------- trunk/open2300/htdocs/css/main.css Modified: trunk/open2300/htdocs/css/main.css =================================================================== --- trunk/open2300/htdocs/css/main.css 2010-02-27 05:24:45 UTC (rev 3390) +++ trunk/open2300/htdocs/css/main.css 2010-02-27 05:25:27 UTC (rev 3391) @@ -18,7 +18,7 @@ background-color: #AFB5FF; width: 100%; height:150px; - background: url('/images/banners/winter/morning_rain.jpg') no-repeat top center; + background: url('/images/banners/spring/afternoon_rain.jpg') no-repeat top center; } #headtopleft { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-27 05:24:51
|
Revision: 3390 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3390&view=rev Author: hemna Date: 2010-02-27 05:24:45 +0000 (Sat, 27 Feb 2010) Log Message: ----------- added...includes rainbow Added Paths: ----------- trunk/open2300/htdocs/images/banners/spring/afternoon_rain.jpg Added: trunk/open2300/htdocs/images/banners/spring/afternoon_rain.jpg =================================================================== (Binary files differ) Property changes on: trunk/open2300/htdocs/images/banners/spring/afternoon_rain.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-27 01:27:31
|
Revision: 3388 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3388&view=rev Author: hemna Date: 2010-02-27 00:55:51 +0000 (Sat, 27 Feb 2010) Log Message: ----------- fixed junk Modified Paths: -------------- trunk/open2300/htdocs/js/main.js Modified: trunk/open2300/htdocs/js/main.js =================================================================== --- trunk/open2300/htdocs/js/main.js 2010-02-26 19:33:08 UTC (rev 3387) +++ trunk/open2300/htdocs/js/main.js 2010-02-27 00:55:51 UTC (rev 3388) @@ -146,7 +146,7 @@ function get_junk() { var d = new Date(); - var junk=d.getMonth()+1+''+d.getDate()+''+d.getHours()+''+d.getSeconds(); + var junk=d.getMonth()+1+''+d.getDay()+''+d.getHours()+''+d.getMinutes()+''+d.getSeconds(); return junk; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |