// set the FILTER part of a layer that needs a time_stamp
if ( $oLayer->name == 'wind_obs' && $aszElement_time[1] != "" )
{
if ($time_stamp_php_time < (time() - 60*60*24*$sea_coos_obs_range_days)) {
$oLayer->set('connection',
'user=xxx dbname=xxx host=xxx');
$archive_flag = 1;
}
$oLayer->setFilter(
'(report_time_stamp '
.' = '
.'date_trunc(\'hour\',timestamp without time zone \''
.substr($aszElement_time[1],0,4).'-' // yyyy
.substr($aszElement_time[1],5,2).'-' // mm
.substr($aszElement_time[1],8,2).' ' // dd
.substr($aszElement_time[1],11,2).':' // hh
.substr($aszElement_time[1],14,2).':' // mm
.substr($aszElement_time[1],17,4) // ss
.'\' - interval \'1 hour\' * '
.$aszElement_time_zone[1]
.'))'
);
$this_filter =
'(report_time_stamp '
.' = '
.'date_trunc(\'hour\',timestamp without time zone \''
.substr($aszElement_time[1],0,4).'-' // yyyy
.substr($aszElement_time[1],5,2).'-' // mm
.substr($aszElement_time[1],8,2).' ' // dd
.substr($aszElement_time[1],11,2).':' // hh
.substr($aszElement_time[1],14,2).':' // mm
.substr($aszElement_time[1],17,4) // ss
.'\' - interval \'1 hour\' * '
.$aszElement_time_zone[1]
.'))';
if (strlen($aszElement_session_id[1]) > 0 && $mk_imagemap) {
$this_imagemap = mk_imagemap($this->oMap, 'wind_obs', $this_filter, $aszElement_session_id[1].'.wind_obs', $aszElement_velocity_units[1],
'',
$archive_flag);
array_push($imagemap_list,$this_imagemap);
}
}
--
CharltonPurvis - 23 Mar 2005
to top