00001 <?php
00002 include_once ("TreeListbox.php");
00003 class TreeLabelText extends TreeListbox
00004 {
00010 public function render()
00011 {
00012 $fromList = array();
00013 $this->getFromList($fromList);
00014 $valueArray = explode(',', $this->m_Value);
00015
00016 $sHTML = "";
00017 if ($this->m_BlankOption)
00018 {
00019 $entry = explode(",",$this->m_BlankOption);
00020 $text = $entry[0];
00021 $value = ($entry[1]!= "") ? $entry[1] : null;
00022 $entryList = array(array("val" => $value, "txt" => $text ));
00023 $fromList = array_merge($entryList, $fromList);
00024 }
00025
00026 $i=1;
00027 $fromListCount=count($fromList);
00028 foreach ($fromList as $option)
00029 {
00030
00031 $test = array_search($option['val'], $valueArray);
00032
00033 $sHTML .= "<span>" . $option['txt'] . "</span><br />";
00034 $i++;
00035
00036 }
00037
00038 return $sHTML;
00039 }
00040 }
00041 ?>