<div class="col-sm-5 well">
</div>
<div class="col-sm-18">
    <div class="panel panel-default">
        <div class="panel-heading">抓取Bokun数据</div>
        <div class="panel-body">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table table-striped">
                <tr>
                    <td width="120">&nbsp;</td>
                    <td width="300">
                    <div class="progress">
                        <div id="pros" class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
                        </div>
                    </div>

                        <div class="form_submit">
                            <button type="button" class="btn btn-success" id="trigger_ajax">test</button>
                        </div>
                    </td>
                    <td>&nbsp;
                        <P>由于涉及HT，所以更新主程序需要运行在本地：http://202.103.68.144:65008/info.php/thirdparty/tpmanage/getbokun/，网前信息平台的有另外单独的更新程序。</P>
                        <p>第一步，可以先单独抓取更新所有的城市信息，这样可以先保证城市信息的完整。</p>
                        <p><a href="https://ct.mycht.cn/info.php/thirdparty/tpmanage/webgetbokun/checkAllCity/">点击更新所有城市信息</a></p>
                        <p>第二步，导入网前信息平台的bokun数据</p>
                        <P><a href="https://ct.mycht.cn/info.php/thirdparty/tpmanage/webgetbokun/onlyUpdateInfo/">点击导入网前信息平台数据</a></P>
                        <p>第三步，导入本地翰特bokun数据</p>
                        <P><a href="/info.php/thirdparty/tpmanage/getbokun/onlyUpdateHT/">点击导入翰特数据</a></P>
                        <p>第四步，导入原CH网站产品到信息平台</p>
                        <p><a href="https://ct.mycht.cn/info.php/thirdparty/tpmanage/webgetbokun/CurlCHTTours/">点击导入网前信息平台数据</a></p>
                        <p style="display: none;"></p>
                    </td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td id="msg_1">请等待:当前进度:<span>0%</span></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td colspan="3" id="msg_1a"></td>
                </tr>
            </table>
        </div>
    </div>
</div>
<script type="text/javascript">
    var trigger = document.getElementById("trigger_ajax");
    trigger.onclick = function(){
        var xhr = new XMLHttpRequest();
        xhr.onprogress = function(event){
            if(event.lengthComputable){
                var loaded = parseInt(event.loaded/event.total*100)+"%";
                $('#pros').width(loaded);
                $('#pros').text(loaded);
            }
        }
        xhr.open("post", "/info.php/thirdparty/updatetrain/updatestation/test/", true);
        xhr.send(null);
    }

</script>