~adamzammit/quexs/quexscativm

« back to all changes in this revision

Viewing changes to include/limesurvey/admin/classes/core/class.progressbar.php

  • Committer: azammitdcarf
  • Date: 2008-10-15 04:55:53 UTC
  • Revision ID: svn-v4:fd4a0071-7450-0410-a91b-842f6942ebe7:trunk:6
Import from DCARF SVN

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/*
 
3
*       Class ProgressBar
 
4
*
 
5
*       Author:         Gerd Weitenberg (hahnebuechen@web.de)
 
6
*       Date:           2005.03.09
 
7
*
 
8
*/
 
9
 
 
10
class ProgressBar
 
11
{
 
12
        // private vars
 
13
        
 
14
        var $code;      // unique code
 
15
        var $status = 'new';    // current status (new,show,hide)
 
16
        var $step = 0;  // current step
 
17
        var $position = array(); // current bar position
 
18
        
 
19
        // public vars
 
20
        
 
21
        var $min = 0;   // minimal steps
 
22
        var $max = 100; // maximal steps
 
23
        
 
24
        var $left = 10; // bar position from left
 
25
        var $top = 25;  // bar position from top
 
26
        var $width = 300;       // bar width
 
27
        var $height = 25;       // bar height
 
28
        var $pedding = 0;       // bar pedding
 
29
        var $color = '#0033ff'; // bar color
 
30
        var $bgr_color = '#c0c0c0';     // bar background color
 
31
        var $border = 1;                        // bar border width
 
32
        var $brd_color = '#000000';     // bar border color
 
33
        
 
34
        var $direction = 'right';       // direction of motion (right,left,up,down)
 
35
        
 
36
        var $frame = array('show' => false);    // ProgressBar Frame
 
37
        /*      'show' => false,        # frame show (true/false)
 
38
                'left' => 200,  # frame position from left
 
39
                'top' => 100,   # frame position from top
 
40
                'width' => 300, # frame width
 
41
                'height' => 75, # frame height
 
42
                'color' => '#c0c0c0',   # frame color
 
43
                'border' => 2,          # frame border
 
44
                'brd_color' => '#dfdfdf #404040 #404040 #dfdfdf'        # frame border color
 
45
        */
 
46
        
 
47
        var $label = array();   // ProgressBar Labels
 
48
        /*      'name' => array(        # label name
 
49
                        'type' => 'text',       # label type (text,button,step,percent,crossbar)
 
50
                        'value' => 'Please wait ...',   # label value
 
51
                        'left' => 10,   # label position from left
 
52
                        'top' => 20,    # label position from top
 
53
                        'width' => 0,   # label width
 
54
                        'height' => 0,  # label height
 
55
                        'align' => 'left',      # label align
 
56
                        'font-size' => 11,      # label font size
 
57
                        'font-family' => 'Verdana, Tahoma, Arial',      # label font family
 
58
                        'font-weight' => '',    #       label font weight
 
59
                        'color' => '#000000',   #       label font color
 
60
                        'bgr_color' => ''       # label background color
 
61
                )
 
62
        */
 
63
        
 
64
        // constructor
 
65
        
 
66
        function ProgressBar($width=0,$height=0)
 
67
        {
 
68
                $this->code = substr(md5(microtime()), 0, 6);
 
69
                if ($width>0) {$this->width = $width;}
 
70
                if ($height>0) {$this->height = $height;}
 
71
        }
 
72
        
 
73
        // private functions
 
74
        
 
75
        function _calculatePercent($step)
 
76
        {
 
77
                $percent = round(($step - $this->min) / ($this->max - $this->min) * 100);
 
78
                if ($percent > 100) {$percent = 100;}
 
79
                return $percent;
 
80
        }
 
81
        
 
82
        function _calculatePosition($step)
 
83
        {
 
84
                switch ($this->direction) {
 
85
                case 'right':
 
86
                case 'left':
 
87
                        $bar = $this->width;
 
88
                        break;
 
89
                case 'down':
 
90
                case 'up':
 
91
                        $bar = $this->height;
 
92
                        break;
 
93
                }
 
94
    
 
95
                $pixel = round(($step - $this->min) * ($bar - ($this->pedding * 2)) / ($this->max - $this->min));
 
96
                if ($step <= $this->min) {$pixel = 0;}
 
97
                if ($step >= $this->max) {$pixel = $bar - ($this->pedding * 2);}
 
98
                
 
99
                switch ($this->direction) {
 
100
                case 'right':
 
101
                        $position['left'] = $this->pedding;
 
102
                        $position['top'] = $this->pedding;
 
103
                        $position['width'] = $pixel;
 
104
                        $position['height'] = $this->height - ($this->pedding * 2);
 
105
                        break;
 
106
                case 'left':
 
107
                        $position['left'] = $this->width - $this->pedding - $pixel;
 
108
                        $position['top'] = $this->pedding;
 
109
                        $position['width'] = $pixel;
 
110
                        $position['height'] = $this->height - ($this->pedding * 2);
 
111
                        break;
 
112
                case 'down':
 
113
                        $position['left'] = $this->pedding;
 
114
                        $position['top'] = $this->pedding;
 
115
                        $position['width'] = $this->width - ($this->pedding * 2);
 
116
                        $position['height'] = $pixel;
 
117
                        break;
 
118
                case 'up':
 
119
                        $position['left'] = $this->pedding;
 
120
                        $position['top'] = $this->height - $this->pedding - $pixel;
 
121
                        $position['width'] = $this->width - ($this->pedding * 2);
 
122
                        $position['height'] = $pixel;
 
123
                        break;
 
124
                }
 
125
                return $position;
 
126
        }
 
127
        
 
128
        function _setStep($step)
 
129
        {
 
130
                if ($step > $this->max) {$step = $this->max;}
 
131
                if ($step < $this->min) {$step = $this->min;}
 
132
                $this->step = $step;
 
133
        }
 
134
        
 
135
        // public functions
 
136
        
 
137
        function setFrame($width=0,$height=0)
 
138
        {
 
139
                $this->frame = array(
 
140
                        'show' => true,
 
141
                        'left' => 20,
 
142
                        'top' => 35,
 
143
                        'width' => 320,
 
144
                        'height' => 90,
 
145
                        'color' => '#c0c0c0',
 
146
                        'border' => 2,
 
147
                        'brd_color' => '#dfdfdf #404040 #404040 #dfdfdf'
 
148
                );
 
149
                
 
150
                if ($width>0) {$this->frame['width'] = $width;}
 
151
                if ($height>0) {$this->frame['height'] = $height;}
 
152
        }
 
153
        
 
154
        function addLabel($type,$name,$value='&nbsp;')
 
155
        {
 
156
                switch($type) {
 
157
                case 'text':
 
158
                        $this->label[$name] = array(
 
159
                                'type' => 'text',
 
160
                                'value' => $value,
 
161
                                'left' => $this->left,
 
162
                                'top' => $this->top - 16,
 
163
                                'width' => 0,
 
164
                                'height' => 0,
 
165
                                'align' => 'left',
 
166
                                'font-size' => 11,
 
167
                                'font-family' => 'Verdana, Tahoma, Arial',
 
168
                                'font-weight' => 'normal',
 
169
                                'color' => '#000000',
 
170
                                'bgr_color' => ''
 
171
                        );
 
172
                        break;
 
173
                case 'button':
 
174
                        $this->label[$name] = array(
 
175
                                'type' => 'button',
 
176
                                'value' => $value,
 
177
                                'action' => '',
 
178
                                'target' => 'self',
 
179
                                'left' => $this->left,
 
180
                                'top' => $this->top + $this->height + 10,
 
181
                                'width' => 0,
 
182
                                'height' => 0,
 
183
                                'align' => 'center',
 
184
                                'font-size' => 11,
 
185
                                'font-family' => 'Verdana, Tahoma, Arial',
 
186
                                'font-weight' => 'normal',
 
187
                                'color' => '#000000',
 
188
                                'bgr_color' => ''
 
189
                        );
 
190
                        break;
 
191
                case 'step':
 
192
                        $this->label[$name] = array(
 
193
                                'type' => 'step',
 
194
                                'value' => $value,
 
195
                                'left' => $this->left + 5,
 
196
                                'top' => $this->top + 5,
 
197
                                'width' => 10,
 
198
                                'height' => 0,
 
199
                                'align' => 'right',
 
200
                                'font-size' => 11,
 
201
                                'font-family' => 'Verdana, Tahoma, Arial',
 
202
                                'font-weight' => 'normal',
 
203
                                'color' => '#000000',
 
204
                                'bgr_color' => ''
 
205
                        );
 
206
                        break;
 
207
                case 'percent':
 
208
                        $this->label[$name] = array(
 
209
                                'type' => 'percent',
 
210
                                'value' => $value,
 
211
                                'left' => $this->left + $this->width - 50,
 
212
                                'top' => $this->top - 16,
 
213
                                'width' => 50,
 
214
                                'height' => 0,
 
215
                                'align' => 'right',
 
216
                                'font-size' => 11,
 
217
                                'font-family' => 'Verdana, Tahoma, Arial',
 
218
                                'font-weight' => 'normal',
 
219
                                'color' => '#000000',
 
220
                                'bgr_color' => ''
 
221
                        );
 
222
                        break;
 
223
                case 'crossbar':
 
224
                        $this->label[$name] = array(
 
225
                                'type' => 'crossbar',
 
226
                                'value' => $value,
 
227
                                'left' => $this->left + ($this->width / 2),
 
228
                                'top' => $this->top - 16,
 
229
                                'width' => 10,
 
230
                                'height' => 0,
 
231
                                'align' => 'center',
 
232
                                'font-size' => 11,
 
233
                                'font-family' => 'Verdana, Tahoma, Arial',
 
234
                                'font-weight' => 'normal',
 
235
                                'color' => '#000000',
 
236
                                'bgr_color' => ''
 
237
                        );
 
238
                        break;
 
239
                }
 
240
        }
 
241
        
 
242
        function addButton($name,$value,$action,$target='self')
 
243
        {
 
244
                $this->addLabel('button',$name,$value);
 
245
                $this->label[$name]['action'] = $action;
 
246
                $this->label[$name]['target'] = $target;
 
247
        }
 
248
        
 
249
        function setLabelPosition($name,$left,$top,$width,$height,$align='')
 
250
        {
 
251
                $this->label[$name]['top'] = intval($top);
 
252
                $this->label[$name]['left'] = intval($left);
 
253
                $this->label[$name]['width'] = intval($width);
 
254
                $this->label[$name]['height'] = intval($height);
 
255
                if ($align!='') {$this->label[$name]['align'] = $align;}
 
256
                
 
257
                if ($this->status!='new') {
 
258
                        echo '<script type="text/JavaScript">document.getElementById("plbl'.$name.$this->code.'").style.top="'.$this->label[$name]['top'].'px";document.getElementById("plbl'.$name.$this->code.'").style.left="'.$this->label[$name]['left'].'px";document.getElementById("plbl'.$name.$this->code.'").style.width="'.$this->label[$name]['width'].'px";document.getElementById("plbl'.$name.$this->code.'").style.height="'.$this->label[$name]['height'].'px";document.getElementById("plbl'.$name.$this->code.'").style.align="'.$this->label[$name]['align'].'";</script>'."\n";
 
259
                        flush();
 
260
                }
 
261
        }
 
262
        
 
263
        function setLabelColor($name,$color)
 
264
        {
 
265
                $this->label[$name]['color'] = $color;
 
266
                if ($this->status!='new') {
 
267
                        echo '<script type="text/JavaScript">document.getElementById("plbl'.$name.$this->code.'").style.color="'.$color.'";</script>'."\n";
 
268
                        flush();
 
269
                }
 
270
        }
 
271
        
 
272
        function setLabelBackground($name,$color)
 
273
        {
 
274
                $this->label[$name]['bgr_color'] = $color;
 
275
                if ($this->status!='new') {
 
276
                        echo '<script type="text/JavaScript">document.getElementById("plbl'.$name.$this->code.'").style.background="'.$color.'";</script>'."\n";
 
277
                        flush();
 
278
                }
 
279
        }
 
280
        
 
281
        function setLabelFont($name,$size,$family='',$weight='')
 
282
        {
 
283
                $this->label[$name]['font-size'] = intval($size);
 
284
                if ($family!='') {$this->label[$name]['font-family'] = $family;}
 
285
                if ($weight!='') {$this->label[$name]['font-weight'] = $weight;}
 
286
                
 
287
                if ($this->status!='new') {
 
288
                        echo '<script type="text/JavaScript">document.getElementById("plbl'.$name.$this->code.'").style.font-size="'.$this->label[$name]['font-size'].'px";document.getElementById("plbl'.$name.$this->code.'").style.font-family="'.$this->label[$name]['font-family'].'";document.getElementById("plbl'.$name.$this->code.'").style.font-weight="'.$this->label[$name]['font-weight'].'";</script>'."\n";
 
289
                        flush();
 
290
                }
 
291
        }
 
292
        
 
293
        function setLabelValue($name,$value)
 
294
        {
 
295
                $this->label[$name]['value'] = $value;
 
296
                if ($this->status!='new') {
 
297
                        echo '<script type="text/JavaScript">PBlabelText'.$this->code.'("'.$name.'","'.$this->label[$name]['value'].'");</script>'."\n";
 
298
                        flush();
 
299
                }
 
300
        }
 
301
        
 
302
        function setBarColor($color)
 
303
        {
 
304
                $this->color = $color;
 
305
                if ($this->status!='new') {
 
306
                        echo '<script type="text/JavaScript">document.getElementById("pbar'.$this->code.'").style.background="'.$color.'";</script>'."\n";
 
307
                        flush();
 
308
                }
 
309
        }
 
310
        
 
311
        function setBarBackground($color)
 
312
        {
 
313
                $this->bgr_color = $color;
 
314
                if ($this->status!='new') {
 
315
                        echo '<script type="text/JavaScript">document.getElementById("pbrd'.$this->code.'").style.background="'.$color.'";</script>'."\n";
 
316
                        flush();
 
317
                }
 
318
        }
 
319
        
 
320
        function setBarDirection($direction)
 
321
        {
 
322
                $this->direction = $direction;
 
323
                
 
324
                if ($this->status!='new') {
 
325
                        $this->position = $this->_calculatePosition($this->step);
 
326
                        
 
327
                        echo '<script type="text/JavaScript">';
 
328
                        echo 'PBposition'.$this->code.'("left",'.$this->position['left'].');';
 
329
                        echo 'PBposition'.$this->code.'("top",'.$this->position['top'].');';
 
330
                        echo 'PBposition'.$this->code.'("width",'.$this->position['width'].');';
 
331
                        echo 'PBposition'.$this->code.'("height",'.$this->position['height'].');';
 
332
                        echo '</script>'."\n";
 
333
                        flush();
 
334
                }
 
335
        }
 
336
        
 
337
        function getHtml()
 
338
        {
 
339
                $html = '';
 
340
                $js = '';
 
341
                
 
342
                $this->_setStep($this->step);
 
343
                $this->position = $this->_calculatePosition($this->step);
 
344
                
 
345
                $style_brd = 'position:absolute;top:'.$this->top.'px;left:'.$this->left.'px;width:'.$this->width.'px;height:'.$this->height.'px;background:'.$this->bgr_color.';';
 
346
                if ($this->border>0) {$style_brd .= 'border:'.$this->border.'px solid;border-color:'.$this->brd_color.';';}
 
347
                
 
348
                $style_bar = 'position:absolute;top:'.$this->position['top'].'px;left:'.$this->position['left'].'px;'.'width:'.$this->position['width'].'px;height:'.$this->position['height'].'px;background:'.$this->color.';';
 
349
                
 
350
                if ($this->frame['show']==true) {
 
351
                        if ($this->frame['border']>0) {$border = 'border:'.$this->frame['border'].'px solid;border-color:'.$this->frame['brd_color'].';';}
 
352
                        $html = '<div id="pfrm'.$this->code.'" style="position:absolute;top:'.$this->frame['top'].'px;left:'.$this->frame['left'].'px;width:'.$this->frame['width'].'px;height:'.$this->frame['height'].'px;'.$border.'background:'.$this->frame['color'].';">'."\n";
 
353
                }
 
354
                
 
355
                $html .= '<div id="pbrd'.$this->code.'" style="'.$style_brd.'">'."\n";
 
356
                $html .= '<div id="pbar'.$this->code.'" style="'.$style_bar.'"></div></div>'."\n";
 
357
                
 
358
                $js .= 'function PBposition'.$this->code.'(item,pixel) {'."\n";
 
359
                $js .= ' pixel = parseInt(pixel);'."\n";
 
360
                $js .= ' switch(item) {'."\n";
 
361
                $js .= '  case "left": document.getElementById("pbar'.$this->code.'").style.left=(pixel) + \'px\'; break;'."\n";
 
362
                $js .= '  case "top": document.getElementById("pbar'.$this->code.'").style.top=(pixel) + \'px\'; break;'."\n";
 
363
                $js .= '  case "width": document.getElementById("pbar'.$this->code.'").style.width=(pixel) + \'px\'; break;'."\n";
 
364
                $js .= '  case "height": document.getElementById("pbar'.$this->code.'").style.height=(pixel) + \'px\'; break;'."\n";
 
365
                $js .= ' }'."\n";
 
366
                $js .= '}'."\n";
 
367
                
 
368
                foreach($this->label as $name => $data) {
 
369
                        $style_lbl = 'position:absolute;top:'.$data['top'].'px;left:'.$data['left'].'px;text-align:'.$data['align'].';';
 
370
                        if ($data['width']>0) {$style_lbl .= 'width:'.$data['width'].'px;';}
 
371
                        if ($data['height']>0) {$style_lbl .= 'height:'.$data['height'].'px;';}
 
372
                        
 
373
                        if (array_key_exists('font-size', $data))       {$style_lbl .= 'font-size:'.$data['font-size'].'px;';}
 
374
                        if (array_key_exists('font-family', $data)) {$style_lbl .= 'font-family:'.$data['font-family'].';';}
 
375
                        if (array_key_exists('font-weight', $data)) {$style_lbl .= 'font-weight:'.$data['font-weight'].';';}
 
376
                        if (array_key_exists('bgr_color', $data) && ($data['bgr_color']!='')) {$style_lbl .= 'background:'.$data['bgr_color'].';';}
 
377
                        
 
378
                        if (array_key_exists('type', $data)) {
 
379
                                switch ($data['type']) {
 
380
                                case 'text':
 
381
                                        $html .= '<div id="plbl'.$name.$this->code.'" style="'.$style_lbl.'">'.$data['value'].'</div>'."\n";
 
382
                                        break;
 
383
                                case 'button':
 
384
                                        $html .= '<div><input id="plbl'.$name.$this->code.'" type="button" value="'.$data['value'].'" style="'.$style_lbl.'" onclick="'.$data['target'].'.location.href=\''.$data['action'].'\'" /></div>'."\n";
 
385
                                        break;
 
386
                                case 'step':
 
387
                                        $html .= '<div id="plbl'.$name.$this->code.'" style="'.$style_lbl.'">'.$this->step.'</div>'."\n";
 
388
                                        break;
 
389
                                case 'percent':
 
390
                                        $html .= '<div id="plbl'.$name.$this->code.'" style="'.$style_lbl.'">'.$this->_calculatePercent($this->step).'%</div>'."\n";
 
391
                                        break;
 
392
                                case 'crossbar':
 
393
                                        $html .= '<div id="plbl'.$name.$this->code.'" style="'.$style_lbl.'">'.$data['value'].'</div>'."\n";
 
394
                                        
 
395
                                        $js .= 'function PBrotaryCross'.$name.$this->code.'() {'."\n";
 
396
                                        $js .= ' cross = document.getElementById("plbl'.$name.$this->code.'").firstChild.nodeValue;'."\n";
 
397
                                        $js .= ' switch(cross) {'."\n";
 
398
                                        $js .= '  case "--": cross = "\\\\"; break;'."\n";
 
399
                                        $js .= '  case "\\\\": cross = "|"; break;'."\n";
 
400
                                        $js .= '  case "|": cross = "/"; break;'."\n";
 
401
                                        $js .= '  default: cross = "--"; break;'."\n";
 
402
                                        $js .= ' }'."\n";
 
403
                                        $js .= ' document.getElementById("plbl'.$name.$this->code.'").firstChild.nodeValue = cross;'."\n";
 
404
                                        $js .= '}'."\n";
 
405
                                        break;
 
406
                                }
 
407
                        }
 
408
                }
 
409
                
 
410
                if(count($this->label)>0) {
 
411
                        
 
412
                        $js .= 'function PBlabelText'.$this->code.'(name,text) {'."\n";
 
413
                        $js .= ' name = "plbl" + name + "'.$this->code.'";'."\n";
 
414
                        $js .= ' document.getElementById(name).firstChild.nodeValue=text;'."\n";
 
415
                        $js .= '}'."\n";
 
416
                }
 
417
                
 
418
                if ($this->frame['show']==true) {
 
419
                        $html .= '</div>'."\n";
 
420
                }
 
421
                
 
422
                $html .= '<script type="text/JavaScript">'."\n";
 
423
                $html .= $js;
 
424
                $html .= '</script>'."\n";
 
425
                
 
426
                return $html;
 
427
        }
 
428
        
 
429
        function show()
 
430
        {
 
431
                $this->status = 'show';
 
432
                echo $this->getHtml();
 
433
                flush();
 
434
        }
 
435
        
 
436
        function moveStep($step)
 
437
        {
 
438
                $last_step = $this->step;
 
439
                $this->_setStep($step);
 
440
                
 
441
                $js = '';
 
442
    
 
443
                $new_position = $this->_calculatePosition($this->step);
 
444
                if ($new_position['width']!=$this->position['width'] && ($this->direction=='right' || $this->direction=='left')) {
 
445
                        if ($this->direction=='left') {
 
446
                                $js .= 'PBposition'.$this->code.'("left",'.$new_position['left'].');';
 
447
                        }
 
448
                  $js .= 'PBposition'.$this->code.'("width",'.$new_position['width'].');';
 
449
                }
 
450
                if ($new_position['height']!=$this->position['height'] && ($this->direction=='up' || $this->direction=='down')) {
 
451
                        if ($this->direction=='up') {
 
452
                                $js .= 'PBposition'.$this->code.'("top",'.$new_position['top'].');';
 
453
                        }
 
454
                        $js .= 'PBposition'.$this->code.'("height",'.$new_position['height'].');';
 
455
                }
 
456
                $this->position = $new_position;
 
457
        
 
458
                foreach($this->label as $name => $data) {
 
459
                        if (array_key_exists('type', $data)) {
 
460
                                switch($data['type']) {
 
461
                                case 'step':
 
462
                                        if ($this->step!=$last_step) {
 
463
                                                $js .= 'PBlabelText'.$this->code.'("'.$name.'","'.$this->step.'/'.$this->max.'");';
 
464
                                        }
 
465
                                        break;
 
466
                                case 'percent':
 
467
                                        $percent = $this->_calculatePercent($this->step);
 
468
                                        if ($percent!=$this->_calculatePercent($last_step)) {
 
469
                                                $js .= 'PBlabelText'.$this->code.'("'.$name.'","'.$percent.'%");';
 
470
                                        }
 
471
                                        break;
 
472
                                case 'crossbar':
 
473
                                        $js .= 'PBrotaryCross'.$name.$this->code.'();';
 
474
                                        break;
 
475
                                }
 
476
                        }
 
477
                }
 
478
                if ($js!='') {
 
479
                        echo '<script type="text/JavaScript">'.$js.'</script>'."\n";
 
480
                        flush ();
 
481
                }
 
482
        }
 
483
        
 
484
        function moveNext()
 
485
        {
 
486
                $this->moveStep($this->step + 1);
 
487
        }
 
488
        
 
489
        function moveMin()
 
490
        {
 
491
                $this->moveStep($this->min);
 
492
        }
 
493
        
 
494
        function hide()
 
495
        {
 
496
                if ($this->status=='show') {
 
497
                        $this->status = 'hide';
 
498
                        
 
499
                        echo '<script type="text/JavaScript">document.getElementById("pbrd'.$this->code.'").style.visibility="hidden";document.getElementById("pbar'.$this->code.'").style.visibility="hidden";';
 
500
                        if ($this->frame['show']==true) {
 
501
                                echo 'document.getElementById("pfrm'.$this->code.'").style.visibility="hidden";';
 
502
                        }
 
503
                        foreach($this->label as $name => $data) {
 
504
                                echo 'document.getElementById("plbl'.$name.$this->code.'").style.visibility="hidden";';
 
505
                        }
 
506
                        echo '</script>'."\n";
 
507
                        flush();
 
508
                }
 
509
        }
 
510
        
 
511
        function unhide()
 
512
        {
 
513
                if ($this->status=='hide') {
 
514
                        $this->status = 'show';
 
515
                        
 
516
                        echo '<script type="text/JavaScript">document.getElementById("pbrd'.$this->code.'").style.visibility="visible";document.getElementById("pbar'.$this->code.'").style.visibility="visible";';
 
517
                        if ($this->frame['show']==true) {
 
518
                                echo 'document.getElementById("pfrm'.$this->code.'").style.visibility="visible";';
 
519
                        }
 
520
                        foreach($this->label as $name => $data) {
 
521
                                echo 'document.getElementById("plbl'.$name.$this->code.'").style.visibility="visible";';
 
522
                        }
 
523
                        echo '</script>'."\n";
 
524
                        flush();
 
525
                }
 
526
        }
 
527
        
 
528
}
 
529
?>