49 |
} |
} |
50 |
|
|
51 |
function push_text( $text, $selected=FALSE ) { |
function push_text( $text, $selected=FALSE ) { |
52 |
|
if (is_array($text)) { |
53 |
|
foreach($text as $value) { |
54 |
|
$this->push_text($value); |
55 |
|
} |
56 |
|
} |
57 |
|
else { |
58 |
array_push($this->data, array( "type"=>"text", "text"=>$text, |
array_push($this->data, array( "type"=>"text", "text"=>$text, |
59 |
"selected" => $selected )); |
"selected" => $selected )); |
60 |
|
} |
61 |
} |
} |
62 |
|
|
63 |
/** |
/** |
78 |
|
|
79 |
$td = new TDtag; |
$td = new TDtag; |
80 |
$td->newline_after_opentag = FALSE; |
$td->newline_after_opentag = FALSE; |
81 |
$img = html_img("/phphtmllib/widgets/images/arrow.gif", 9, 9); |
$img = html_img("img/widgets/arrow.gif", 9, 9); |
82 |
$img->set_tag_attributes( array("vspace"=>5, "hspace"=>3)); |
$img->set_tag_attributes( array("vspace"=>5, "hspace"=>3)); |
83 |
$img->indent_flag = FALSE; |
$img->indent_flag = FALSE; |
84 |
$img->newline_after_opentag = FALSE; |
$img->newline_after_opentag = FALSE; |
113 |
"class" => "treenavspacer"); |
"class" => "treenavspacer"); |
114 |
$td = new TDtag( $attributes ); |
$td = new TDtag( $attributes ); |
115 |
$td->newline_after_opentag = FALSE; |
$td->newline_after_opentag = FALSE; |
116 |
$img = html_img("/phphtmllib/widgets/images/spacer.gif", 1, 1); |
$img = html_img("img/widgets/spacer.gif", 1, 1); |
117 |
$img->indent_flag = FALSE; |
$img->indent_flag = FALSE; |
118 |
$img->newline_after_opentag = FALSE; |
$img->newline_after_opentag = FALSE; |
119 |
$td->push( $img ); |
$td->push( $img ); |
134 |
"class" => "treenavinnertable"); |
"class" => "treenavinnertable"); |
135 |
$table = new TABLEtag( $attributes ); |
$table = new TABLEtag( $attributes ); |
136 |
|
|
137 |
foreach( $this->data as $nav) { |
$this->build_entries($this->data, $table); |
138 |
|
|
139 |
|
return $table; |
140 |
|
} |
141 |
|
|
142 |
|
function build_entries($entries = '', &$table) { |
143 |
|
if(!is_array($entries)) { $entries = $this->data; } |
144 |
|
foreach( $entries as $nav) { |
145 |
|
if(is_array($nav)) { |
146 |
|
$this->build_entries($nav, $table); |
147 |
|
} |
148 |
|
else { |
149 |
|
print $nav; |
150 |
$img_td = $this->build_img_td(); |
$img_td = $this->build_img_td(); |
151 |
$link_td = $this->build_link_td( $nav ); |
$link_td = $this->build_link_td( $nav ); |
152 |
|
|
154 |
|
|
155 |
$spacer_td = $this->build_spacer_td(); |
$spacer_td = $this->build_spacer_td(); |
156 |
$table->push_row( $spacer_td ); |
$table->push_row( $spacer_td ); |
157 |
|
} |
158 |
} |
} |
|
|
|
|
return $table; |
|
159 |
} |
} |
160 |
|
|
161 |
|
|
|
|
|
162 |
/** |
/** |
163 |
* function that will render the widget. |
* function that will render the widget. |
164 |
* |
* |