📄 rankadmin.js
字号:
// 创建ajax引擎
function createAjaxObj(){
var httprequest=false
if (window.XMLHttpRequest)
{ // if Mozilla, Safari etc
httprequest=new XMLHttpRequest()
if (httprequest.overrideMimeType)
httprequest.overrideMimeType('text/xml')
}
else if (window.ActiveXObject)
{ // if IE
try {
httprequest=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e){
try{
httprequest=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){}
}
}
return httprequest
}
//检验用户名是否存在。
function getMoney(rankID){
http_request = false;
var http_request = createAjaxObj();
http_request.open('Get','rankAdmin.do?oprate=getMoney&rankID='+rankID+'&random='+new Date(),false);
http_request.send(null);
if(http_request.responseText=='ok'){
alert("该会员的排行奖励已成功领取。");
window.location.reload();
}else if(http_request.responseText=='fail'){
alert("存入数据库的过程中发生错误。");
window.location.reload();
}
}
//改变用户的状态为逾期未领。
function changeState(){
http_request = false;
var strDate=window.prompt("请输入要置为逾期未领状态的年月,\ \n设置之后在该月未领取相应奖金的人的金\ \n额状态都将修改为逾期未领:格式:yyyymm","200902");
if(strDate.length==6&&!isNaN(strDate)){
var http_request = createAjaxObj();
http_request.open('Get','rankAdmin.do?oprate=changeState&strDate='+strDate+'&random='+new Date(),false);
http_request.send(null);
if(http_request.responseText=='ok'){
alert("状态修改成功。");
window.location.reload();
}else if(http_request.responseText=='fail'){
alert("状态修改失败。");
window.location.reload();
}
}else{
alert("对不起你输入的年月不正确!\ \n请重新输入,格式为yyyymm(年4位月2位)");
changeState();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -