[Phphtmllib-devel] SF.net SVN: phphtmllib:[3278] trunk/open2300/lib/modules/graphs/gauge/ myRainFla
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2009-10-16 04:07:46
|
Revision: 3278 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3278&view=rev Author: hemna Date: 2009-10-16 04:07:40 +0000 (Fri, 16 Oct 2009) Log Message: ----------- refresh times Modified Paths: -------------- trunk/open2300/lib/modules/graphs/gauge/myRainFlashGauge.php Modified: trunk/open2300/lib/modules/graphs/gauge/myRainFlashGauge.php =================================================================== --- trunk/open2300/lib/modules/graphs/gauge/myRainFlashGauge.php 2009-10-16 04:01:14 UTC (rev 3277) +++ trunk/open2300/lib/modules/graphs/gauge/myRainFlashGauge.php 2009-10-16 04:07:40 UTC (rev 3278) @@ -37,7 +37,7 @@ <!-- current rainfall text --> <text x='40' y='260' width='56' size='14' align='center' color='cccccc'>XX_CURR_XXin</text> - <update url='/index.php?target=my-rain-flash-gauge&mode=XX_MODE_XX&foo=$ts' delay='60' delay_type='1' /> + <update url='/index.php?target=my-rain-flash-gauge&mode=XX_MODE_XX&foo=$ts' delay='XX_REFRESH_XX' delay_type='1' /> </gauge> EOL; @@ -53,17 +53,21 @@ switch ($this->mode) { case "1hr": $this->rain_amount = $current_do->get_rain_1h(); - $this->desc = "1 H R R A I N"; + $this->desc = "1 H R R A I N"; + $this->refresh = 120; break; case "24hr": $this->rain_amount = $current_do->get_rain_24h(); $this->desc = "24 H R R A I N"; + $this->refresh = 240; break; case "total": $this->rain_amount = $current_do->get_rain_total(); $this->desc = "Y E A R R A I N"; + $this->refresh = 240; + $db = open2300DB::singleton(); $year = date("Y"); @@ -84,9 +88,9 @@ } public function render() { - $search_arr = array("XX_CURR_XX", "XX_VAL_XX", "XX_MODE_XX", "XX_DESC_XX"); + $search_arr = array("XX_CURR_XX", "XX_VAL_XX", "XX_MODE_XX", "XX_DESC_XX", 'XX_REFRESH_XX'); $replace_arr = array($this->rain_amount, $this->translate_num($this->rain_amount), - $this->mode, $this->desc); + $this->mode, $this->desc, $this->refresh); $output = str_replace($search_arr, $replace_arr, $this->xml); echo $output; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |