97 lines
2.2 KiB
JavaScript
97 lines
2.2 KiB
JavaScript
|
|
function dh(ty){
|
|||
|
|
if(!ty){
|
|||
|
|
ty = 'main';
|
|||
|
|
}
|
|||
|
|
$(".tab .xfl").removeClass('tab_dhs');
|
|||
|
|
$("#tab_"+ty).addClass('tab_dhs');
|
|||
|
|
loadnr(ty);
|
|||
|
|
}
|
|||
|
|
function loadnr(ty,sort){
|
|||
|
|
var w_width =$(window).width();
|
|||
|
|
var w_height =$(window).height();
|
|||
|
|
var left_height = w_height-25;
|
|||
|
|
var right_width = w_width-120;
|
|||
|
|
layer.open({type:2,shade:false});
|
|||
|
|
$.get('/gh/index.php', {
|
|||
|
|
ty : ty,
|
|||
|
|
sort : sort,
|
|||
|
|
gameid : gid
|
|||
|
|
}, function(data, status) {
|
|||
|
|
$("#content").html(data);
|
|||
|
|
$(".pf-left").height(left_height);
|
|||
|
|
$(".gdinfo").width(right_width);
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
loadnr('main');
|
|||
|
|
function union(ty,idd,titnr){
|
|||
|
|
var code = 0;
|
|||
|
|
var ntitle = "";
|
|||
|
|
var nnr = "";
|
|||
|
|
if(ty == 'join'){
|
|||
|
|
code = $("#jcode").val();
|
|||
|
|
if(!code){
|
|||
|
|
layer.closeAll();
|
|||
|
|
layer.open({content: '<27><><EFBFBD><EFBFBD><EFBFBD>빫<EFBFBD><EBB9AB><EFBFBD>룡',style: 'width:180px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}else if(ty == 'add'){
|
|||
|
|
code = $("#ccode").val();
|
|||
|
|
ntitle = $("#cname").val();
|
|||
|
|
if(!code || !ntitle){
|
|||
|
|
layer.closeAll();
|
|||
|
|
layer.open({content: '<27><><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',style: 'width:180px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
nnr = $("#cgg").val();
|
|||
|
|
}else if(ty == 'out'){
|
|||
|
|
var tit = "<22>Ƿ<EFBFBD><C7B7>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>";
|
|||
|
|
}else if(ty == 'dels'){
|
|||
|
|
var unren = $("#un-ren").val();
|
|||
|
|
if(unren > 1){
|
|||
|
|
layer.open({content: '<27><><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD>Ա<EFBFBD>߳<EFBFBD><DFB3><EFBFBD><EFBFBD><EFBFBD><br><3E>ſ<EFBFBD><C5BF>Խ<EFBFBD>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD>',style: 'width:220px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
return false;
|
|||
|
|
}else{
|
|||
|
|
var tit = "<22>Ƿ<EFBFBD><C7B7><EFBFBD>ɢ<EFBFBD><C9A2><EFBFBD>";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if(titnr){
|
|||
|
|
var tit = titnr;
|
|||
|
|
}
|
|||
|
|
if(tit){
|
|||
|
|
layer.open({content: tit,style: 'width:200px;',btn: ['ȷ<><C8B7>', 'ȡ<><C8A1>'],yes: function(index){
|
|||
|
|
layer.open({type:2,shade:false});
|
|||
|
|
$.get('/gh/cl.php', {
|
|||
|
|
ty : ty,
|
|||
|
|
gameid : gid,
|
|||
|
|
code : code,
|
|||
|
|
ntitle : ntitle,
|
|||
|
|
nnr : nnr,
|
|||
|
|
idd : idd
|
|||
|
|
}, function(data, status) {
|
|||
|
|
layer.closeAll();
|
|||
|
|
if(data == 'ok'){
|
|||
|
|
loadnr('main');
|
|||
|
|
}else{
|
|||
|
|
layer.open({content: data,style: 'width:220px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}});
|
|||
|
|
}else{
|
|||
|
|
layer.open({type:2,shade:false});
|
|||
|
|
$.get('/gh/cl.php', {
|
|||
|
|
ty : ty,
|
|||
|
|
gameid : gid,
|
|||
|
|
code : code,
|
|||
|
|
ntitle : ntitle,
|
|||
|
|
nnr : nnr,
|
|||
|
|
idd : idd
|
|||
|
|
}, function(data, status) {
|
|||
|
|
layer.closeAll();
|
|||
|
|
if(data == 'ok'){
|
|||
|
|
loadnr('main');
|
|||
|
|
}else{
|
|||
|
|
layer.open({content: data,style: 'width:220px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
}
|