var irank = 0;
//總排名分頁顯示
function fenye() {
var html = '';
for (var i = 0; i < 10; i++) {
if (irank < RecordData.length) {
if (RecordData[irank].avatar == "" || RecordData[irank].avatar == null || RecordData[irank].avatar == undefined) {
RecordData[irank].avatar = 'img/rank/malathion.jpg';
}
html += '<li>';
html += '<span class="mc">' + (irank + 1) + '</span>';
html += '<span class="avatar"><img src="' + RecordData[irank].avatar + '" ></span>';
html += '<span class="name">' + RecordData[irank].nickname + '</span>';
html += '<span class="cj">' + GetDateTime(RecordData[irank].GameTime) + '</span>';
html += '</li>';
}
irank++;
}
$(".rank").append(html);
}
//遊戲總排名
function GetData_RecordRank() {
$.ajax({
type: 'post',
url: 'Malathion.ashx?Type=GetData_RecordRank',
dataType: 'json',
async: false,
success: function (result) {
if (result != null) {
var rank = result.Rows;
if (rank.length > 0) {
RecordData = result.Rows;
//alert("one");
fenye();
}
}
}
});
}