0) { $row = $db->query("SELECT dump FROM eventlog WHERE rowid=$id")->fetch(); $dump = $row['dump']; if ($dump[0] == '<') { header("Content-type: text/xml"); echo "\n"; echo $dump; } else { header("Content-type: text/plain"); echo $dump; } exit; } if ($cmd == 'mo' && $id > 0) { $mo = $_GET["mo"]; if (!isset($mo)) exit; if ($mo != "devinfo" && $mo != "devdetail" && $mo != "pps") exit; $row = $db->query("SELECT $mo FROM users WHERE rowid=$id")->fetch(); header("Content-type: text/xml"); echo "\n"; echo $row[$mo]; exit; } if ($cmd == 'cert' && $id > 0) { $row = $db->query("SELECT cert_pem FROM users WHERE rowid=$id")->fetch(); header("Content-type: text/plain"); echo $row['cert_pem']; exit; } ?>
user | realm"; } echo " | time | address | sessionID | notes"; if ($dump > 0) echo " | dump"; echo "\n"; if (isset($_GET["limit"])) { $limit = $_GET["limit"]; if (!is_numeric($limit)) $limit = 20; } else $limit = 20; if ($id == 0) $res = $db->query("SELECT rowid,* FROM eventlog ORDER BY timestamp DESC LIMIT $limit"); else if (strlen($osu_user) > 0) $res = $db->query("SELECT rowid,* FROM eventlog WHERE (user='$user' OR user='$osu_user') AND realm='$realm' ORDER BY timestamp DESC LIMIT $limit"); else $res = $db->query("SELECT rowid,* FROM eventlog WHERE user='$user' AND realm='$realm' ORDER BY timestamp DESC LIMIT $limit"); foreach ($res as $row) { echo " |
---|---|---|---|---|---|---|
" . $row['user'] . "\n"; echo " | " . $row['realm'] . "\n"; } echo " | " . $row['timestamp'] . "\n"; echo " | " . $row['addr'] . "\n"; echo " | " . $row['sessionid'] . "\n"; echo " | " . $row['notes'] . "\n"; $d = $row['dump']; if (strlen($d) > 0) { echo "["; if ($d[0] == '<') echo "XML"; else echo "txt"; echo "]\n"; if ($dump > 0) echo " | " . htmlspecialchars($d) . "\n"; } } echo " |
User | Realm | Remediation | Policy | Account type | Phase 2 method(s) | DevId | MAC Address | T&C\n"; $res = $db->query('SELECT rowid,* FROM users WHERE (phase2=1 OR methods=\'TLS\') ORDER BY identity'); foreach ($res as $row) { echo " | |
---|---|---|---|---|---|---|---|---|---|
" . $row['identity'] . " "; echo " | " . $row['realm']; $rem = $row['remediation']; echo " | "; if ($rem == "") { echo "-"; } else if ($rem == "user") { echo "User"; } else if ($rem == "policy") { echo "Policy"; } else if ($rem == "free") { echo "Free"; } else if ($rem == "reenroll") { echo "Reenroll"; } else { echo "Machine"; } echo " | " . $row['policy']; if ($row['shared'] > 0) echo " | shared"; else echo " | default"; echo " | " . $row['methods'] . ""; echo " | "; $xml = xml_parser_create(); xml_parse_into_struct($xml, $row['devinfo'], $devinfo); foreach($devinfo as $k) { if ($k['tag'] == 'DEVID') { echo "" . $k['value'] . ""; break; } } echo " | " . $row['mac_addr'] . ""; echo " | " . $row['t_c_timestamp'] . ""; echo "\n"; } echo " |