Rev 256 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 256 | Rev 261 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | 54 | ||
55 | if (empty($ra_email)) { |
55 | if (empty($ra_email)) { |
56 | $out['title'] = 'Object roots without RA'; |
56 | $out['title'] = 'Object roots without RA'; |
57 | $out['text'] = '<p>Following object roots have an undefined Registration Authority:</p>'; |
57 | $out['text'] = '<p>Following object roots have an undefined Registration Authority:</p>'; |
58 | } else { |
58 | } else { |
59 | $res = OIDplus::db()->query("select ra_name from ".OIDPLUS_TABLENAME_PREFIX."ra where email = ?", array($ra_email)); |
59 | $res = OIDplus::db()->query("select ra_name from ###ra where email = ?", array($ra_email)); |
60 | $out['title'] = ''; |
60 | $out['title'] = ''; |
61 | if ($row = $res->fetch_array()) { |
61 | if ($row = $res->fetch_array()) { |
62 | $out['title'] = $row['ra_name']; |
62 | $out['title'] = $row['ra_name']; |
63 | } |
63 | } |
64 | if (empty($out['title'])) { |
64 | if (empty($out['title'])) { |
Line 74... | Line 74... | ||
74 | $icon = !is_null($ico) ? $ico : OIDplus::webpath(__DIR__).'treeicon_link.png'; |
74 | $icon = !is_null($ico) ? $ico : OIDplus::webpath(__DIR__).'treeicon_link.png'; |
75 | $out['text'] .= '<p><a '.OIDplus::gui()->link($loc_root->nodeId()).'><img src="'.$icon.'"> Jump to RA root '.$loc_root->objectTypeTitleShort().' '.$loc_root->crudShowId(OIDplusObject::parse($loc_root::root())).'</a></p>'; |
75 | $out['text'] .= '<p><a '.OIDplus::gui()->link($loc_root->nodeId()).'><img src="'.$icon.'"> Jump to RA root '.$loc_root->objectTypeTitleShort().' '.$loc_root->crudShowId(OIDplusObject::parse($loc_root::root())).'</a></p>'; |
76 | } |
76 | } |
77 | 77 | ||
78 | if (!empty($ra_email)) { |
78 | if (!empty($ra_email)) { |
79 | $res = OIDplus::db()->query("select * from ".OIDPLUS_TABLENAME_PREFIX."ra where email = ?", array($ra_email)); |
79 | $res = OIDplus::db()->query("select * from ###ra where email = ?", array($ra_email)); |
80 | if ($res->num_rows() > 0) { |
80 | if ($res->num_rows() > 0) { |
81 | if (OIDplus::authUtils()::isRALoggedIn($ra_email) || OIDplus::authUtils()::isAdminLoggedIn()) { |
81 | if (OIDplus::authUtils()::isRALoggedIn($ra_email) || OIDplus::authUtils()::isAdminLoggedIn()) { |
82 | if (class_exists('OIDplusPageRaEditContactData')) { |
82 | if (class_exists('OIDplusPageRaEditContactData')) { |
83 | $out['text'] .= '<p><a '.OIDplus::gui()->link('oidplus:edit_ra$'.$ra_email).'>Edit contact data</a></p>'; |
83 | $out['text'] .= '<p><a '.OIDplus::gui()->link('oidplus:edit_ra$'.$ra_email).'>Edit contact data</a></p>'; |
84 | } |
84 | } |
Line 96... | Line 96... | ||
96 | } |
96 | } |
97 | } |
97 | } |
98 | } |
98 | } |
99 | 99 | ||
100 | if (OIDplus::authUtils()::isRALoggedIn($ra_email) || OIDplus::authUtils()::isAdminLoggedIn()) { |
100 | if (OIDplus::authUtils()::isRALoggedIn($ra_email) || OIDplus::authUtils()::isAdminLoggedIn()) { |
101 | $res = OIDplus::db()->query("select lo.unix_ts, lo.addr, lo.event from ".OIDPLUS_TABLENAME_PREFIX."log lo ". |
101 | $res = OIDplus::db()->query("select lo.unix_ts, lo.addr, lo.event from ###log lo ". |
102 | "left join ".OIDPLUS_TABLENAME_PREFIX."log_user lu on lu.log_id = lo.id ". |
102 | "left join ###log_user lu on lu.log_id = lo.id ". |
103 | "where lu.username = ? " . |
103 | "where lu.username = ? " . |
104 | "order by lo.unix_ts desc", array($ra_email)); |
104 | "order by lo.unix_ts desc", array($ra_email)); |
105 | $out['text'] .= '<h2>Log messages for RA '.htmlentities($ra_email).'</h2>'; |
105 | $out['text'] .= '<h2>Log messages for RA '.htmlentities($ra_email).'</h2>'; |
106 | if ($res->num_rows() > 0) { |
106 | if ($res->num_rows() > 0) { |
107 | $out['text'] .= '<pre>'; |
107 | $out['text'] .= '<pre>'; |
Line 132... | Line 132... | ||
132 | if (empty($email)) { |
132 | if (empty($email)) { |
133 | $out = '<p>The superior RA did not define a RA for this OID.</p>'; |
133 | $out = '<p>The superior RA did not define a RA for this OID.</p>'; |
134 | return $out; |
134 | return $out; |
135 | } |
135 | } |
136 | 136 | ||
137 | $res = OIDplus::db()->query("select * from ".OIDPLUS_TABLENAME_PREFIX."ra where email = ?", array($email)); |
137 | $res = OIDplus::db()->query("select * from ###ra where email = ?", array($email)); |
138 | if ($res->num_rows() === 0) { |
138 | if ($res->num_rows() === 0) { |
139 | $out = '<p>The RA <a href="mailto:'.htmlentities($email).'">'.htmlentities($email).'</a> is not registered in the database.</p>'; |
139 | $out = '<p>The RA <a href="mailto:'.htmlentities($email).'">'.htmlentities($email).'</a> is not registered in the database.</p>'; |
140 | } else { |
140 | } else { |
141 | $row = $res->fetch_array(); |
141 | $row = $res->fetch_array(); |
142 | $out = '<b>'.htmlentities($row['ra_name']).'</b><br>'; // TODO: if you are not already at the page "oidplus:rainfo", then link to it now |
142 | $out = '<b>'.htmlentities($row['ra_name']).'</b><br>'; // TODO: if you are not already at the page "oidplus:rainfo", then link to it now |