Skip to topic | Skip to bottom
Home
Main
Main.wind_obs_coder1.1 - 23 Mar 2005 - 17:30 - CharltonPurvistopic end

Start of topic | Skip to actions
// 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


You are here: Main > wind_obs_code

to top

Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DMCC? Send feedback