var member={add:function(){ct.form("\u6dfb\u52a0\u7528\u6237","?app=member&controller=index&action=add",360,200,function(a){if(a.state){ct.ok("\u6dfb\u52a0\u6210\u529f");tableApp.load();return true}else ct.error(a.error)},function(){return true})},edit:function(a){ct.form("\u4fee\u6539\u7528\u6237\u8d44\u6599","?app=member&controller=index&action=edit&userid="+a,null,null,function(b){if(b.state){typeof tableApp!="undefined"&&tableApp.updateRow(a,b.data);return true}else ct.error(b.error)},function(){return true})},
password:function(a){ct.form("\u4fee\u6539\u7528\u6237\u5bc6\u7801","?app=member&controller=index&action=password&userid="+a,350,160,function(b){if(b.state){typeof tableApp!="undefined"&&tableApp.updateRow(a,b.data);return true}else ct.tips(b.error)},function(){return true})},avatar:function(a){ct.form("\u4fee\u6539\u7528\u6237\u5934\u50cf","?app=member&controller=index&action=avatar&userid="+a,300,250,function(b){if(b.state){ct.ok("\u4fee\u6539\u6210\u529f");return true}else ct.tips(b.error)},function(){return true})},
del:function(a){ct.confirm("\u786e\u5b9a\u5220\u9664\u8be5\u7528\u6237\u5417\uff1f",function(){$.post("?app=member&controller=index&action=delete",{userid:a},function(b){b.state?(ct.ok("\u5220\u9664\u5b8c\u6bd5"),tableApp.deleteRow(a)):ct.error(b.error)},"json")}).dialog("option","width",360)},view:function(a){window.location="?app=member&controller=index&action=profile&userid="+a},showGroup:function(a){$("#dropdown_"+a).click()},sendmail:function(a){ct.form("\u53d1\u9001\u90ae\u4ef6","?app=member&controller=index&action=sendmail&userid="+
a,380,360,function(b){if(b.state){ct.ok(b.info);return true}else return false})},remarks:function(){userid=tableApp.checkedIds();userid.length<1?ct.warn("\u8bf7\u9009\u62e9\u9700\u8981\u6dfb\u52a0\u5907\u6ce8\u7684\u7528\u6237\uff01"):ct.form("\u6dfb\u52a0\u5907\u6ce8","?app=member&controller=index&action=remarks&userid="+userid,400,200,function(){tableApp.load();return true},function(){return true})},mulDel:function(){var a;a=tableApp.checkedIds();a.length<1?ct.warn("\u8bf7\u9009\u62e9\u9700\u8981\u5220\u9664\u7684\u7528\u6237\uff01"):
ct.confirm('\u786e\u5b9a\u5220\u9664\u9009\u4e2d\u7684<b style="color:red">'+a.length+"</b>\u6761\u8bb0\u5f55\u5417\uff1f",function(){$.post("?app=member&controller=index&action=delete",{userid:a.join(",")},function(b){b.state?(ct.ok("\u5220\u9664\u5b8c\u6bd5"),tableApp.deleteRow(a)):ct.error(b.error)},"json")}).dialog("option","width",360)},changeGroup:function(){var a;a=tableApp.checkedIds();a.length<1?ct.warn("\u8bf7\u9009\u62e9\u9700\u8981\u7528\u6237\u7ec4\u4fee\u6539\u7684\u7528\u6237\uff01"):
ct.form("\u4fee\u6539\u7528\u6237\u7ec4","?app=member&controller=group&action=changegroup&userid="+a,360,200,function(b){if(b.state){ct.tips("\u4fee\u6539\u5b8c\u6bd5","success");for(var c=0,d;d=b.data[c++];tableApp.updateRow(d.userid,d));}else ct.error(b.error);return true},function(){return true})},search:function(){ct.ajax("\u7528\u6237\u641c\u7d22","?app=member&controller=index&action=search",350,200,null,function(a){tableApp.load(a.find("form"));return true})},audit:function(a){if(a===undefined){a=
tableApp.checkedIds();var b='\u786e\u5b9a\u5ba1\u6838\u901a\u8fc7\u9009\u4e2d\u7684<b style="color:red">'+a.length+"</b>\u6761\u8bb0\u5f55\u5417\uff1f";a=a.join(",")}else b="\u786e\u5b9a\u5ba1\u6838\u901a\u8fc7\u8be5\u7528\u6237\u5417\uff1f";a.length<1?ct.warn("\u8bf7\u9009\u62e9\u9700\u8981\u5ba1\u6838\u7684\u7528\u6237\uff01"):ct.confirm(b,function(){$.post("?app=member&controller=audit&action=audit",{userid:a},function(c){c.state?(ct.tips("\u5ba1\u6838\u5b8c\u6bd5","success"),tableApp.deleteRow(a)):
ct.error(c.error)},"json")}).dialog("option","width",360)},editColumn:function(a){ct.form("\u4fee\u6539\u4e13\u680f\u8d44\u6599","?app=space&controller=index&action=edit&userid="+a,500,300,function(b){if(b.state){ct.ok("\u64cd\u4f5c\u6210\u529f");return true}},function(){return true})}};
