Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 require_once('class_html_input.php');
00027
00028 class IRadio extends HtmlInput
00029 {
00030
00031
00032 public function input($p_name=null, $p_value=null)
00033 {
00034 $this->name = ($p_name == null) ? $this->name : $p_name;
00035 $this->value = ($p_value == null) ? $this->value : $p_value;
00036 if ($this->readOnly == true)
00037 return $this->display();
00038
00039 $check = ( $this->selected == true || $this->selected == 't' ) ? "checked" : "unchecked";
00040 $r = '<input type="RADIO" name="' . $this->name . '"';
00041 $r.=" VALUE=\"$this->value\"";
00042 $r.=($this->javascript != '') ? 'onclick="' . $this->javascript . '"' : '';
00043 $r.=" $check > ";
00044 return $r;
00045 }
00046
00047
00048
00049 public function display()
00050 {
00051
00052 $check = ( $this->selected == true || $this->selected == 't' ) ? "Yes" : "no";
00053 $r = $check;
00054 return $r;
00055 }
00056
00057
00058
00059
00060
00061 public function set_check($p_value)
00062 {
00063 if ($this->value == $p_value)
00064 $this->selected = true;
00065 }
00066
00067 static public function test_me()
00068 {
00069
00070 }
00071
00072 }