IW4M-Admin/Admin/webfront/admins.html

71 lines
2.0 KiB
HTML
Raw Normal View History

<script>
function printPlayer(player, i) {
var playerText = '<div class="admin-name"><a href="/players?id=' + player.ClientId + '">' + player.Name + "</a></div>";
switch (player.Level) {
case 6:
$('#owner-privilege .clients').append(playerText);
break;
case 5:
$('#senioradmin-privilege .clients').append(playerText);
break;
case 4:
$('#admin-privilege .clients').append(playerText);
break;
case 3:
$('#mod-privilege .clients').append(playerText);
break;
case 2:
$('#trusted-privilege .clients').append(playerText);
break;
}
}
function getAdmins() {
$.getJSON('/GetAdmins', function (result) {
$.each(result, function (i, player) {
printPlayer(player, i);
});
});
}
$(document).ready(function () {
getAdmins();
});
</script>
<div class="privilege" id="owner-privilege">
<div class="contentHeader table">
<div class="contentColumn tableCell">Owner</div>
</div>
<div class="clients"></div>
</div>
<div class="privilege" id="senioradmin-privilege">
<div class="contentHeader table">
<div class="contentColumn tableCell">Senior Administrator</div>
</div>
<div class="clients"></div>
</div>
<div class="privilege" id="admin-privilege">
<div class="contentHeader table">
<div class="contentColumn tableCell">Administrator</div>
</div>
<div class="clients"></div>
</div>
<div class="privilege" id="mod-privilege">
<div class="contentHeader table">
<div class="contentColumn tableCell">Moderator</div>
</div>
<div class="clients"></div>
</div>
<div class="privilege" id="trusted-privilege">
<div class="contentHeader table">
<div class="contentColumn tableCell">Trusted</div>
</div>
<div class="clients"></div>
</div>
<hr />