$(document).ready(function() {
$('#serverlist').dataTable( {
"bJQueryUI": true,
"bAutoWidth": true,
"bProcessing": true,
"bServerSide": true,
"bLengthChange": true,
"bPaginate": true,
"sAjaxSource": "async.php?s=banlist_get",
"fnRowCallback": function(nRow, aData, iDisplayIndex) {
if (aData[7] == "1")
{
$('td:eq(7)', nRow).html( '
Active' );
} else if (aData[7] == "2")
{
$('td:eq(7)', nRow).html( 'Expired' );
} else if (aData[7] == "3")
{
$('td:eq(7)', nRow).html( 'Canceled' );
} else
{
$('td:eq(7)', nRow).html( 'Unknown' );
}
if (aData[1] == "1")
{
$('td:eq(1)', nRow).html( 'Yes' );
} else
{
$('td:eq(1)', nRow).html( 'No' );
}
$('td:eq(1)', nRow).html("" + aData[1] + "");
$('td:eq(3)', nRow).html("" + aData[3] + "");
return nRow;
},
"fnDrawCallback": function() {
$('a[_ban_link=1]').click(function(){
bv_current_ban_id = $(this).attr('_ban_id');
$('div#banview_dialog').dialog('open');
});
},
"aaSorting": [[4, 'desc']],
"aoColumns": [
{ "sClass": "dt_center" },
null,
null,
null,
{ "sClass": "dt_server_times" },
null,
null,
null
]
} );
$('ul#icons li').hover(
function() { $(this).addClass('ui-state-hover'); },
function() { $(this).removeClass('ui-state-hover'); }
);
});