Rev 1050 | Rev 1086 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1050 | Rev 1066 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | if (is_subclass_of($plugin, OIDplusPagePluginPublic::class)) { |
33 | if (is_subclass_of($plugin, OIDplusPagePluginPublic::class)) { |
34 | $plugin->tree($json, null, true, $static_node_id); |
34 | $plugin->tree($json, null, true, $static_node_id); |
35 | } |
35 | } |
36 | } |
36 | } |
37 | 37 | ||
- | 38 | $out = ''; |
|
38 | foreach ($json as $x) { |
39 | foreach ($json as $x) { |
39 | if ($static_node_id == $x['id']) echo '<b>'; |
40 | if ($static_node_id == $x['id']) $out .= '<b>'; |
40 | if (isset($x['indent'])) echo str_repeat(' ', $x['indent']*5); |
41 | if (isset($x['indent'])) $out .= str_repeat(' ', $x['indent']*5); |
41 | $cur_lang = OIDplus::getCurrentLang(); |
42 | $cur_lang = OIDplus::getCurrentLang(); |
42 | if ($cur_lang != OIDplus::getDefaultLang()) { |
43 | if ($cur_lang != OIDplus::getDefaultLang()) { |
43 | echo '<a href="?lang='.$cur_lang.'&goto='.urlencode($x['id']).'">'; |
44 | $out .= '<a href="?lang='.$cur_lang.'&goto='.urlencode($x['id']).'">'; |
44 | } else { |
45 | } else { |
45 | echo '<a href="?goto='.urlencode($x['id']).'">'; |
46 | $out .= '<a href="?goto='.urlencode($x['id']).'">'; |
46 | } |
47 | } |
47 | if (!empty($x['icon'])) echo '<img src="'.$x['icon'].'" alt=""> '; |
48 | if (!empty($x['icon'])) $out .= '<img src="'.$x['icon'].'" alt=""> '; |
48 | echo htmlentities($x['id']).' | '.htmlentities($x['text']).'</a><br>'; |
49 | $out .= htmlentities($x['id']).' | '.htmlentities($x['text']).'</a><br>'; |
49 | if ($static_node_id == $x['id']) echo '</b>'; |
50 | if ($static_node_id == $x['id']) $out .= '</b>'; |
50 | } |
51 | } |
51 | 52 | return $out; |
|
52 | } |
53 | } |
53 | 54 | ||
54 | // req_id comes from jsTree via AJAX |
55 | // req_id comes from jsTree via AJAX |
55 | // req_goto comes from the user (GET argument) |
56 | // req_goto comes from the user (GET argument) |
56 | public static function json_tree($req_id, $req_goto) { |
57 | public static function json_tree($req_id, $req_goto) { |