Rev 118 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 118 | Rev 150 | ||
---|---|---|---|
Line 52... | Line 52... | ||
52 | 52 | ||
53 | // TODO: I want that this content comes before the WHOIS modifyContent. |
53 | // TODO: I want that this content comes before the WHOIS modifyContent. |
54 | // The problem is that first all public and then all RA plugins get loaded, not mixed by their priority |
54 | // The problem is that first all public and then all RA plugins get loaded, not mixed by their priority |
55 | $res = OIDplus::db()->query("select lo.id, lo.unix_ts, lo.addr, lo.event from ".OIDPLUS_TABLENAME_PREFIX."log lo ". |
55 | $res = OIDplus::db()->query("select lo.id, lo.unix_ts, lo.addr, lo.event from ".OIDPLUS_TABLENAME_PREFIX."log lo ". |
56 | "left join ".OIDPLUS_TABLENAME_PREFIX."log_object lu on lu.log_id = lo.id ". |
56 | "left join ".OIDPLUS_TABLENAME_PREFIX."log_object lu on lu.log_id = lo.id ". |
57 | "where lu.object = '".OIDplus::db()->real_escape_string($id)."' " . |
57 | "where lu.object = ? " . |
58 | "order by lo.unix_ts desc"); |
58 | "order by lo.unix_ts desc", array($id)); |
59 | $text .= "<h2>Log messages for object ".htmlentities($id)."</h2>"; |
59 | $text .= "<h2>Log messages for object ".htmlentities($id)."</h2>"; |
60 | if (OIDplus::db()->num_rows($res) > 0) { |
60 | if (OIDplus::db()->num_rows($res) > 0) { |
61 | $text .= '<pre>'; |
61 | $text .= '<pre>'; |
62 | while ($row = OIDplus::db()->fetch_array($res)) { |
62 | while ($row = OIDplus::db()->fetch_array($res)) { |
63 | $users = array(); |
63 | $users = array(); |
64 | $res2 = OIDplus::db()->query("select user from ".OIDPLUS_TABLENAME_PREFIX."log_user ". |
64 | $res2 = OIDplus::db()->query("select user from ".OIDPLUS_TABLENAME_PREFIX."log_user ". |
65 | "where log_id = '".OIDplus::db()->real_escape_string($row['id'])."'"); |
65 | "where log_id = ?", array($row['id'])); |
66 | while ($row2 = OIDplus::db()->fetch_array($res2)) { |
66 | while ($row2 = OIDplus::db()->fetch_array($res2)) { |
67 | $users[] = $row2['user']; |
67 | $users[] = $row2['user']; |
68 | } |
68 | } |
69 | $users = count($users) > 0 ? ", ".implode('/',$users) : ''; |
69 | $users = count($users) > 0 ? ", ".implode('/',$users) : ''; |
70 | 70 |