[Phphtmllib-devel] SF.net SVN: phphtmllib:[3352] trunk/open2300/lib/modules/wxdate
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2010-02-22 06:46:22
|
Revision: 3352 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3352&view=rev Author: hemna Date: 2010-02-22 06:46:13 +0000 (Mon, 22 Feb 2010) Log Message: ----------- updates Modified Paths: -------------- trunk/open2300/lib/modules/wxdate/page/WxDate.inc trunk/open2300/lib/modules/wxdate/widgets/WxMonthData.inc Modified: trunk/open2300/lib/modules/wxdate/page/WxDate.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 06:18:53 UTC (rev 3351) +++ trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 06:46:13 UTC (rev 3352) @@ -44,10 +44,32 @@ } protected function left_block() { + global $config; + $div = new DIVtag(array("style" => "margin-top:0px; width: 320px;"), new WxDateCalendar(), BRtag::factory(2), new WxMonthData()); + + //only show the flash overlay if we + //have today's video file on disk + $curdate = date("ymd", strtotime($this->date)); + $filename = $config->get('videodir')."/".$curdate."/timelapse.flv"; + //$cam_title_div->add($filename); + if (file_exists($filename)) { + $url = '/video/player.swf?file=/video/'.$curdate.'/timelapse.flv&autostart=1'; + $obj = new ObjectTag(array("data" => $url, + "type" => "application/x-shockwave-flash", "quality" => "high", + "wmode" => "transparent", "pluginspage" => "http://www.adobe.com/go/getflashplayer", + "width" => "320", "height" => "240"), + '<param name="movie" value="'.$url.'"><param name="allowFullScreen" value="true">'); + + $cam_href = new Atag(array('href' => '/video/player.swf?file=/video/'.$curdate.'/timelapse.flv&autostart=1', 'class' => 'lightview', + 'rel' => 'flash', 'title' => 'TimeLapse :: '.$curdate.' :: width:640, height:480'), + "View Timelapse Video"); + + } + return $div; } Modified: trunk/open2300/lib/modules/wxdate/widgets/WxMonthData.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/widgets/WxMonthData.inc 2010-02-22 06:18:53 UTC (rev 3351) +++ trunk/open2300/lib/modules/wxdate/widgets/WxMonthData.inc 2010-02-22 06:46:13 UTC (rev 3352) @@ -14,11 +14,11 @@ $this->date = $date; } - $ts = strtotime($this->date); - $this->year = date("Y", $ts); - $this->month = date("m", $ts); - $this->day = date('j',$ts); - $this->year_month = $this->year."-".$this->month; + $this->ts = strtotime($this->date); + $this->year = date("Y", $this->ts); + $this->month = date("m", $this->ts); + $this->day = date('j', $this->ts); + $this->year_month = $this->year."-".$this->month; Log::Singleton()->debug("date=".$this->date." year = ".$this->year." month = ".$this->month." day = ".$this->day); } @@ -32,7 +32,7 @@ $stmt = $db->queryBindOneRowCache("Select min(temp_out) as low, max(temp_out) as high from weather where datetime like :date", array(":date" => $this->year_month.'%')); - $title = DIVtag::factory('cctitle', "Wx conditions on ".$this->year_month); + $title = DIVtag::factory('cctitle', "Wx conditions for ".date("F Y", $this->ts)); $div->add($title); $table = TABLEtag::factory("100%",0,2); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |