Toggle navigation
<script>
var reportLevel = document.getElementById('reportLevel').value;
var setScoreLevel = document.getElementById('setScoreLevel').value;
var addUserLevel = document.getElementById('addUserLevel').value;
var enableUserLevel = document.getElementById('enableUserLevel').value;
var editUserLevel = document.getElementById('editUserLevel').value;
$(document).ready(function () {
var type = parseInt($('#type').val());
if (type == 1) {
AppendTable();
}
})
$('#txt_UserName').keypress(function (e) {
var key = e.which;
if (key == 13) {
e.preventDefault();
$.LoadingOverlay("show");
AppendTable();
$.LoadingOverlay("hide");
Bazuka01
My Score: 10000.00
2020-12-28 01:31:38
- Change Password
- User Management
- Search User
- Player Score Log
- Player Game Log
- Player Bonus Log
- Player LuckyWheelLog
- Player Login Log
- Operation Log
- Suggestion
- Set Agent Login IP
- Sign Out
if (isConfirm) {
document.getElementById('logoutForm').submit()
}
}); }) </script>
×
×
- Search User Back
Go
Username | Score | Name | Agent | Tel | Description | Operation |
---|
UID | Username | Online | PlayerStatus | Agent | Balance | Name | Tel | Description | Operation |
---|
Username | Balance | Name | User agent | Tel | Description | Operation |
---|
}
});
$('#Button_OK').click(function (e) {
e.preventDefault();
$.LoadingOverlay("show");
AppendTable();
$.LoadingOverlay("hide");
})
function AppendTable() {
var data = {
username: $('#txt_UserName').val()
};
$.ajax({
type: "POST",
url: "/Search/Search",
content: "application/json; charset=utf-8",
data: data,
success: function (d) {
$('#tblData_0').text("");
$('#tblData_1').text("");
$('#tblData_2').text("");
var jsondata = $.parseJSON(d);
if (jsondata == null) {
swal({ title: "no this account.", confirmButtonText: 'OK' });
return;
}
if (jsondata["error"] != "") {
swal({ title: jsondata["error"], confirmButtonText: 'OK' });
return;
}
if (jsondata["pathdata"] == null) {
swal({ title: "no this account.", confirmButtonText: 'OK' });
return;
}
if (jsondata["pathdata"] != null && jsondata["pathdata"].length > 0) {
for (var i = 0; i < jsondata["pathdata"].length; i++) {
var row = jsondata["pathdata"][i];
var tags = '';
tags += '<td id="op2_0" class="text-left">';
if (setScoreLevel == 1) {
tags += '<button type="button" class="btn btn-info btn-xs" title="" onfocus="this.blur();" onclick="document.location=' + "'/Agent/EditScore?id=" + row.id + "'" + '"' + '>set score</button>';
}
tags += '<button type="button" class="btn btn-info btn-xs" title="" onfocus="this.blur();" onclick="document.location=' + "'/ScoreLog/SearchScoreLog?sid=" + row.id + "'" + '"' + '">score log</button>';
if (editUserLevel == 1) {
tags += '<button type="button" class="btn btn-info btn-xs" title="" onfocus="this.blur();" onclick="document.location=' + "'/Agent/Edit?id=" + row.id + "'" + '">edit</button>';
}
if (reportLevel == 1) {
tags += '<button type="button" class="btn btn-info btn-xs" title="" onfocus="this.blur();" onclick="document.location=' + "'/Report/Search?sid=" + row.id + "'" + '">report</button>';
tags += '<button type="button" class="btn btn-info btn-xs" title="" onfocus="this.blur();" onclick="document.location=' + "'/Report/Chart?sid=" + row.id + "'" + '">chart</button>';
}
if (enableUserLevel) {
tags += '<button type="button" class="btn btn-info btn-xs" title="" onfocus="this.blur();" onclick="">Total</button>';
if (row.state == 1) {
tags += '<button type="button" name="agentable" title="' + row.username + '" rel="disable" player="' + row.id + '" class="btn btn-info btn-xs" onfocus="this.blur();" onclick="">disable</button>';
}
else {
tags += '<button type="button" name="agentable" title="' + row.username + '" rel="enable" player="' + row.id + '" class="btn btn-danger btn-xs" onfocus="this.blur();" onclick="">enable</button>';
}
}
tags += '</td>';
$("#tb_list_0").attr("style", "display: block");
$("#d_tip_0").text("Higher Level AgentList");
var tblContent = '<tr class="tr_h"><td><a href="/Manage/Management?parentId=' + row.id + '">' + row.username + "</td><td>" + row.score.toFixed(2) + "</td><td>" + row.name + "</td><td>" + row.agent + "</td><td>" + row.tel + "</td><td>" + row.description + "</td>" + tags + "</tr>";
$('#tblData_0').append(tblContent.replace(/null/gi, "").replace(/undefined/gi, ""));
}
}
var row = jsondata["data"];
if (jsondata["type"] == 1) {
var tags = '<td id="op1_0" class="text-left">';
if(setScoreLevel == 1){
tags += '<button class="btn btn-info btn-xs" onfocus="this.blur();" onclick="document.location=' + "'/Player/EditScore?id=" + row.id + "'" + '">set score</button>';
}
tags += '<button class="btn btn-info btn-xs" onfocus="this.blur();" onclick="document.location=' + "'/ScoreLog/SearchScoreLog?id=" + row.id + "'" + '">score log</button>';
if (editUserLevel == 1) {
tags += '<button class="btn btn-info btn-xs" onfocus="this.blur();" onclick="document.location=' + "'/Player/Edit?id=" + row.id + "'" + '">edit</button>';
}
if (reportLevel == 1) {
tags += '<button class="btn btn-info btn-xs" onfocus="this.blur();" onclick="document.location=' + "'/Report/Search?id=" + row.id + "'" + '">report</button>';
}
tags += '<button class="btn btn-info btn-xs" onfocus="this.blur();" onclick="document.location=' + "'/GameLog/SearchGameLog?id=" + row.id + "'" + '">game log</button>';
if (enableUserLevel == 1) {
tags += '<button class="btn btn-info btn-xs" name="forcequite" title="' + row.username + '" player="' + row.id + '" onfocus="this.blur();" onclick="">quit game</button>';
if (row.state == 1) {
tags += '<button type="button" name="able" title="' + row.username + '" rel="disable" player="' + row.id + '" class="btn btn-info btn-xs" onfocus="this.blur();" onclick="">disable</button>';
}
else {
tags += '<button type="button" name="able" title="' + row.username + '" rel ="enable" player="' + row.id + '" class="btn btn-danger btn-xs" onfocus="this.blur();" onclick="">enable</button>';
}
}
tags += '<button class="btn btn-info btn-xs" onfocus="this.blur();" onclick="document.location=' + "'/BonusLog/SearchBonusLog?id=" + row.id + "'" + '">bonus log</button>';
tags += '</td>';
$("#tb_list_1").attr("style", "display: block");
$("#tb_list_2").attr("style", "display: none");
var onlineString = '<span class="badge bg-gray">Disconnected</span>';
if (row.isonline == 1)
onlineString = '<span class="badge bg-blue-gradient">In Lobby</span>';
else if (row.isonline == 2)
onlineString = '<span class="badge bg-red">Playing Game</span>';
var tblContent = '<tr class="tr_h"><td><b>' + row.username + "</b></td><td>" + row.online + "</td><td>" + onlineString + "</td><td>" + row.agent + "</td><td>" + row.balance.toFixed(2) + "</td><td>" + row.name + "</td><td>" + row.tel + "</td><td>" + row.description + "</td>" + tags + "</tr>";
$('#tblData_1').append(tblContent.replace(/null/gi, ""));
}
else {
var tags = '';
if (setScoreLevel == 1) {
tags += '<td id="op2_0" class="text-left"><button type="button" class="btn btn-info btn-xs" title="" onfocus="this.blur();" onclick="document.location=' + "'/Agent/EditScore?id=" + row.id + "'" + '"' + '>set score</button>';
}
tags += '<button type="button" class="btn btn-info btn-xs" title="" onfocus="this.blur();" onclick="document.location=' + "'/ScoreLog/SearchScoreLog?sid=" + row.id + "'" + '"' + '">score log</button>';
if (editUserLevel == 1) {
tags += '<button type="button" class="btn btn-info btn-xs" title="" onfocus="this.blur();" onclick="document.location=' + "'/Agent/Edit?id=" + row.id + "'" + '">edit</button>';
}
if (reportLevel == 1) {
tags += '<button type="button" class="btn btn-info btn-xs" title="" onfocus="this.blur();" onclick="document.location=' + "'/Report/Search?sid=" + row.id + "'" + '">report</button>';
tags += '<button type="button" class="btn btn-info btn-xs" title="" onfocus="this.blur();" onclick="document.location=' + "'/Report/Chart?sid=" + row.id + "'" + '">chart</button>';
}
if (enableUserLevel == 1) {
tags += '<button type="button" name="total" class="btn btn-info btn-xs" title="" onfocus="this.blur();" onclick="">total</button>';
if (row.state == 1) {
tags += '<button type="button" name="agentable" title="' + row.username + '" rel="disable" player="' + row.id + '" class="btn btn-info btn-xs" onfocus="this.blur();" onclick="">disable</button>';
}
else {
tags += '<button type="button" name="agentable" title="' + row.username + '" rel="enable" player="' + row.id + '" class="btn btn-danger btn-xs" onfocus="this.blur();" onclick="">enable</button>';
}
}
tags += '</td>';
$("#tb_list_1").attr("style", "display: none");
$("#tb_list_2").attr("style", "display: block");
$("#d_tip_1").text(row.username + " " + 'agent list');
var tblContent = '<tr class="tr_h"><td><a href="/Manage/Management?parentId=' + row.id + '"><b>' + row.username + "</b></a></td><td>" + row.score.toFixed(2) + "</td><td>" + row.name + "</td><td>" + row.agent + "</td><td>" + row.tel + "</td><td>" + row.description + "</td>" + tags + "</tr>";
$('#tblData_2').append(tblContent.replace(/null/gi, "").replace(/undefined/gi, ""));
}
$.LoadingOverlay("hide");
},
error: function (xhr) {
if (xhr.status === 200K) {
window.location.href = "//Logi";
return;
}
},
});
}
$('body').on("click", "button[name='able']", function () {
var username = $(this).attr("title");
var state = $(this).attr("rel");
var alertstr = state + " " + username;
var data = { id: parseInt($(this).attr("player")) };
swal({
title: "Are you sure?",
text: alertstr,
type: "info",
showCancelButton: true,
closeOnConfirm: false,
showLoaderOnConfirm: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel'
}, function () {
setTimeout(function () {
$.ajax({
type: "POST",
url: "/Player/State",
content: "application/json; charset=utf-8",
data: data,
success: function (d) {
document.location.reload();
},
error: function (xhr) {
if (xhr.status === 401) {
window.location.href = "/Account/Login";
return;
}
},
});
swal({ title: "successfull operation.", confirmButtonText: 'OK' });
}, 1000);
});
});
$('body').on("click", "button[name='agentable']", function () {
var username = $(this).attr("title");
var state = $(this).attr("rel");
var alertstr = state + " " + username;
var data = { id: parseInt($(this).attr("player")) };
swal({
title: "Are you sure?",
text: alertstr,
type: "info",
showCancelButton: true,
closeOnConfirm: false,
showLoaderOnConfirm: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel'
}, function () {
setTimeout(function () {
$.ajax({
type: "POST",
url: "/Agent/State",
content: "application/json; charset=utf-8",
data: data,
success: function (d) {
document.location.reload();
},
error: function (xhr) {
if (xhr.status === 401) {
window.location.href = "/Account/Login";
return;
}
},
});
swal({ title: "successfull operation.", confirmButtonText: 'OK' });
}, 1000);
});
});
$('body').on("click", "button[name='forcequite']", function () {
var username = $(this).attr("title");
var alertstr = "Force quite player " + username + "?";
var data = { id: parseInt($(this).attr("player")) };
var target = $(this);
swal({
title: "Are you sure?",
text: alertstr,
type: "warning",
showCancelButton: true,
closeOnConfirm: false,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel'
}, function () {
$.ajax({
type: "POST",
url: "/Player/ForceQuite",
content: "application/json; charset=utf-8",
data: data,
success: function (d) {
if (d == 1) {
swal({ title: "successfull operation.", confirmButtonText: "OK" });
}
else if (d == -1) {
swal({ title: "Player is not online now", confirmButtonText: "OK" });
}
else {
swal({ title: "failed operation.", confirmButtonText: "OK" });
}
},
error: function (xhr) {
if (xhr.status === 401) {
window.location.href = "/Account/Login";
return;
}
},
});
});
});
</script>