function GetRule(d,c){if(em_usrrank<5){alert("您的用户级别尚不足以使用该功能，请联系官网客服提升级别。");
return;
}if(!c){c="CO";
}var a="/mr_EximportRule.php?e1434c60d=1&gettype=post&e52731e59="+c+"&eb5707348=GetRule";
var b=makeformhtml(0,a);
$.poping({width:"800px",height:"400px"},{},"导入配置",b);
}function makeformhtml(f,c,a){if(!a){a="";
}var d="",b="",e="";
if(f==0){actionurl=c;
d="请在下面输入你要导入的配置文本";
b='上传文件：<input type="file" name="ea40420c8">';
}else{actionurl="";
d="以下是检索到的节点配置文本，请复制保存以供下次使用。";
b="配置文本附件：<a href='"+c+'\'><img src="images/gtk-edit.png" alt="配置文本附件" title="配置文本附件"></a>';
}e+='<div id="div_dialogcontent">	<form id="eminerform" name="eminerform" method="post" action="'+actionurl+'" enctype="multipart/form-data" target="ajaxUpload">	<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DADADA">	<tbody><tr bgcolor="#DADADA">	<td colspan="2" background="images/wbg.gif" height="20"><font color="#666600"><b>'+d+'：</b></font></td>	</tr>	<tr bgcolor="#FFFFFF">	<td colspan="2" height="100">  <textarea name="notes" style="width:99%;height:200px">'+a+"</textarea> </td>	</tr>";
if(f==0){e+='<tr>	<td colspan="2" bgcolor="#F9FCEF">	<table width="270" border="0" cellpadding="0" cellspacing="0">	<tbody><tr align="center" height="22">	<td width="90"><input name="imageField1" type="image" class="np" src="images/button_ok.gif" width="60" height="20" border="0" onclick="return Getruleconfirm(this)"></td>	<td width="90"><a href="#"><img class="np" src="images/button_reset.gif" width="60" height="20" border="0" onclick="this.form.reset();return false;"></a></td>	<td><a href="#"><img src="images/button_back.gif" width="60" height="20" border="0" onclick="$.unblockui();"></a></td>	</tr>	</tbody></table>	</td></tr>';
}e+='</tbody></table></form>	<iframe id="ajaxUpload" name="ajaxUpload" style="width:0px;height:0px;display:none"></iframe></div>';
return e;
}function Getruleconfirm(a){var b=a.form;
b.notes.value=b.notes.value.trim();
if(!b.notes.value){alert("配置文本框不能为空。");
return false;
}return true;
}function ActRuleCallback(d,a,f,e,c){if(a=="success"){if(d==0){alert(f);
window.location.reload();
}else{var b=makeformhtml(1,c,e);
$("#popmaininfo").html(b);
alert(f);
}}else{alert(f);
if(d==1){$.unblockui();
}}}function ExportRule(e,d){if(em_usrrank<5){alert("您的用户级别尚不足以使用该功能，请联系官网客服提升级别。");
return;
}if(!e||e==0){e=$("input.np:radio:checked").val();
}if(!e||e==0){alert("请选择一个节点！");
return;
}if(!d){d="CO";
}var c=$("tr[index='"+e+"'] td.ed946d2b0").text();
var b="/mr_EximportRule.php?e1434c60d=1&gettype=post&e52731e59="+d+"&eb5707348=ExportRule&id="+e;
var a=(new Date()).getTime();
$.poping({width:"800px",height:"400px"},{},"导出配置--"+c,'<div id="div_dialogcontent"></div>');
$.ajax({type:"POST",url:b,dataType:"json",cache:false,success:function(f){if(f.status=="success"||f.status=="1"){$("#popmaininfo").html(makeformhtml(1,f.downurl,f.data));
}else{if(f.info){$("#popmaininfo").html(f.info);
}else{$("#popmaininfo").html("未成功导出配置数据，请检查配置");
}setTimeout(function(){$.unblockui();
},2000);
}},error:function(){}});
}