Rev 123 | Rev 129 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 123 | Rev 127 | ||
---|---|---|---|
Line 283... | Line 283... | ||
283 | 283 | ||
284 | if ($parent) { |
284 | if ($parent) { |
285 | if ($parent->isRoot()) { |
285 | if ($parent->isRoot()) { |
286 | 286 | ||
287 | $parent_link_text = $parent->objectTypeTitle(); |
287 | $parent_link_text = $parent->objectTypeTitle(); |
288 | $out['text'] = '<p>Parent node: <a '.oidplus_link($parent->root()).'>'.htmlentities($parent_link_text).'</a></p>' . $out['text']; |
288 | $out['text'] = '<p><img src="img/arrow_back.png" width="16"> Parent node: <a '.oidplus_link($parent->root()).'>'.htmlentities($parent_link_text).'</a></p>' . $out['text']; |
289 | 289 | ||
290 | } else { |
290 | } else { |
291 | $res_ = OIDplus::db()->query("select * from ".OIDPLUS_TABLENAME_PREFIX."objects where id = '".OIDplus::db()->real_escape_string($parent->nodeId())."'"); |
291 | $res_ = OIDplus::db()->query("select * from ".OIDPLUS_TABLENAME_PREFIX."objects where id = '".OIDplus::db()->real_escape_string($parent->nodeId())."'"); |
292 | $row_ = OIDplus::db()->fetch_array($res_); |
292 | $row_ = OIDplus::db()->fetch_array($res_); |
293 | 293 | ||
Line 298... | Line 298... | ||
298 | $parent_title = $row_['name']; // TODO: multiple ASN1 ids? |
298 | $parent_title = $row_['name']; // TODO: multiple ASN1 ids? |
299 | } |
299 | } |
300 | 300 | ||
301 | $parent_link_text = empty($parent_title) ? explode(':',$parent->nodeId())[1] : $parent_title.' ('.explode(':',$parent->nodeId())[1].')'; |
301 | $parent_link_text = empty($parent_title) ? explode(':',$parent->nodeId())[1] : $parent_title.' ('.explode(':',$parent->nodeId())[1].')'; |
302 | 302 | ||
303 | $out['text'] = '<p>Parent node: <a '.oidplus_link($parent->nodeId()).'>'.htmlentities($parent_link_text).'</a></p>' . $out['text']; |
303 | $out['text'] = '<p><img src="img/arrow_back.png" width="16"> Parent node: <a '.oidplus_link($parent->nodeId()).'>'.htmlentities($parent_link_text).'</a></p>' . $out['text']; |
304 | } |
304 | } |
305 | } else { |
305 | } else { |
306 | $parent_link_text = 'Go back to front page'; |
306 | $parent_link_text = 'Go back to front page'; |
307 | $out['text'] = '<p><a '.oidplus_link('oidplus:system').'>'.htmlentities($parent_link_text).'</a></p>' . $out['text']; |
307 | $out['text'] = '<p><a '.oidplus_link('oidplus:system').'><img src="img/arrow_back.png" width="16"> '.htmlentities($parent_link_text).'</a></p>' . $out['text']; |
308 | } |
308 | } |
309 | 309 | ||
310 | if (strpos($out['text'], '%%DESC%%') !== false) |
310 | if (strpos($out['text'], '%%DESC%%') !== false) |
311 | $out['text'] = str_replace('%%DESC%%', $desc, $out['text']); |
311 | $out['text'] = str_replace('%%DESC%%', $desc, $out['text']); |
312 | if (strpos($out['text'], '%%CRUD%%') !== false) |
312 | if (strpos($out['text'], '%%CRUD%%') !== false) |
Line 320... | Line 320... | ||
320 | } else { |
320 | } else { |
321 | // Other pages (search, whois, etc.) |
321 | // Other pages (search, whois, etc.) |
322 | /* |
322 | /* |
323 | if ($id != 'oidplus:system') { |
323 | if ($id != 'oidplus:system') { |
324 | $parent_link_text = 'Go back to front page'; |
324 | $parent_link_text = 'Go back to front page'; |
325 | $out['text'] = '<p><a '.oidplus_link('oidplus:system').'>'.htmlentities($parent_link_text).'</a></p>' . $out['text']; |
325 | $out['text'] = '<p><a '.oidplus_link('oidplus:system').'><img src="img/arrow_back.png" width="16"> '.htmlentities($parent_link_text).'</a></p>' . $out['text']; |
326 | } |
326 | } |
327 | */ |
327 | */ |
328 | } |
328 | } |
329 | 329 | ||
330 | return $out; |
330 | return $out; |