NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/Chameleon/trunk/Chameleon/TimeFilter/TimeFilter.widget.php

Revision 13 (checked in by jcleary, 17 years ago)

Latest Chameleon code checkout from previous repository

Line 
1 <?php
2 /**
3  * TimeFilter Widget Class
4  *
5  * @project     CWC2
6  * @revision    $Id:
7  * @purpose     Display a time range selector for layers
8  * @author      DM Solutions Group (sfournier@dmsolutions.ca)
9  * @copyright
10  * <b>Copyright (c) 2002, DM Solutions Group Inc.</b>
11  * Permission is hereby granted, free of charge, to any person obtaining a
12  * copy of this software and associated documentation files (the "Software"),
13  * to deal in the Software without restriction, including without limitation
14  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15  * and/or sell copies of the Software, and to permit persons to whom the
16  * Software is furnished to do so, subject to the following conditions:
17  *
18  * The above copyright notice and this permission notice shall be included
19  * in all copies or substantial portions of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
24  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  * DEALINGS IN THE SOFTWARE.
28  */
29
30
31 include_once(dirname(__FILE__)."/../Widget.php");
32 include_once(dirname(__FILE__)."/../Label.php");
33
34 /**
35  * TimeFilter
36  *
37  * @desc A widget that displays a time range combobox to
38  * display specific layers
39  */
40 class TimeFilter extends CWCWidget
41 {
42     var $mszInputClass = "CWCTimeFilterInputClass";
43     var $mszLabelClass = "CWCTimeFilterLabelClass";
44     var $mszInputStyle = "";
45     var $mszLabelStyle = "";
46
47     /**
48      * build a new widget
49      */
50     function TimeFilter()
51     {
52         $this->mszLanguageResource = str_replace("\\","/",dirname(__FILE__))."/TimeFilter.dbf";
53
54         // invoke constructor of parent
55         parent::CWCWidget();
56
57         // set the description for this widget
58         $this->szWidgetDescription = <<<EOT
59 The TimeFilter widget allows the user to create a filter on the layers in
60 the current context using a time value or range in accordance with the WMS
61 specification.
62 EOT;
63
64         $this->mnPriority = PRIORITY_SUPER;
65         $this->maAttributes["INPUTCLASS"] = new StringAttribute( "INPUTCLASS", false );
66         $this->maAttributes["INPUTSTYLE"] = new StringAttribute( "INPUTSTYLE", false );
67         $this->maAttributes["LABELCLASS"] = new StringAttribute( "LABELCLASS", false );
68         $this->maAttributes["LABELSTYLE"] = new StringAttribute( "LABELSTYLE", false );
69         $this->maAttributes["EARLIESTYEAR"] = new StringAttribute( "EARLIESTYEAR", false );
70         $this->maAttributes["SHOWTIME"] = new BooleanAttribute( "SHOWTIME", false );
71         $this->mnMaturityLevel = MATURITY_BETA;
72     }
73
74     function InitDefaults()
75     {
76         parent::InitDefaults();
77         if (isset($this->maParams["INPUTCLASS"]))
78             $this->mszInputClass = $this->maParams["INPUTCLASS"];
79         if (isset($this->maParams["INPUTSTYLE"]))
80             $this->mszInputStyle = $this->maParams["INPUTSTYLE"];
81         if (isset($this->maParams["LABELCLASS"]))
82             $this->mszLabelClass = $this->maParams["LABELCLASS"];
83         if (isset($this->maParams["LABELSTYLE"]))
84             $this->mszLabelStyle = $this->maParams["LABELSTYLE"];
85     }
86
87     function GetJavascriptOnLoadFunctions()
88     {
89         $bShowTime = $this->getValue("SHOWTIME", "FALSE");
90         $aReturn = array();
91
92         if (stristr($bShowTime, "TRUE") !== false)
93         {
94             $szJsFunctionName = "onloadTimeFilter";
95             $szFunction = "$szJsFunctionName();\n";
96             $aReturn[$szJsFunctionName] = $szFunction;
97         }
98
99         return $aReturn;
100     }
101
102     /**
103      * get the javascript functions for this widget
104      */
105     function GetJavascriptFunctions()
106     {
107         $aReturn = array();
108         $szJsFunctionName = "onloadTimeFilter";
109         $bSetStartTimezone = (($this->isVarSet( 'start_tz' )) ? "0" : "1");
110         $szFunction = <<<EOT
111 /**
112  * Called when page is loaded
113  */
114 function {$szJsFunctionName}()
115 {
116     var curDate = new Date();
117     var timezone = curDate.getTimezoneOffset() / 60;
118     var start_tz = {$this->mszHTMLForm}.start_tz.options[{$this->mszHTMLForm}.start_tz.selectedIndex].value;
119     var end_tz = {$this->mszHTMLForm}.end_tz.options[{$this->mszHTMLForm}.end_tz.selectedIndex].value;
120     var setStartTimezone = {$bSetStartTimezone};
121
122     if (setStartTimezone == 1)
123         {$this->mszHTMLForm}.start_tz.value = timezone;
124 }
125 EOT;
126         $aReturn[$szJsFunctionName] = $szFunction;
127
128         $szJsFunctionName = "monthClicked";
129         $szFunction = <<<EOT
130 /**
131  * Called when month combo is clicked
132  */
133 function {$szJsFunctionName}()
134 {
135     var MINUTE = 60 * 1000;
136     var HOUR = MINUTE * 60;
137     var DAY = HOUR * 24;
138     var WEEK = DAY * 7;
139
140     var start_year = {$this->mszHTMLForm}.start_year.options[{$this->mszHTMLForm}.start_year.selectedIndex].value;
141     var end_year = {$this->mszHTMLForm}.end_year.options[{$this->mszHTMLForm}.end_year.selectedIndex].value;
142     var start_month = {$this->mszHTMLForm}.start_month.options[{$this->mszHTMLForm}.start_month.selectedIndex].value;
143     var end_month = {$this->mszHTMLForm}.end_month.options[{$this->mszHTMLForm}.end_month.selectedIndex].value;
144
145     if (start_month == 12)
146     {
147         start_month = 1;
148         start_year ++;
149     }
150     else
151         start_month ++;
152
153     if (end_month == 12)
154     {
155         end_month = 1;
156         end_year ++;
157     }
158     else
159         end_month ++;
160
161     var startDate = new Date(start_year, start_month-1, 1);
162     var startNbDay = startDate.getTime() - DAY;
163     startDate = new Date(startNbDay);
164
165     var endDate = new Date(end_year, end_month-1, 1);
166     var endNbDay = endDate.getTime() - DAY;
167     endDate = new Date(endNbDay);
168
169     var nSelectedStartDay = {$this->mszHTMLForm}.start_day.selectedIndex;
170     var nSelectedEndDay = {$this->mszHTMLForm}.end_day.selectedIndex;
171
172     //clear day combo
173     var nbEndDay = {$this->mszHTMLForm}.end_day.length;
174     var nbStartDay = {$this->mszHTMLForm}.start_day.length;
175     for (i=0;i<nbEndDay;i++)
176     {
177       {$this->mszHTMLForm}.end_day.options[0] = null;
178     }
179     for (i=0;i<nbStartDay;i++)
180     {
181       {$this->mszHTMLForm}.start_day.options[0] = null;
182     }
183
184
185     // add day
186     nbEndDay = endDate.getDate();
187     ilength = {$this->mszHTMLForm}.end_day.length;
188     optionName = new Option("SAME", -1, false, false);
189     {$this->mszHTMLForm}.end_day.options[ilength] = optionName;
190     for (i=0;i<nbEndDay;i++)
191     {
192         if (nSelectedEndDay == i+1)
193           optionName = new Option(i+1, i+1, true, true);
194         else
195           optionName = new Option(i+1, i+1, false, false);
196
197         ilength = {$this->mszHTMLForm}.end_day.length;
198         {$this->mszHTMLForm}.end_day.options[ilength] = optionName;
199     }
200
201     nbStartDay = startDate.getDate();
202     for (i=0;i<nbStartDay;i++)
203     {
204         if (nSelectedStartDay == i)
205           optionName = new Option(i+1, i+1, true, true);
206         else
207           optionName = new Option(i+1, i+1, false, false);
208
209         ilength = {$this->mszHTMLForm}.start_day.length;
210         {$this->mszHTMLForm}.start_day.options[ilength] = optionName;
211     }
212 }
213 EOT;
214
215         $aReturn[$szJsFunctionName] = $szFunction;
216         return $aReturn;
217     }
218
219     /**
220      * process the url looking for quickzoom requests
221      */
222     function  ParseURL()
223     {
224         parent::ParseURL();
225
226         if ($this->isVarSet( 'bEnableTimeQuery' ) &&
227             $this->getVar( 'bEnableTimeQuery' ) == "on")
228         {
229             $nStartYear  = (($this->isVarSet( 'start_year' )) ?
230                             $this->getVar( 'start_year' ) : "" );
231             $nStartMonth = (($this->isVarSet( 'start_month' )) ?
232                             $this->getVar( 'start_month' ) : "" );
233             $nStartDay   = (($this->isVarSet( 'start_day' )) ?
234                             $this->getVar( 'start_day' ) : "" );
235             $nStartHour  = (($this->isVarSet( 'start_hour' )) ?
236                             $this->getVar( 'start_hour' ) : "" );
237             $nStartMinute= (($this->isVarSet( 'start_minute' )) ?
238                             $this->getVar( 'start_minute' ) : "" );
239             $nStartTz    = (($this->isVarSet( 'start_tz' )) ?
240                             $this->getVar( 'start_tz' ) : "" );
241
242             $nEndYear  = (($this->isVarSet( 'end_year' )) ?
243                           (($this->getVar( 'end_year' ) == -1) ?
244                            $this->getVar( 'start_year' ) :
245                            $this->getVar( 'end_year' )) : "");
246             $nEndMonth = (($this->isVarSet( 'end_month' )) ?
247                           (($this->getVar( 'end_month' ) == -1) ?
248                            $this->getVar( 'start_month' ) :
249                            $this->getVar( 'end_month' )) : "");
250             $nEndDay   = (($this->isVarSet( 'end_day' )) ?
251                           (($this->getVar( 'end_day' ) == -1) ?
252                            $this->getVar( 'start_day' ) :
253                            $this->getVar( 'end_day' )) : "");
254             $nEndHour  = (($this->isVarSet( 'end_hour' )) ?
255                           (($this->getVar( 'end_hour' ) == -1) ?
256                            $this->getVar( 'start_hour' ) :
257                            $this->getVar( 'end_hour' )) : "");
258             $nEndMinute= (($this->isVarSet( 'end_minute' )) ?
259                           (($this->getVar( 'end_minute' ) == -1) ?
260                            $this->getVar( 'start_minute' ) :
261                            $this->getVar( 'end_minute' )) : "");
262             $nEndTz    = (($this->isVarSet( 'end_tz' )) ?
263                           (($this->getVar( 'end_tz' ) == -13) ?
264                            $this->getVar( 'start_tz' ) :
265                            $this->getVar( 'end_tz' )) : "");
266
267             $bShowTime = $this->getValue("SHOWTIME", "FALSE");
268
269             if (stristr($bShowTime, "TRUE")!==false)
270             {
271                 $nStartTime = mktime(($nStartHour+$nStartTz), $nStartMinute,0,
272                                      $nStartMonth , $nStartDay, $nStartYear);
273
274                 $nEndTime = mktime(($nEndHour+$nEndTz), $nEndMinute, 0,
275                                    $nEndMonth , $nEndDay, $nEndYear);
276
277                 $szStartTime = date("Y-m-j", $nStartTime)."T".
278                   date("H:i", $nStartTime).":0.0Z";
279                 $szEndTime = date("Y-m-j", $nEndTime)."T".
280                   date("H:i", $nEndTime).":0.0Z";
281             }
282             else
283             {
284                 $szStartTime = $nStartYear."-".$nStartMonth."-".$nStartDay;
285                 $szEndTime = $nEndYear."-".$nEndMonth."-".$nEndDay;
286             }
287
288             $szValue = $szStartTime."/".$szEndTime;
289         }
290         else
291             $szValue = "";
292
293
294         if ($szValue != "")
295         {
296             $nLayers = $this->moMapObject->oMap->numlayers;
297
298             for ($i=0;$i<$nLayers;$i++)
299             {
300                 $oLayer = $this->moMapObject->oMap->getLayer($i);
301                 if ($oLayer->connectiontype == MS_WMS)
302                 {
303                     $oLayer->setMetadata("time_offset_hours", 20);
304                 }
305             }
306         }
307     }
308
309     /**
310      * draw this widget
311      */
312     function DrawPublish()
313     {
314         $nEarliestYear = $this->getValue("EarliestYear", "1940");
315
316
317         $nStartYear  = (($this->isVarSet( 'start_year' )) ?
318                        $this->getVar( 'start_year' ) : "" );
319         $nStartMonth = (($this->isVarSet( 'start_month' )) ?
320                        $this->getVar( 'start_month' ) : "" );
321         $nStartDay   = (($this->isVarSet( 'start_day' )) ?
322                        $this->getVar( 'start_day' ) : "" );
323         $nStartHour  = (($this->isVarSet( 'start_hour' )) ?
324                        $this->getVar( 'start_hour' ) : "" );
325         $nStartMinute= (($this->isVarSet( 'start_minute' )) ?
326                        $this->getVar( 'start_minute' ) : "" );
327         $nStartTz    = (($this->isVarSet( 'start_tz' )) ?
328                        $this->getVar( 'start_tz' ) : "" );
329
330         $nEndYear  = (($this->isVarSet( 'end_year' )) ?
331                        $this->getVar( 'end_year' ) : "" );
332         $nEndMonth = (($this->isVarSet( 'end_month' )) ?
333                        $this->getVar( 'end_month' ) : "" );
334         $nEndDay   = (($this->isVarSet( 'end_day' )) ?
335                        $this->getVar( 'end_day' ) : "" );
336         $nEndHour  = (($this->isVarSet( 'end_hour' )) ?
337                        $this->getVar( 'end_hour' ) : "-1" );
338         $nEndMinute= (($this->isVarSet( 'end_minute' )) ?
339                        $this->getVar( 'end_minute' ) : "-1" );
340         $nEndTz    = (($this->isVarSet( 'end_tz' )) ?
341                        $this->getVar( 'end_tz' ) : "-13" );
342
343         $nCurrentYear = date("Y");
344
345         $bShowTime = $this->getValue("SHOWTIME", "FALSE");
346
347         if (!$this->mbVisible)
348             return "<!-- QuickView is hidden -->";
349
350         if ($this->isVarSet( "START_TIME" ) &&
351             $this->isVarSet( "END_TIME" ))
352         {
353             $szStartTime = $this->getVar( "START_TIME" );
354             $szEndTime = $this->getVar( "END_TIME" );
355         }
356         else
357         {
358             $szStartTime = "";
359             $szEndTime = "";
360         }
361
362         //szInputClass and szInputStyle cause problems in NS4
363         $szInputClass = "";
364         //if ( strlen($this->mszInputClass) > 0 )
365         //    $szInputClass = " CLASS=\"$this->mszInputClass\"";
366         $szInputStyle = "";
367         //if ( strlen($this->mszInputStyle) > 0 )
368         //    $szInputStyle = " STYLE=\"$this->mszInputStyle\"";
369         $szLabelClass = "";
370         if ( strlen($this->mszLabelClass) > 0 )
371             $szLabelClass = " CLASS=\"$this->mszLabelClass\"";
372         $szLabelStyle = "";
373         if ( strlen($this->mszLabelStyle) > 0 )
374             $szLabelStyle = " STYLE=\"$this->mszLabelStyle\"";
375
376
377         $szResult  = "<!-- Star of TimeRangeWidget -->\n";
378         $szResult .= "<TABLE>\n";
379         $szResult .= "  <TR>\n";
380         $szResult .= "    <TD></TD>\n";
381         $szResult .= "    <TD><p$szLabelClass$szLabelStyle>".trim($this->moMLT->get("0","Year"))."</p></TD>\n";
382         $szResult .= "    <TD><p$szLabelClass$szLabelStyle>".trim($this->moMLT->get("1","Month"))."</p></TD>\n";
383         $szResult .= "    <TD><p$szLabelClass$szLabelStyle>".trim($this->moMLT->get("2","Day"))."</p></TD>\n";
384
385         if (stristr($bShowTime, "TRUE")!==false)
386         {
387             $szResult .= "    <TD><p$szLabelClass$szLabelStyle>".trim($this->moMLT->get("3","Hour"))."</p></TD>\n";
388             $szResult .= "    <TD><p$szLabelClass$szLabelStyle>".trim($this->moMLT->get("4","Minute"))."</p></TD>\n";
389             $szResult .= "    <TD><p$szLabelClass$szLabelStyle>".trim($this->moMLT->get("5","Time Zone"))."</p></TD>\n";
390         }
391
392         $szResult .= "  </TR>\n";
393         $szResult .= "  <TR>\n";
394         $szResult .= "    <TD><p$szLabelClass$szLabelStyle>".trim($this->moMLT->get("6","From:"))."</p></TD>\n";
395
396         $szResult .= "    <TD><SELECT$szInputClass$szInputStyle NAME='start_year' onChange='monthClicked()'>";
397         for ($i=$nEarliestYear;  $i<$nCurrentYear; $i++)
398         {
399           if ($nStartYear == $i)
400             $szResult .= "<OPTION VALUE=\"$i\" selected>$i</OPTION>\n";
401           else
402             $szResult .= "<OPTION VALUE=\"$i\">$i</OPTION>\n";
403         }
404         $szResult .= "        </SELECT></TD>\n";
405
406         $szResult .= "    <TD><SELECT$szInputClass$szInputStyle NAME='start_month' onChange='monthClicked()'>";
407         for ($i=1; $i<=12; $i++)
408         {
409           if ($nStartMonth == $i)
410             $szResult .= "<OPTION VALUE=\"$i\" selected>".date("F", mktime (0,0,0,$i,1,1997))."</OPTION>\n";
411           else
412             $szResult .= "<OPTION VALUE=\"$i\">".date("F", mktime (0,0,0,$i,1,1997))."</OPTION>\n";
413         }
414         $szResult .= "        </SELECT></TD>\n"
415 ;
416         $szResult .= "    <TD><SELECT$szInputClass$szInputStyle NAME='start_day'>\n";
417         for ($i=1;$i<=31;$i++)
418         {
419           if ($nStartDay == $i)
420             $szResult .= "<OPTION VALUE=\"$i\" selected>$i</OPTION>\n";
421           else
422             $szResult .= "<OPTION VALUE=\"$i\">$i</OPTION>\n";
423         }
424         $szResult .= "        </SELECT></TD>\n";
425
426         if (stristr($bShowTime, "TRUE")!==false)
427         {
428           $szResult .= "    <TD><SELECT$szInputClass$szInputStyle NAME='start_hour'>\n";
429           for ($i=0;$i<=23;$i++)
430           {
431             if ($nStartHour == $i)
432               $szResult .= "<OPTION VALUE=\"$i\" selected>$i</OPTION>\n";
433             else
434               $szResult .= "<OPTION VALUE=\"$i\">$i</OPTION>\n";
435           }
436           $szResult .=     "    </SELECT></TD>\n";
437           $szResult .= "    <TD><SELECT$szInputClass$szInputStyle NAME='start_minute'>\n";
438           for ($i=0;$i<=59;$i++)
439           {
440             if ($nStartMinute == $i)
441               $szResult .= "<OPTION VALUE=\"$i\" selected>$i</OPTION>\n";
442             else
443               $szResult .= "<OPTION VALUE=\"$i\">$i</OPTION>\n";
444           }
445           $szResult .= "</SELECT></TD>\n";
446           $szResult .= "    <TD><SELECT$szInputClass$szInputStyle NAME='start_tz'>\n";
447           for($i=-12;$i<=12;$i++)
448           {
449             if ($nStartTz == $i)
450               $szResult .= "<OPTION VALUE=\"$i\" selected>$i</OPTION>";
451             else
452               $szResult .= "<OPTION VALUE=\"$i\">$i</OPTION>";
453           }
454           $szResult .= "        </SELECT></TD>\n";
455         }
456         $szResult .= "  </TR>\n";
457
458         $szResult .= "  <TR>\n";
459         $szResult .= "    <TD><p class=\"CWCTimeFilterLabelClass\">".trim($this->moMLT->get("7","To:"))."</p></TD>\n";
460         $szResult .= "    <TD><SELECT$szInputClass$szInputStyle NAME='end_year' onChange='monthClicked()'>";
461         $szResult .= "<OPTION VALUE=-1>SAME</OPTION>\n";
462         for ($i=$nEarliestYear; $i<$nCurrentYear; $i++)
463         {
464           if ($nEndYear == $i)
465             $szResult .= "<OPTION VALUE=\"$i\" selected>$i</OPTION>\n";
466           else
467             $szResult .= "<OPTION VALUE=\"$i\">$i</OPTION>\n";
468         }
469         $szResult .= "        </SELECT></TD>\n";
470
471         $szResult .= "    <TD><SELECT$szInputClass$szInputStyle NAME='end_month' onChange='monthClicked()'>";
472         $szResult .= "<OPTION VALUE=\"-1\">SAME</OPTION>\n";
473         for ($i=1; $i<=12; $i++)
474         {
475           if ($nEndMonth == $i)
476             $szResult .= "<OPTION VALUE=\"$i\" selected>".date("F", mktime (0,0,0,$i,1,1997))."</OPTION>\n";
477           else
478             $szResult .= "<OPTION VALUE=\"$i\">".date("F", mktime (0,0,0,$i,1,1997))."</OPTION>\n";
479         }
480         $szResult .= "        </SELECT></TD>\n";
481         $szResult .= "    <TD><SELECT$szInputClass$szInputStyle NAME='end_day'>\n";
482         $szResult .= "<OPTION VALUE=\"-1\">SAME</OPTION>\n";
483         for ($i=1;$i<=31;$i++)
484         {
485           if ($nEndDay == $i)
486             $szResult .= "<OPTION VALUE=\"$i\" selected>$i</OPTION>\n";
487           else
488             $szResult .= "<OPTION VALUE=\"$i\">$i</OPTION>\n";
489         }
490         $szResult .= "        </SELECT></TD>\n";
491
492
493         if (stristr($bShowTime, "TRUE")!==false)
494         {
495           $szResult .= "    <TD><SELECT$szInputClass$szInputStyle NAME='end_hour'>\n";
496           $szResult .= "<OPTION VALUE=\"-1\">SAME</OPTION>\n";
497           for ($i=0;$i<=23;$i++)
498           {
499             if ($nEndHour == $i)
500               $szResult .= "<OPTION VALUE=\"$i\" selected>$i</OPTION>\n";
501             else
502               $szResult .= "<OPTION VALUE=\"$i\">$i</OPTION>\n";
503           }
504           $szResult .=     "    </SELECT></TD>\n";
505           $szResult .= "    <TD><SELECT$szInputClass$szInputStyle NAME='end_minute'>\n";
506           $szResult .= "<OPTION VALUE=\"-1\">SAME</OPTION>\n";
507           for ($i=0;$i<=59;$i++)
508           {
509             if ($nEndMinute == $i)
510               $szResult .= "<OPTION VALUE=\"$i\" selected>$i</OPTION>\n";
511             else
512               $szResult .= "<OPTION VALUE=\"$i\">$i</OPTION>\n";
513           }
514           $szResult .= "</SELECT></TD>\n";
515           $szResult .= "    <TD><SELECT$szInputClass$szInputStyle NAME='end_tz'>\n";
516           $szResult .= "<OPTION VALUE=\"-13\">SAME</OPTION>\n";
517           for($i=-12;$i<=12;$i++)
518           {
519             if ($nEndTz == $i)
520               $szResult .= "<OPTION VALUE=\"$i\" selected>$i</OPTION>";
521             else
522               $szResult .= "<OPTION VALUE=\"$i\">$i</OPTION>";
523           }
524           $szResult .= "        </SELECT></TD>\n";
525         }
526         $szResult .= "  </TR>\n";
527
528         $szResult .= "  <TR>\n";
529         $bEnableTimeQuery = (($this->isVarSet( 'bEnableTimeQuery' ) &&
530                               $this->getVar( 'bEnableTimeQuery' ) == "on") ?
531                              "checked" : "" );
532
533         $szResult .= "    <TD>&nbsp;</TD><TD colspan=6><p$szLabelClass$szLabelStyle><INPUT TYPE='CHECKBOX' $bEnableTimeQuery NAME='bEnableTimeQuery'> Apply time filter</p></TD>\n";
534
535         $szResult .= "</TR></TABLE>\n";
536
537         return $szResult;
538     }
539 }
540 ?>
Note: See TracBrowser for help on using the browser.