var psn={add:function(){ct.form("\u6dfb\u52a0\u53d1\u5e03\u70b9","?app=system&controller=psn&action=add",350,200,function(a){if(a.state){tableApp.addRow(a.data);ct.ok("\u64cd\u4f5c\u6210\u529f");return true}else{ct.error(a.error);return false}})},edit:function(a){ct.form("\u4fee\u6539\u53d1\u5e03\u70b9","?app=system&controller=psn&action=edit&psnid="+a,350,200,function(b){if(b.state){tableApp.updateRow(a,b.data);ct.ok("\u64cd\u4f5c\u6210\u529f");return true}else{ct.error(b.error);return false}})},
del:function(a){ct.confirm('\u786e\u5b9a\u5220\u9664\u7f16\u53f7\u4e3a<b style="color:red">'+a+"</b>\u7684\u53d1\u5e03\u70b9\u5417\uff1f",function(){$.getJSON("?app=system&controller=psn&action=delete&psnid="+a,function(b){if(b.state){tableApp.load();ct.ok("\u5220\u9664\u6210\u529f\uff01")}else ct.error(b.error)})})},select:function(a,b){var e=$("#"+a),d=e.val();d="?app=system&controller=psn&action=select&type="+b+"&path="+encodeURIComponent(d);var g=ct.iframe(d,500,348,null,{ok:function(c){c=/({psn:\d+})(.*)/i.exec(c);
var f=[c[1]];(c=c[2].replace(/(%2f)|(\\+)/ig,"/").replace(/^\/+|\/+$/g,"").replace(/\/+/g,"/"))&&f.push(c);e.val(f.join("/"));g.dialog("close")},cancel:function(){g.dialog("close")}})}};
