Params: $type (string), either ban, kick or mute; $id (int), ID of infraction
public bm_getInfraction ( $type, $id, $past = false ) |
} else { if ($infraction[0]->mute_unmutedate) { $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']; }
if ($infraction[0]->kick_reason !== null) { $reason = htmlspecialchars($infraction[0]->kick_reason); } 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));