{extend name="../../admin/view/public/admin"}

{block name='style'}

{/block}

{block name='content'}

<div class="page-header">当前位置：<span class="text-primary">系统运行情况</span></div>

<div class="page-content">

    <form action="" method="post" class="form-validate form-horizontal ">

        <div class="form-group-title">服务器信息</div>
        <div class="form-group">
            <label class="col-lg control-label">服务器软件</label>
            <div class="col-sm-9 col-xs-12">
                <p class="form-control-static">{$_SERVER['SERVER_SOFTWARE']}</p>
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">服务器IP地址</label>
            <div class="col-sm-9 col-xs-12">
                <div class="form-control-static">{$_SERVER['SERVER_ADDR']}</div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">服务器域名</label>
            <div class="col-sm-9 col-xs-12">
                <div class="form-control-static">{$_SERVER['SERVER_NAME']}</div>
            </div>
        </div>

        <div class="form-group-title">操作系统信息</div>
        <div class="form-group">
            <label class="col-lg control-label">操作系统名称(php_uname)</label>
            <div class="col-sm-9 col-xs-12">
                <div class="form-control-static">{:php_uname()}</div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">操作系统名称 (PHP_OS常量)</label>
            <div class="col-sm-9 col-xs-12">
                <div class="form-control-static"><?php echo PHP_OS; ?></div>
            </div>
        </div>

        <?php $diskTotal = @round(@disk_total_space('/') / (1024 * 1024 * 1024)); ?>
        <?php $diskFree = @round(@disk_free_space('/') / (1024 * 1024 * 1024)); ?>

        {if $diskTotal > 0 && $diskFree > 0}

            <div class="form-group-title">系统资源信息</div>
            <div class="form-group">
                <label class="col-lg control-label">总空间</label>
                <div class="col-sm-9 col-xs-12">
                    <div class="form-control-static">{$diskTotal} GB</div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-lg control-label">可用空间</label>
                <div class="col-sm-9 col-xs-12">
                    <div class="form-control-static">{$diskFree} GB</div>
                </div>
            </div>
        {/if}

        <!-- <div class="form-group"> -->
        <!--     <label class="col-lg control-label"></label> -->
        <!--     <div class="col-sm-9"> -->
        <!--         <input type="submit" class="btn btn-primary" value="确认更新"> -->
        <!--     </div> -->
        <!-- </div> -->

    </form>

</div>

{/block}