173 lines
4.3 KiB
JavaScript
173 lines
4.3 KiB
JavaScript
|
|
function dh(ty){
|
|||
|
|
if(!ty){
|
|||
|
|
ty = 'main';
|
|||
|
|
}
|
|||
|
|
$(".tab .xfl").removeClass('tab_dhs');
|
|||
|
|
$("#tab_"+ty).addClass('tab_dhs');
|
|||
|
|
loadnr(ty);
|
|||
|
|
}
|
|||
|
|
function loadnr(ty,idd,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('/gong/index.php', {
|
|||
|
|
ty : ty,
|
|||
|
|
idd : idd,
|
|||
|
|
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,ida){
|
|||
|
|
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();
|
|||
|
|
card = $("#ccard").val();
|
|||
|
|
if(!code || !ntitle || !card){
|
|||
|
|
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;
|
|||
|
|
}
|
|||
|
|
if(card < 80){
|
|||
|
|
layer.closeAll();
|
|||
|
|
layer.open({content: '<27><><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>80<38>ŷ<EFBFBD><C5B7><EFBFBD><EFBFBD><EFBFBD>',style: 'width:180px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}else if(ty == 'out'){
|
|||
|
|
card = ida;
|
|||
|
|
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('/gong/cl.php', {
|
|||
|
|
ty : ty,
|
|||
|
|
gameid : gid,
|
|||
|
|
code : code,
|
|||
|
|
card : card,
|
|||
|
|
ntitle : ntitle,
|
|||
|
|
nnr : nnr,
|
|||
|
|
idd : idd
|
|||
|
|
}, function(data, status) {
|
|||
|
|
layer.closeAll();
|
|||
|
|
if(data == 'ok'){
|
|||
|
|
if(ty == 'out' && titnr){
|
|||
|
|
loadnr('main',ida);
|
|||
|
|
}else{
|
|||
|
|
loadnr('main');
|
|||
|
|
}
|
|||
|
|
}else{
|
|||
|
|
layer.open({content: data,style: 'width:220px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}});
|
|||
|
|
}else{
|
|||
|
|
layer.open({type:2,shade:false});
|
|||
|
|
$.get('/gong/cl.php', {
|
|||
|
|
ty : ty,
|
|||
|
|
gameid : gid,
|
|||
|
|
code : code,
|
|||
|
|
card : card,
|
|||
|
|
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>'});
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//<2F>Ĺ<DEB8><C4B9><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
|
function unionEdit(ty){
|
|||
|
|
var tit ="";
|
|||
|
|
if(ty == 'join'){
|
|||
|
|
var gids = $("#gids").val();
|
|||
|
|
var unionid = $("#unionid").val();
|
|||
|
|
var opens = $('input:radio[name=open]:checked').val();
|
|||
|
|
if(!gids){
|
|||
|
|
layer.open({content:"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϷID",style: 'width:220px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
var postdara = {ty:'join',gameid:gid,gid:gids,opens:opens};
|
|||
|
|
}else if(ty == 'fang'){
|
|||
|
|
var fang = $("#fang").val();
|
|||
|
|
if(fang < 10){
|
|||
|
|
layer.open({content:"ת<>뷿<EFBFBD><EBB7BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>10<31><30><EFBFBD><EFBFBD>",style: 'width:220px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
tit = "ת<><D7AA>"+fang+"<22>ŷ<EFBFBD><C5B7><EFBFBD><br>һ<><D2BB>ת<EFBFBD>벻<EFBFBD><EBB2BB>ת<EFBFBD><D7AA>";
|
|||
|
|
var postdara = {ty:'zhuan',gameid:gid,fang:fang};
|
|||
|
|
}else{
|
|||
|
|
var code = $("#ccode").val();
|
|||
|
|
var names = $("#cname").val();
|
|||
|
|
if(!names){
|
|||
|
|
layer.open({content:"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",style: 'width:220px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
var nr = $("#cgg").val();
|
|||
|
|
var postdara = {ty:'edit',gameid:gid,code:code,names:names,nr:nr};
|
|||
|
|
}
|
|||
|
|
if(tit){
|
|||
|
|
layer.open({content: tit,style: 'width:200px;',btn: ['ȷ<><C8B7>', 'ȡ<><C8A1>'],yes: function(index){
|
|||
|
|
layer.open({type:2,shade:false});
|
|||
|
|
$.get('/gong/cl.php', postdara, function(data, status) {
|
|||
|
|
layer.closeAll();
|
|||
|
|
if(data == 'ok'){
|
|||
|
|
loadnr('adm');
|
|||
|
|
}else{
|
|||
|
|
layer.open({content: data,style: 'width:220px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}});
|
|||
|
|
}else{
|
|||
|
|
layer.open({type:2,shade:false});
|
|||
|
|
$.get('/gong/cl.php', postdara, function(data, status) {
|
|||
|
|
layer.closeAll();
|
|||
|
|
if(data == 'ok'){
|
|||
|
|
layer.open({content: "<22><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD>",style: 'width:220px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>',yes: function(index){
|
|||
|
|
if(ty == 'join'){
|
|||
|
|
dh('main');
|
|||
|
|
loadnr('main',unionid);
|
|||
|
|
}else{
|
|||
|
|
loadnr('adm');
|
|||
|
|
}
|
|||
|
|
}});
|
|||
|
|
}else{
|
|||
|
|
layer.open({content: data,style: 'width:220px;',btn: '<27><>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>'});
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|