<%+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 if (status.game_rule_download_status=="1")
					{
						btn.value = '<%:下载成功%>';
					}
					else if (status.game_rule_download_status=="2")
					{
						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%>