<style>
body{
  background:#FCFCFC!important;
}
</style>

<div class="ui inverted vertical footer segment" style="background: rgba(35,35,42,1);" >
  <div class="ui container" style="width:100%;">
    <div class="ui stackable inverted divided equal height stackable grid">
      <div class="eight wide column centered">
          <div class="column" align="center" >
              <img src="/logo_pro.png" alt="PhalApi Pro" style="height:48px;">
          </div>
          <div class="column" align="center">
              <p style="color:#fff;">
                  <strong><?= $projectName ?></strong>
                  &nbsp;|&nbsp;
                  <?php echo \PhalApi\T('best choice to build cloud platform'); ?>
                  <br />
                  <p>© 2018-<?php echo date('Y'); ?> Powered  By <a target="_blank" style="color:rgba(40,92,253,1)" href="http://pro.yesapi.cn/">PhalApi Pro v<?php echo PHALAPI_PRO_VERSION; ?></a> All Rights Reserved. <span id="version_update"></span></p>
              </p>
          </div>
      </div>
    </div>
  </div>
</div>

<script type="text/javascript">

	$(function(){
    	$('.ui.dropdown').dropdown({
    	    // you can use any ui transition
    	    transition: 'drop'
    	  });
	});
	
    function getData() {
        var data = new FormData();
        var param = [];
        $("td input").each(function(index,e) {
            if ($.trim(e.value)){
                if (e.type != 'file'){
                    if ($(e).data('source') == 'get') {
                        param.push(e.name + '=' + e.value);
                    } else {
                        data.append(e.name, e.value);
                    }

                    if (e.name != "service") $.cookie(e.name, e.value, {expires: 30});
                } else{
                    var files = e.files;
                    if (files.length == 1){
                        data.append(e.name, files[0]);
                    } else{
                        for (var i = 0; i < files.length; i++) {
                            data.append(e.name + '[]', files[i]);
                        }
                    }
                }
            }
        });
        param = param.join('&');
        return {param:param, data:data};
    }

    // 填充历史数据
    function fillHistoryData() {
        $("td input").each(function(index,e) {
            var cookie_value = $.cookie(e.name);
            if (e.name != "service" && cookie_value !== undefined) {
                e.value = cookie_value;
            }
        });
    }

    // 检测最新版本
    function checkLastestVersion() {
        var version = '<?php echo PHALAPI_PRO_VERSION; ?>';
        $.ajax({
            url:'http://pro.yesapi.cn/check_lastest_version.php',
                type:'get',
                data:{version : version},
                success:function(res,status,xhr){
                    console.log(res);
                    if (!res.ret || res.ret != 200) {
                        return;
                    }
                    if (res.data.need_upgrade >= 0) {
                        return;
                    }

                    $('#version_update').html('&nbsp; | &nbsp; <a target="_blank" href=" ' + res.data.url + ' "><strong>升级到 PhalApi Pro ' + res.data.version + '</strong></a>');
                },
                error:function(error){
                    console.log(error)
                }
        })

    }
</script>

</body>
</html>
