<script type="text/javascript">//<![CDATA[
    XHR.poll(5, '<%=url("admin/services/xunyou/status")%>', null,
        function (x, st) {
            var tb = document.getElementById('xunyou_status');
            if (st && tb) {
                if(st.running){
                    const htmlString = '<br/><em><%:The xunyou service is running.%></em>'
                                + "<br/><br/><a class=\"btn cbi-button cbi-button-apply\" target=\"_blank\" "
                                + "href=\"https://pay.xunyou.com/login/router.html?partner=koolshare&salesid=336411145&eid=10699&regfrom=router_web&lanmac="+st.lanmac+"&version=2.0.0.3\" "
                                + "><%:open xunyou%></s>";
                    tb.innerHTML = htmlString;
                }
                else{
                    tb.innerHTML = '<br/><em><%:The xunyou service is not running.%></em>';
                }
            }
        }
    );
//]]></script>

<fieldset class="cbi-section">
    <!-- <legend>
        <%:xunyou Status%>
    </legend> -->
    <p id="xunyou_status">
        <em>
            <%:Collecting data...%>
        </em>
    </p>
</fieldset>