} else { $reason = 'Not set'; } // Staff $issued_by = htmlspecialchars($infraction[0]->kick_staff); // Revoked? $revoked = 'n/a'; } } } } else { if ($infractions_plugin == "bm") { // Ban Management $infraction = $infractions->bm_getInfraction($_GET["type"], $_GET["id"]); // First, get the username $mcname = $infractions->bm_getUsernameFromID($infraction[0]->player_id); // Date of infraction $start_date = date("jS M Y", $infraction[0]->created); // Reason if ($infraction[0]->reason !== null) { $reason = htmlspecialchars($infraction[0]->reason); } else { $reason = "Not set"; } $revoked = "No"; $end_date = "n/a"; // Staff if (isset($infraction[0]->pastActor_id)) { $issued_by = htmlspecialchars($infractions->bm_getUsernameFromID($infraction[0]->pastActor_id)); } else { $issued_by = htmlspecialchars($infractions->bm_getUsernameFromID($infraction[0]->actor_id));
if ($inf_plugin == "mb") { $exploded = explode('.', $infraction["id"]); $mcname = $exploded[0]; $time = $exploded[1]; } else { if ($inf_plugin == "lb") { $mcname = $infraction["username"]; } else { $infractions_query = $queries->getWhere('users', array('uuid', '=', str_replace('-', '', $infraction["uuid"]))); if (empty($infractions_query)) { if ($inf_plugin == 'bat') { $mcname = $infractions->bat_getUsernameFromUUID($infraction['uuid']); } if ($inf_plugin != 'bat' || !count($mcname)) { if ($inf_plugin == 'bm') { $mcname = $infractions->bm_getUsernameFromID(pack("H*", str_replace('-', '', $infraction['uuid']))); } $infractions_query = $queries->getWhere('uuid_cache', array('uuid', '=', str_replace('-', '', $infraction["uuid"]))); if (empty($infractions_query)) { if (count($mcname)) { try { $queries->create("uuid_cache", array('mcname' => $mcname, 'uuid' => $infraction['uuid'])); } catch (Exception $e) { die($e->getMessage()); } } $profile = ProfileUtils::getProfile(str_replace('-', '', $infraction["uuid"])); if (empty($profile)) { echo 'Could not find that player'; die; } else {
$expires = '<span class="label label-success" rel="tooltip" data-placement="top" title="' . date('jS M Y, H:i', strtotime($infraction[0]->mute_unmutedate)) . '">' . str_replace('{x}', htmlspecialchars($infraction[0]->mute_unmutestaff), $infractions_language['revoked_by']) . '</span>'; } else { if ($infraction[0]->mute_end) { $expires = '<span class="label label-danger" rel="tooltip" data-placement="top" title="' . date('jS M Y, H:i', strtotime($infraction[0]->mute_end)) . '">' . $infractions_language['active'] . '</span>'; } else { $expires = '<span class="label label-danger">' . $infractions_language['permanent'] . '</span>'; } } } break; } break; case 'bm': $infraction = $infractions->bm_getInfraction($_GET["type"], $_GET["id"], isset($_GET['past']) ? true : false); // Get username $username = $infractions->bm_getUsernameFromID($infraction[0]->player_id); $username = htmlspecialchars($username); // Get date of infraction if (!isset($_GET['past'])) { $created = '<span rel="tooltip" data-placement="top" title="' . date('jS M Y, H:i', $infraction[0]->created) . '">' . $timeago->inWords(date('d M Y, H:i', $infraction[0]->created), $time_language) . '</span>'; } else { $created = '<span rel="tooltip" data-placement="top" title="' . date('jS M Y, H:i', $infraction[0]->pastCreated) . '">' . $timeago->inWords(date('d M Y, H:i', $infraction[0]->pastCreated), $time_language) . '</span>'; } // Reason if ($infraction[0]->reason) { $reason = htmlspecialchars($infraction[0]->reason); } else { $reason = $infractions_language['no_reason']; } // Expires/expired? switch ($_GET['type']) {