<%+cbi/valueheader%>

<script type="text/javascript">//<![CDATA[
	function act_download_rule(btn,filename)
	{
		btn.disabled = true;
		btn.value    = '<%:正在下载规则...%> ';
		XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash","download_game_rule")%>',
			{
				filename: filename
			},
			function(x,status)
			{
				if ( x && x.status == 200 ) {
					if(status.game_rule_download_status=="0")
					{
						btn.value    = '<%:下载失败%>';
					}
					else
					{
						btn.value    = '<%:下载成功%>';
					}
				}
				else {
					btn.value    = '<%:下载超时%>';
				}
			}
		);
		btn.disabled = false;
		return false;
	}
//]]></script>


<input type="button" class="cbi-button cbi-input-reload" value="<%:点击更新规则%>" onclick="return act_download_rule(this,'<%=self:cfgvalue(section)%>')" />

<%+cbi/valuefooter%>