Adding fields and set() methods
[isso.git] / printer.php
1 <?php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Iris Studios Shared Object Framework [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
6 || #
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
10 || #
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 || # more details.
15 || #
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
21
22 /**
23 * Printer
24 * printer.php
25 *
26 * @package ISSO
27 */
28
29 /**
30 * Printer
31 *
32 * This framework generates standard HTML through various functions. The purpose
33 * is generally so that things like the admin system can be created without templates.
34 *
35 * Constants:
36 * ISSO_PRINTER_DONE_HEADER - An internal constant that is used to check to see
37 * if the page header has already been printed
38 * ISSO_PRINTER_HIDE_SETUP - Will stop the page footer data (copyright and debug
39 * box) from being printed
40 *
41 * Hooks:
42 * _printer_page_start() - Define function to echo() data after the page header
43 * has been outputted
44 *
45 * @author Iris Studios, Inc.
46 * @copyright Copyright ©2002 - [#]year[#], Iris Studios, Inc.
47 * @version $Revision$
48 * @package ISSO
49 *
50 */
51 class Printer
52 {
53 /**
54 * Framework registry object
55 * @var object
56 * @access private
57 */
58 var $registry = null;
59
60 /**
61 * Realm that we are operating in (displayed in the <title>)
62 * @var string
63 * @access private
64 */
65 var $realm = '[UNDEFINED REALM]';
66
67 /**
68 * CSS to place in the page
69 * @var string
70 * @access private
71 */
72 var $css = '';
73
74 /**
75 * Fields array that is used in this module
76 * @var array
77 * @access private
78 */
79 var $fields = array(
80 'realm' => array(REQ_YES, null, false)
81 );
82
83 // ###################################################################
84 /**
85 * Constructor
86 */
87 function __construct(&$registry)
88 {
89 $this->registry =& $registry;
90 }
91
92 // ###################################################################
93 /**
94 * (PHP 4) Constructor
95 */
96 function Printer(&$registry)
97 {
98 $this->__construct($registry);
99 }
100
101 // ###################################################################
102 /**
103 * Sets an ISSO field
104 *
105 * @access public
106 *
107 * @param string Field name
108 * @param mixed Value of the field
109 */
110 function set($name, $value)
111 {
112 $this->registry->do_set($name, $value, 'printer');
113 }
114
115 // ###################################################################
116 /**
117 * Creates a redirect to another page; constructs the header and footer
118 * (therefore execution stops)
119 *
120 * @access public
121 *
122 * @param string Location to redirect to
123 * @param integer Time to wait before the redirect
124 * @param array An aray of POST variables to send through on the redirect
125 */
126 function redirect($location, $timeout = 10, $postvars = array())
127 {
128 $timeout = $timeout * 200;
129
130 if ($postvars)
131 {
132 $js = <<<JS
133 <script type="text/javascript">
134 <!--
135 var timeout = $timeout;
136
137 if (timeout > 0)
138 {
139 setTimeout("redirect()", $timeout);
140 }
141 else
142 {
143 redirect();
144 }
145
146 function redirect()
147 {
148 document.forms.postvars.submit();
149 }
150
151 //-->
152 </script>
153 JS;
154 }
155 else
156 {
157 $js = <<<JS
158 <script type="text/javascript">
159 <!--
160 var timeout = $timeout;
161
162 if (timeout > 0)
163 {
164 setTimeout("redirect()", $timeout);
165 }
166 else
167 {
168 redirect();
169 }
170
171 function redirect()
172 {
173 window.location = "$location";
174 }
175 //-->
176 </script>
177 JS;
178 }
179
180 $this->page_start($this->registry->modules['localize']->string('Redirect'));
181
182 if ($postvars)
183 {
184 $this->form_start($location, null, false, 'postvars');
185
186 foreach ($postvars AS $key => $value)
187 {
188 $this->form_hidden_field($key, $value);
189 }
190
191 $this->form_end();
192 }
193
194 $this->page_message($this->registry->modules['localize']->string('Redirect'), sprintf($this->registry->modules['localize']->string('Please wait to be redirected. If you are not redirected in a few seconds, click <a href="%1$s">here</a>.'), $location));
195
196 $this->page_code($js);
197
198 $this->page_end();
199 }
200
201 // ###################################################################
202 /**
203 * Throws a fatal error; constructs the header and footer
204 *
205 * @access public
206 *
207 * @param string Error messsage text
208 */
209 function error($message)
210 {
211 $this->page_start($this->registry->modules['localize']->string('Error'));
212 $this->page_message($this->registry->modules['localize']->string('Error'), $message);
213 $this->page_end();
214
215 exit;
216 }
217
218 // ###################################################################
219 /**
220 * Outputs the header of the page: doctype, <html>, <head>, <title>,
221 * <body> and imbeds the style information
222 *
223 * @access public
224 *
225 * @param string Title of the page
226 * @param string Class of the page to be applied to the body
227 * @param integer Margin of the <div> that all content is placed in
228 * @param string Extra HTML to imbed in the <head> tag
229 * @param string <body> onLoad action to imbed
230 * @param integer Margin of the actual <body > tag
231 * @param string Relative path where the CSS data is stored
232 * @param bool Will force re-print the header if it has already been printed
233 */
234 function page_start($actiontitle, $pageclass = ':default:', $pagemargin = 15, $extra = '', $onload = false, $margin = 0, $dotpath = '.', $override = false)
235 {
236 if ($this->registry->debug AND isset($_GET['query']))
237 {
238 ob_start();
239 }
240
241 if (defined('ISSO_PRINTER_DONE_HEADER') AND !$override)
242 {
243 if (constant('ISSO_PRINTER_DONE_HEADER') AND !$override)
244 {
245 return;
246 }
247 }
248
249 $title = sprintf($this->registry->modules['localize']->string('%1$s - %2$s - %3$s'), $this->registry->application, $this->realm, $actiontitle);
250
251 echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
252 echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>";
253 echo "\n\t<title>$title</title>";
254 echo "\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";
255 echo $this->css;
256 echo ($extra ? "\n$extra" : '');
257 echo "\n</head>\n<body style=\"margin: {$margin}px;\"" . (($pageclass !== ':default:') ? " class=\"$pageclass\"" : '') . (($onload) ? " onload=\"$onload\"" : '') . ">\n";
258
259 if (!defined('ISSO_PRINTER_HIDE_SETUP') AND function_exists('_printer_page_start'))
260 {
261 _printer_page_start();
262 }
263
264 echo "<div style=\"margin: {$pagemargin}px;\">\n<!-- / page head -->\n\n";
265
266 if (!defined('ISSO_PRINTER_DONE_HEADER'))
267 {
268 define('ISSO_PRINTER_DONE_HEADER', 1);
269 }
270 }
271
272 // ###################################################################
273 /**
274 * Links CSS to the page from a given relative path
275 *
276 * @access public
277 *
278 * @param string Relative path to the CSS file
279 */
280 function css_link($path)
281 {
282 $this->css .= "\n\t<link rel=\"stylesheet\" href=\"$path\" />";
283 }
284
285 // ###################################################################
286 /**
287 * Imbeds actual CSS information into the page in <style> tags
288 *
289 * @access public
290 *
291 * @param string Path of the CSS file to be imbeded
292 */
293 function css_imbed($path)
294 {
295 $data = require_once($path);
296 $css = preg_replace('#/\*(.*?)\*/(\r|\n)*#s', '', $css);
297 $css = trim($css);
298 $this->css .= "\n\t<style type=\"text/css\">\n\t<!--\n" . $css . "\n\t//-->\n\t</style>";
299 }
300
301 // ###################################################################
302 /**
303 * Places raw HTML code directly into the documet at the current
304 * position
305 *
306 * @access public
307 *
308 * @param string HTML code
309 */
310 function page_code($code)
311 {
312 echo "\n\n$code\n\n";
313 }
314
315 // ###################################################################
316 /**
317 * A block function that produces a table with a message in it. This
318 * does not print the header and footer.
319 *
320 * @access public
321 *
322 * @param string The title of the message (appears at the top of the block)
323 * @param string Content of the message
324 */
325 function page_message($title, $message)
326 {
327 $this->table_start(true, '75%');
328 $this->table_head($title, 1);
329 $this->row_span("<blockquote>$message</blockquote>", ':swap:', 'left', 1);
330 $this->table_end();
331 }
332
333 // ###################################################################
334 /**
335 * Produces an entire page layout that asks the user whether or not
336 * they want to perform X action and provides a link to the YES and NO
337 * action
338 *
339 * @access public
340 *
341 * @param string Message that asks if they want to do X
342 * @param string Location to go for YES
343 * @param string DO action to pass
344 * @param array Hidden parameters to pass to the next page
345 */
346 function page_confirm($message, $location, $action, $params)
347 {
348 $this->page_start($this->registry->modules['localize']->string('Confirm'));
349
350 $this->form_start($location, $action);
351 foreach ($params AS $key => $value)
352 {
353 $this->form_hidden_field($key, $value);
354 }
355
356 $this->table_start(true, '75%');
357 $this->table_head($this->registry->modules['localize']->string('Confirm'), 1);
358 $this->row_span("<blockquote>$message</blockquote>", ':swap:', 'left', 1);
359 $this->row_submit('<input type="button" class="button" name="no" value=" ' . $this->registry->modules['localize']->string('No') . ' " onclick="history.back(1); return false;" />', $this->registry->modules['localize']->string('Yes'), '');
360 $this->table_end();
361
362 $this->form_end();
363
364 $this->page_end();
365 }
366
367 // ###################################################################
368 /**
369 * Closes the HTML document structure an adds the copyright; this also
370 * stops execution of the page
371 *
372 * @access public
373 */
374 function page_end()
375 {
376 if ($this->registry->debug AND isset($_GET['query']))
377 {
378 ob_clean();
379 ob_end_clean();
380
381 if (is_array($this->registry->modules[ISSO_DB_LAYER]->history))
382 {
383 echo '<pre>';
384 foreach ($this->registry->modules[ISSO_DB_LAYER]->history AS $query)
385 {
386 echo $query . "\n\n<hr />\n\n";
387 }
388 echo '</pre>';
389 }
390 exit;
391 }
392
393 $copyright = "\n<br />\n<p align=\"center\" class=\"copyright\">\n\t<a href=\"http://www.iris-studios.com\" target=\"_blank\">" . $this->registry->application . ' ' . $this->registry->appversion . ", &copy; 2002 - " . date('Y') . " Iris Studios, Inc.</a>\n</p>";
394
395 if (!defined('ISSO_PRINTER_HIDE_SETUP'))
396 {
397 echo "\n<!-- page end -->\n</div>\n$copyright";
398 echo $this->registry->construct_debug_block(false);
399 }
400 else
401 {
402 echo "\n<!-- page end -->\n</div>";
403 }
404
405 echo "\n\n</body>\n</html>";
406
407 exit;
408 }
409
410 // -------------------------------------------------------------------
411
412 // ###################################################################
413 /**
414 * Opens a <table> tag with styling
415 *
416 * @access public
417 *
418 * @param bool Whether to add a <br /> before the table
419 * @param string Value of the width attribute
420 */
421 function table_start($break = true, $width = '90%')
422 {
423 if ($break)
424 {
425 echo '<br />';
426 }
427
428 echo "\n<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" align=\"center\" width=\"$width\" class=\"tborder\">\n";
429 }
430
431 // ###################################################################
432 /**
433 * Adds a table row that is sued to head the entire table
434 *
435 * @access public
436 *
437 * @param string Title string
438 * @param integer Colspan attribute value
439 * @param bool Whether to bold the title
440 */
441 function table_head($title, $colspan = 2, $strong = true)
442 {
443 echo "<tr>\n\t<td class=\"tcat\" align=\"center\" colspan=\"$colspan\">" . (($strong) ? "<strong>$title</strong>" : $title) . "</td>\n</tr>\n";
444 }
445
446 // ###################################################################
447 /**
448 * Creates column headings; useful for a grid-style page. This uses a
449 * different styling than table_head() and is usually used directly
450 * after a table header.
451 *
452 * @access public
453 *
454 * @param array Array of titles to print
455 */
456 function table_column_head($columnarray)
457 {
458 if (is_array($columnarray))
459 {
460 $render = "<tr valign=\"top\" align=\"center\">\n";
461
462 foreach ($columnarray AS $header)
463 {
464 $render .= "\t<td class=\"thead\" align=\"center\">$header</td>\n";
465 }
466
467 $render .= "</tr>\n";
468
469 echo $render;
470 }
471 }
472
473 // ###################################################################
474 /**
475 * Closes a <table> tag
476 *
477 * @access public
478 */
479 function table_end()
480 {
481 echo "\n</table>\n";
482 }
483
484 // -------------------------------------------------------------------
485
486 // ###################################################################
487 /**
488 * Starts a <form> tag and adds the DO hidden input field
489 *
490 * @access public
491 *
492 * @param string Action/name of the file to action to
493 * @param string Value of the DO parameter; used to do-branch
494 * @param bool Enctype attribute; used for mime/multi-part
495 * @param string Name of the form; this only matters for DOM access
496 * @param string Method to action as; POST or GET (default is POST)
497 */
498 function form_start($action, $do, $enctype = false, $name = 'inputform', $submitmethod = 'post')
499 {
500 echo "\n<!-- input form -->\n<form name=\"$name\" action=\"$action\"" . (($enctype) ? " enctype=\"$enctype\"" : '') . " method=\"$submitmethod\">\n";
501
502 if ($do !== null)
503 {
504 $this->form_hidden_field('do', $do);
505 }
506 }
507
508 // ###################################################################
509 /**
510 * Adds a hidden field at the current location
511 *
512 * @access public
513 *
514 * @param string Name of the field
515 * @param string Value of the field
516 */
517 function form_hidden_field($name, $value)
518 {
519 echo "<input type=\"hidden\" name=\"$name\" value=\"$value\" />\n";
520 }
521
522 // ###################################################################
523 /**
524 * Closes a <form> tag
525 *
526 * @access public
527 */
528 function form_end()
529 {
530 echo "</form>\n<!-- / input form -->\n";
531 }
532
533 // -------------------------------------------------------------------
534
535 // ###################################################################
536 /**
537 * Creates a table row that spans an entire row; this is used to divide
538 * sections, usually
539 *
540 * @access public
541 *
542 * @param string Text to place in the row
543 * @param string Class name to style with; by default it alternates between alt1 and alt2 (use :swap: to do that)
544 * @param string Alignment of the text in the row
545 * @param integer Colspan attribute
546 */
547 function row_span($text, $class = ':swap:', $align = 'left', $colspan = 2)
548 {
549 if ($class === ':swap:')
550 {
551 $this->registry->modules['functions']->exec_swap_bg();
552 $row_class = $this->registry->modules['functions']->bgcolour;
553 $is_style_element = false;
554 }
555 else
556 {
557 if (preg_match('#:style:(.*?)#i', $class))
558 {
559 $is_style_element = true;
560 $style = str_replace(':style:', '', $class);
561 }
562 else
563 {
564 $row_class = $class;
565 $is_style_element = false;
566 }
567 }
568
569 echo "\n<tr>\n\t<td ". (($is_style_element) ? "style=\"$style\"" : "class=\"$row_class\"") . " colspan=\"$colspan\" align=\"$align\">$text</td>\n</tr>";
570 }
571
572 // ###################################################################
573 /**
574 * Creates a table row that has more than two columns; this is used in
575 * conjunction with table_column_head() usually; it takes an array of
576 * values
577 *
578 * @access public
579 *
580 * @param array Array of values in form value => alignment key (c for center, l for left, and r for right)
581 */
582 function row_multi_item($row_array)
583 {
584 $this->registry->modules['functions']->exec_swap_bg();
585
586 foreach ($row_array AS $item => $align)
587 {
588 $row_data["$align"][] = $item;
589 }
590
591 echo "<tr valign=\"top\">";
592
593 foreach ($row_data AS $align_key => $item_array)
594 {
595 if ($align_key == 'c')
596 {
597 $align = 'center';
598 }
599 else if ($align_key == 'l')
600 {
601 $align = 'left';
602 }
603 else if ($align_key == 'r')
604 {
605 $align = 'right';
606 }
607
608 foreach ($item_array AS $value)
609 {
610 echo "\n\t<td class=\"{$this->registry->modules['functions']->bgcolour}\" align=\"$align\">$value</td>";
611 }
612 }
613
614 echo "\n</tr>\n";
615 }
616
617 // ###################################################################
618 /**
619 * Generic row creation function that has two columns: label and value;
620 * this is used for many other form functions, but can also be used for
621 * non-editable fields
622 *
623 * @access public
624 *
625 * @param string Label text
626 * @param string HTML or text to place in the value column
627 * @param string Vertical align (valign attribute) for the row
628 * @param integer Colspan attribute
629 * @param string Class to style the row with; default is to alternate
630 */
631 function row_text($label, $value = '&nbsp;', $valign = 'top', $colspan = 2, $class = -1)
632 {
633 global $IS_SETTINGS;
634
635 if ($class == -1)
636 {
637 if (!$IS_SETTINGS)
638 {
639 $this->registry->modules['functions']->exec_swap_bg();
640 $row_class = $this->registry->modules['functions']->bgcolour;
641 }
642 else
643 {
644 $row_class = 'alt2';
645 }
646 }
647 else
648 {
649 $row_class = $class;
650 }
651
652 echo "<tr valign=\"$valign\">";
653 echo "\n\t<td class=\"$row_class\">$label</td>";
654 echo "\n\t<td class=\"$row_class\">$value</td>";
655
656 if ($colspan > 2)
657 {
658 echo "\n\t<td class=\"$row_class\" colspan=\"" . $colspan - 2 . "\">&nbsp;</td>";
659 }
660
661 echo "\n</tr>\n";
662 }
663
664 // ###################################################################
665 /**
666 * Creates a table row with an <input> text field as the value column
667 *
668 * @access public
669 *
670 * @param string Label text
671 * @param string Name of the <input> field
672 * @param string Value of the field
673 * @param integer Colspan attribute
674 * @param integer Size of the <input> field
675 * @param integer Length attribute; use FALSE for no length to be specified
676 * @param bool Whether to make this a password field
677 * @param string Vertical align (valign attribute)
678 */
679 function row_input($label, $name, $value = '', $colspan = 2, $size = 35, $length = false, $password = false, $lalign = 'top')
680 {
681 $this->row_text($label, "<input type=\"" . (($password) ? 'password' : 'text') . "\" class=\"input\" name=\"$name\" value=\"$value\" size=\"$size\" " . (($length) ? "maxlength=\"$length\" " : '') . "/>", $lalign, $colspan);
682 }
683
684 // ###################################################################
685 /**
686 * Creates a table row with a <textarea> as the value column
687 *
688 * @access public
689 *
690 * @param string Label text
691 * @param string Name of the <textarea>
692 * @param string Value of the <textarea>
693 * @param integer Colspan attribute
694 * @param integer Number of rows in the <textarea>
695 * @param integer Number of colums in the <textarea>
696 * @param bool Whether or not to use monospacing font
697 * @param string Extra style attributes to apply to the <textarea>
698 */
699 function row_textarea($label, $name, $value = '', $colspan = 2, $rows = 7, $cols = 50, $code = false, $style = '')
700 {
701 $this->row_text($label, "<textarea name=\"$name\" class=\"" . (($code) ? 'code' : 'input') . "\" rows=\"$rows\" cols=\"$cols\"" . (($style) ? ' style="' . $style . '"' : '') . ">$value</textarea>", 'top', $colspan);
702 }
703
704 // ###################################################################
705 /**
706 * Creates a table row with the tfoot class
707 *
708 * @access public
709 *
710 * @param string Extra text or HTML to insert into the row
711 * @param integer Colspan attribute
712 */
713 function row_tfoot($data, $colspan = 2)
714 {
715 echo $this->row_span($data, 'tfoot', 'center', $colspan);
716 }
717
718 // ###################################################################
719 /**
720 * Creates a tfoot table row with submit buttons
721 *
722 * @access public
723 *
724 * @param string Extra HTML to imbed in the row after the buttons
725 * @param string Submit button text (by default it uses pre-translated "Submit" from :save:)
726 * @param string Reset button text (default it uses pre-translated "Reset" from :reset:)
727 * @param integer Colspan attribute
728 */
729 function row_submit($extra = false, $submit = ':save:', $reset = ':reset:', $colspan = 2)
730 {
731 if ($submit === ':save:')
732 {
733 $submit = " " . $this->registry->modules['localize']->string('Submit') . " ";
734 }
735 else
736 {
737 $submit = " $submit ";
738 }
739
740 if ($reset === ':reset:')
741 {
742 $reset = " " . $this->registry->modules['localize']->string('Reset') . " ";
743 }
744 else
745 {
746 $reset = (($reset) ? " $reset " : '');
747 }
748
749 $output = "\n\t\t<input type=\"submit\" class=\"button\" name=\"__submit__\" value=\"$submit\" accesskey=\"s\" />";
750 $output .= ($reset ? "\n\t\t<input type=\"reset\" class=\"button\" name=\"__reset__\" value=\"$reset\" accesskey=\"r\" />" : '');
751 $output .= ($extra ? "\n\t\t$extra" : '');
752 $output .= "\n\t";
753 $this->row_tfoot($output, $colspan);
754 }
755
756 // ###################################################################
757 /**
758 * Creates an upload row; you need to specify some other paramaters in
759 * form_start() for this to work
760 *
761 * @access public
762 *
763 * @param string Label text
764 * @param string Upload name
765 * @param integer Colspan attribute
766 */
767 function row_upload($label, $name, $colspan = 2)
768 {
769 $this->row_text($label, "<input type=\"file\" class=\"button\" name=\"$name\" size=\"35\" />", 'top', $colspan);
770 }
771
772 // ###################################################################
773 /**
774 * Adds a name-value pair to an array that is constructed into a
775 * <select> list
776 *
777 * @access public
778 *
779 * @param string Text displayed for the option
780 * @param string Value of the option
781 * @param bool Whether or not to select this particluar option
782 */
783 function list_item($name, $value, $selected = false)
784 {
785 global $listitem;
786
787 $listitem[] = "\n\t<option value=\"$value\"" . (($selected == true) ? ' selected="selected"' : '') . ">$name</option>";
788 }
789
790 // ###################################################################
791 /**
792 * Assembles a <select> table row from list_item() items
793 *
794 * @access public
795 *
796 * @param string Label text
797 * @param string Name of the <select>
798 * @param bool Automatically submit the form on a change?
799 * @param integer Colspan attribute
800 */
801 function row_list($label, $name, $is_jump = false, $colspan = 2)
802 {
803 global $listitem;
804
805 foreach ($listitem AS $option)
806 {
807 $optionlist .= $option;
808 }
809
810 $listitem = '';
811
812 $this->row_text($label, "\n<select class=\"button\" name=\"$name\"" . (($is_jump) ? " onchange=\"this.form.submit();\"" : '') . ">$optionlist\n</select>" . (($is_jump) ? "\n<input type=\"submit\" class=\"button\" value=\" " . $this->registry->modules['localize']->string('Go') . " \" accesskey=\"g\" />" : '') . "\n", $colspan);
813 }
814
815 // ###################################################################
816 /**
817 * Creates a row with two radio buttons: yes and now
818 *
819 * @access public
820 *
821 * @param string Label text
822 * @param string Name of the BOOL flag
823 * @param bool TRUE to select the YES by default; FALSE for NO
824 * @param integer Colspan attribute
825 */
826 function row_yesno($label, $name, $value, $colspan = 2)
827 {
828 $this->row_text($label, "<input type=\"radio\" name=\"$name\" value=\"1\"" . (($value) ? ' checked="checked"' : '') . " /> " . $this->registry->modules['localize']->string('Yes') . " <input type=\"radio\" name=\"$name\" value=\"0\"" . ((!$value) ? ' checked="checked"' : '') . " /> " . $this->registry->modules['localize']->string('No'), $colspan);
829 }
830 }
831
832 /*=====================================================================*\
833 || ###################################################################
834 || # $HeadURL$
835 || # $Id$
836 || ###################################################################
837 \*=====================================================================*/
838 ?>