Adding check_isso_field() calls all over the place
[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 $this->registry->check_isso_fields(get_class($this));
237
238 if ($this->registry->debug AND isset($_GET['query']))
239 {
240 ob_start();
241 }
242
243 if (defined('ISSO_PRINTER_DONE_HEADER') AND !$override)
244 {
245 if (constant('ISSO_PRINTER_DONE_HEADER') AND !$override)
246 {
247 return;
248 }
249 }
250
251 $title = sprintf($this->registry->modules['localize']->string('%1$s - %2$s - %3$s'), $this->registry->application, $this->realm, $actiontitle);
252
253 echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
254 echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>";
255 echo "\n\t<title>$title</title>";
256 echo "\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";
257 echo $this->css;
258 echo ($extra ? "\n$extra" : '');
259 echo "\n</head>\n<body style=\"margin: {$margin}px;\"" . (($pageclass !== ':default:') ? " class=\"$pageclass\"" : '') . (($onload) ? " onload=\"$onload\"" : '') . ">\n";
260
261 if (!defined('ISSO_PRINTER_HIDE_SETUP') AND function_exists('_printer_page_start'))
262 {
263 _printer_page_start();
264 }
265
266 echo "<div style=\"margin: {$pagemargin}px;\">\n<!-- / page head -->\n\n";
267
268 if (!defined('ISSO_PRINTER_DONE_HEADER'))
269 {
270 define('ISSO_PRINTER_DONE_HEADER', 1);
271 }
272 }
273
274 // ###################################################################
275 /**
276 * Links CSS to the page from a given relative path
277 *
278 * @access public
279 *
280 * @param string Relative path to the CSS file
281 */
282 function css_link($path)
283 {
284 $this->css .= "\n\t<link rel=\"stylesheet\" href=\"$path\" />";
285 }
286
287 // ###################################################################
288 /**
289 * Imbeds actual CSS information into the page in <style> tags
290 *
291 * @access public
292 *
293 * @param string Path of the CSS file to be imbeded
294 */
295 function css_imbed($path)
296 {
297 $data = require_once($path);
298 $css = preg_replace('#/\*(.*?)\*/(\r|\n)*#s', '', $css);
299 $css = trim($css);
300 $this->css .= "\n\t<style type=\"text/css\">\n\t<!--\n" . $css . "\n\t//-->\n\t</style>";
301 }
302
303 // ###################################################################
304 /**
305 * Places raw HTML code directly into the documet at the current
306 * position
307 *
308 * @access public
309 *
310 * @param string HTML code
311 */
312 function page_code($code)
313 {
314 echo "\n\n$code\n\n";
315 }
316
317 // ###################################################################
318 /**
319 * A block function that produces a table with a message in it. This
320 * does not print the header and footer.
321 *
322 * @access public
323 *
324 * @param string The title of the message (appears at the top of the block)
325 * @param string Content of the message
326 */
327 function page_message($title, $message)
328 {
329 $this->table_start(true, '75%');
330 $this->table_head($title, 1);
331 $this->row_span("<blockquote>$message</blockquote>", ':swap:', 'left', 1);
332 $this->table_end();
333 }
334
335 // ###################################################################
336 /**
337 * Produces an entire page layout that asks the user whether or not
338 * they want to perform X action and provides a link to the YES and NO
339 * action
340 *
341 * @access public
342 *
343 * @param string Message that asks if they want to do X
344 * @param string Location to go for YES
345 * @param string DO action to pass
346 * @param array Hidden parameters to pass to the next page
347 */
348 function page_confirm($message, $location, $action, $params)
349 {
350 $this->page_start($this->registry->modules['localize']->string('Confirm'));
351
352 $this->form_start($location, $action);
353 foreach ($params AS $key => $value)
354 {
355 $this->form_hidden_field($key, $value);
356 }
357
358 $this->table_start(true, '75%');
359 $this->table_head($this->registry->modules['localize']->string('Confirm'), 1);
360 $this->row_span("<blockquote>$message</blockquote>", ':swap:', 'left', 1);
361 $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'), '');
362 $this->table_end();
363
364 $this->form_end();
365
366 $this->page_end();
367 }
368
369 // ###################################################################
370 /**
371 * Closes the HTML document structure an adds the copyright; this also
372 * stops execution of the page
373 *
374 * @access public
375 */
376 function page_end()
377 {
378 if ($this->registry->debug AND isset($_GET['query']))
379 {
380 ob_clean();
381 ob_end_clean();
382
383 if (is_array($this->registry->modules[ISSO_DB_LAYER]->history))
384 {
385 echo '<pre>';
386 foreach ($this->registry->modules[ISSO_DB_LAYER]->history AS $query)
387 {
388 echo $query . "\n\n<hr />\n\n";
389 }
390 echo '</pre>';
391 }
392 exit;
393 }
394
395 $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>";
396
397 if (!defined('ISSO_PRINTER_HIDE_SETUP'))
398 {
399 echo "\n<!-- page end -->\n</div>\n$copyright";
400 echo $this->registry->construct_debug_block(false);
401 }
402 else
403 {
404 echo "\n<!-- page end -->\n</div>";
405 }
406
407 echo "\n\n</body>\n</html>";
408
409 exit;
410 }
411
412 // -------------------------------------------------------------------
413
414 // ###################################################################
415 /**
416 * Opens a <table> tag with styling
417 *
418 * @access public
419 *
420 * @param bool Whether to add a <br /> before the table
421 * @param string Value of the width attribute
422 */
423 function table_start($break = true, $width = '90%')
424 {
425 if ($break)
426 {
427 echo '<br />';
428 }
429
430 echo "\n<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" align=\"center\" width=\"$width\" class=\"tborder\">\n";
431 }
432
433 // ###################################################################
434 /**
435 * Adds a table row that is sued to head the entire table
436 *
437 * @access public
438 *
439 * @param string Title string
440 * @param integer Colspan attribute value
441 * @param bool Whether to bold the title
442 */
443 function table_head($title, $colspan = 2, $strong = true)
444 {
445 echo "<tr>\n\t<td class=\"tcat\" align=\"center\" colspan=\"$colspan\">" . (($strong) ? "<strong>$title</strong>" : $title) . "</td>\n</tr>\n";
446 }
447
448 // ###################################################################
449 /**
450 * Creates column headings; useful for a grid-style page. This uses a
451 * different styling than table_head() and is usually used directly
452 * after a table header.
453 *
454 * @access public
455 *
456 * @param array Array of titles to print
457 */
458 function table_column_head($columnarray)
459 {
460 if (is_array($columnarray))
461 {
462 $render = "<tr valign=\"top\" align=\"center\">\n";
463
464 foreach ($columnarray AS $header)
465 {
466 $render .= "\t<td class=\"thead\" align=\"center\">$header</td>\n";
467 }
468
469 $render .= "</tr>\n";
470
471 echo $render;
472 }
473 }
474
475 // ###################################################################
476 /**
477 * Closes a <table> tag
478 *
479 * @access public
480 */
481 function table_end()
482 {
483 echo "\n</table>\n";
484 }
485
486 // -------------------------------------------------------------------
487
488 // ###################################################################
489 /**
490 * Starts a <form> tag and adds the DO hidden input field
491 *
492 * @access public
493 *
494 * @param string Action/name of the file to action to
495 * @param string Value of the DO parameter; used to do-branch
496 * @param bool Enctype attribute; used for mime/multi-part
497 * @param string Name of the form; this only matters for DOM access
498 * @param string Method to action as; POST or GET (default is POST)
499 */
500 function form_start($action, $do, $enctype = false, $name = 'inputform', $submitmethod = 'post')
501 {
502 echo "\n<!-- input form -->\n<form name=\"$name\" action=\"$action\"" . (($enctype) ? " enctype=\"$enctype\"" : '') . " method=\"$submitmethod\">\n";
503
504 if ($do !== null)
505 {
506 $this->form_hidden_field('do', $do);
507 }
508 }
509
510 // ###################################################################
511 /**
512 * Adds a hidden field at the current location
513 *
514 * @access public
515 *
516 * @param string Name of the field
517 * @param string Value of the field
518 */
519 function form_hidden_field($name, $value)
520 {
521 echo "<input type=\"hidden\" name=\"$name\" value=\"$value\" />\n";
522 }
523
524 // ###################################################################
525 /**
526 * Closes a <form> tag
527 *
528 * @access public
529 */
530 function form_end()
531 {
532 echo "</form>\n<!-- / input form -->\n";
533 }
534
535 // -------------------------------------------------------------------
536
537 // ###################################################################
538 /**
539 * Creates a table row that spans an entire row; this is used to divide
540 * sections, usually
541 *
542 * @access public
543 *
544 * @param string Text to place in the row
545 * @param string Class name to style with; by default it alternates between alt1 and alt2 (use :swap: to do that)
546 * @param string Alignment of the text in the row
547 * @param integer Colspan attribute
548 */
549 function row_span($text, $class = ':swap:', $align = 'left', $colspan = 2)
550 {
551 if ($class === ':swap:')
552 {
553 $this->registry->modules['functions']->exec_swap_bg();
554 $row_class = $this->registry->modules['functions']->bgcolour;
555 $is_style_element = false;
556 }
557 else
558 {
559 if (preg_match('#:style:(.*?)#i', $class))
560 {
561 $is_style_element = true;
562 $style = str_replace(':style:', '', $class);
563 }
564 else
565 {
566 $row_class = $class;
567 $is_style_element = false;
568 }
569 }
570
571 echo "\n<tr>\n\t<td ". (($is_style_element) ? "style=\"$style\"" : "class=\"$row_class\"") . " colspan=\"$colspan\" align=\"$align\">$text</td>\n</tr>";
572 }
573
574 // ###################################################################
575 /**
576 * Creates a table row that has more than two columns; this is used in
577 * conjunction with table_column_head() usually; it takes an array of
578 * values
579 *
580 * @access public
581 *
582 * @param array Array of values in form value => alignment key (c for center, l for left, and r for right)
583 */
584 function row_multi_item($row_array)
585 {
586 $this->registry->modules['functions']->exec_swap_bg();
587
588 foreach ($row_array AS $item => $align)
589 {
590 $row_data["$align"][] = $item;
591 }
592
593 echo "<tr valign=\"top\">";
594
595 foreach ($row_data AS $align_key => $item_array)
596 {
597 if ($align_key == 'c')
598 {
599 $align = 'center';
600 }
601 else if ($align_key == 'l')
602 {
603 $align = 'left';
604 }
605 else if ($align_key == 'r')
606 {
607 $align = 'right';
608 }
609
610 foreach ($item_array AS $value)
611 {
612 echo "\n\t<td class=\"{$this->registry->modules['functions']->bgcolour}\" align=\"$align\">$value</td>";
613 }
614 }
615
616 echo "\n</tr>\n";
617 }
618
619 // ###################################################################
620 /**
621 * Generic row creation function that has two columns: label and value;
622 * this is used for many other form functions, but can also be used for
623 * non-editable fields
624 *
625 * @access public
626 *
627 * @param string Label text
628 * @param string HTML or text to place in the value column
629 * @param string Vertical align (valign attribute) for the row
630 * @param integer Colspan attribute
631 * @param string Class to style the row with; default is to alternate
632 */
633 function row_text($label, $value = '&nbsp;', $valign = 'top', $colspan = 2, $class = -1)
634 {
635 global $IS_SETTINGS;
636
637 if ($class == -1)
638 {
639 if (!$IS_SETTINGS)
640 {
641 $this->registry->modules['functions']->exec_swap_bg();
642 $row_class = $this->registry->modules['functions']->bgcolour;
643 }
644 else
645 {
646 $row_class = 'alt2';
647 }
648 }
649 else
650 {
651 $row_class = $class;
652 }
653
654 echo "<tr valign=\"$valign\">";
655 echo "\n\t<td class=\"$row_class\">$label</td>";
656 echo "\n\t<td class=\"$row_class\">$value</td>";
657
658 if ($colspan > 2)
659 {
660 echo "\n\t<td class=\"$row_class\" colspan=\"" . $colspan - 2 . "\">&nbsp;</td>";
661 }
662
663 echo "\n</tr>\n";
664 }
665
666 // ###################################################################
667 /**
668 * Creates a table row with an <input> text field as the value column
669 *
670 * @access public
671 *
672 * @param string Label text
673 * @param string Name of the <input> field
674 * @param string Value of the field
675 * @param integer Colspan attribute
676 * @param integer Size of the <input> field
677 * @param integer Length attribute; use FALSE for no length to be specified
678 * @param bool Whether to make this a password field
679 * @param string Vertical align (valign attribute)
680 */
681 function row_input($label, $name, $value = '', $colspan = 2, $size = 35, $length = false, $password = false, $lalign = 'top')
682 {
683 $this->row_text($label, "<input type=\"" . (($password) ? 'password' : 'text') . "\" class=\"input\" name=\"$name\" value=\"$value\" size=\"$size\" " . (($length) ? "maxlength=\"$length\" " : '') . "/>", $lalign, $colspan);
684 }
685
686 // ###################################################################
687 /**
688 * Creates a table row with a <textarea> as the value column
689 *
690 * @access public
691 *
692 * @param string Label text
693 * @param string Name of the <textarea>
694 * @param string Value of the <textarea>
695 * @param integer Colspan attribute
696 * @param integer Number of rows in the <textarea>
697 * @param integer Number of colums in the <textarea>
698 * @param bool Whether or not to use monospacing font
699 * @param string Extra style attributes to apply to the <textarea>
700 */
701 function row_textarea($label, $name, $value = '', $colspan = 2, $rows = 7, $cols = 50, $code = false, $style = '')
702 {
703 $this->row_text($label, "<textarea name=\"$name\" class=\"" . (($code) ? 'code' : 'input') . "\" rows=\"$rows\" cols=\"$cols\"" . (($style) ? ' style="' . $style . '"' : '') . ">$value</textarea>", 'top', $colspan);
704 }
705
706 // ###################################################################
707 /**
708 * Creates a table row with the tfoot class
709 *
710 * @access public
711 *
712 * @param string Extra text or HTML to insert into the row
713 * @param integer Colspan attribute
714 */
715 function row_tfoot($data, $colspan = 2)
716 {
717 echo $this->row_span($data, 'tfoot', 'center', $colspan);
718 }
719
720 // ###################################################################
721 /**
722 * Creates a tfoot table row with submit buttons
723 *
724 * @access public
725 *
726 * @param string Extra HTML to imbed in the row after the buttons
727 * @param string Submit button text (by default it uses pre-translated "Submit" from :save:)
728 * @param string Reset button text (default it uses pre-translated "Reset" from :reset:)
729 * @param integer Colspan attribute
730 */
731 function row_submit($extra = false, $submit = ':save:', $reset = ':reset:', $colspan = 2)
732 {
733 if ($submit === ':save:')
734 {
735 $submit = " " . $this->registry->modules['localize']->string('Submit') . " ";
736 }
737 else
738 {
739 $submit = " $submit ";
740 }
741
742 if ($reset === ':reset:')
743 {
744 $reset = " " . $this->registry->modules['localize']->string('Reset') . " ";
745 }
746 else
747 {
748 $reset = (($reset) ? " $reset " : '');
749 }
750
751 $output = "\n\t\t<input type=\"submit\" class=\"button\" name=\"__submit__\" value=\"$submit\" accesskey=\"s\" />";
752 $output .= ($reset ? "\n\t\t<input type=\"reset\" class=\"button\" name=\"__reset__\" value=\"$reset\" accesskey=\"r\" />" : '');
753 $output .= ($extra ? "\n\t\t$extra" : '');
754 $output .= "\n\t";
755 $this->row_tfoot($output, $colspan);
756 }
757
758 // ###################################################################
759 /**
760 * Creates an upload row; you need to specify some other paramaters in
761 * form_start() for this to work
762 *
763 * @access public
764 *
765 * @param string Label text
766 * @param string Upload name
767 * @param integer Colspan attribute
768 */
769 function row_upload($label, $name, $colspan = 2)
770 {
771 $this->row_text($label, "<input type=\"file\" class=\"button\" name=\"$name\" size=\"35\" />", 'top', $colspan);
772 }
773
774 // ###################################################################
775 /**
776 * Adds a name-value pair to an array that is constructed into a
777 * <select> list
778 *
779 * @access public
780 *
781 * @param string Text displayed for the option
782 * @param string Value of the option
783 * @param bool Whether or not to select this particluar option
784 */
785 function list_item($name, $value, $selected = false)
786 {
787 global $listitem;
788
789 $listitem[] = "\n\t<option value=\"$value\"" . (($selected == true) ? ' selected="selected"' : '') . ">$name</option>";
790 }
791
792 // ###################################################################
793 /**
794 * Assembles a <select> table row from list_item() items
795 *
796 * @access public
797 *
798 * @param string Label text
799 * @param string Name of the <select>
800 * @param bool Automatically submit the form on a change?
801 * @param integer Colspan attribute
802 */
803 function row_list($label, $name, $is_jump = false, $colspan = 2)
804 {
805 global $listitem;
806
807 foreach ($listitem AS $option)
808 {
809 $optionlist .= $option;
810 }
811
812 $listitem = '';
813
814 $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);
815 }
816
817 // ###################################################################
818 /**
819 * Creates a row with two radio buttons: yes and now
820 *
821 * @access public
822 *
823 * @param string Label text
824 * @param string Name of the BOOL flag
825 * @param bool TRUE to select the YES by default; FALSE for NO
826 * @param integer Colspan attribute
827 */
828 function row_yesno($label, $name, $value, $colspan = 2)
829 {
830 $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);
831 }
832 }
833
834 /*=====================================================================*\
835 || ###################################################################
836 || # $HeadURL$
837 || # $Id$
838 || ###################################################################
839 \*=====================================================================*/
840 ?>