<?php
include("../includes/common.php");
$title="后台首页";
include "./head.php";
if($islogin==1){}else exit("<script language='javascript'>window.location.href='./login.php';</script>");
?>
<?php
$sites=$DB->count("SELECT count(*) from ds_pay WHERE status='1'");
$blocks=$DB->count("SELECT count(*) from ds_pay WHERE 1");
?>
        <div class="lime-container">
            <div class="lime-body">
                <div class="container">
                	<?php if($_SERVER["PHP_SELF"] == '/admin/index.php'): ?>
                	<div class="alert alert-danger alert-dismissible fade show" role="alert">
                		<strong>哆咪助手风险提示：</strong> 为了您的安全，系统检测到您的后台地址为默认/admin 请修改后台登录地址！
                		<button type="button" class="close" data-dismiss="alert" aria-label="Close">
                			<span aria-hidden="true">×</span>
                		</button>
                	</div>
                	<?php endif; ?>
                	<?php if($conf['admin_user'] == 'admin'): ?>
                	<div class="alert alert-danger alert-dismissible fade show" role="alert">
                		<strong>哆咪助手风险提示：</strong> 为了您的安全，系统检测到您的管理员登录账号为默认：admin 请第一时间打开后台<a href="user.php">管理员信息修改</a>进行修改！
                		<button type="button" class="close" data-dismiss="alert" aria-label="Close">
                			<span aria-hidden="true">×</span>
                		</button>
                	</div>
                	<?php endif; ?>
                	<?php if($conf['admin_pass'] == 'e10adc3949ba59abbe56e057f20f883e'): ?>
                	<div class="alert alert-danger alert-dismissible fade show" role="alert">
                		<strong>哆咪助手风险提示：</strong> 为了您的安全，系统检测到您的管理员登录密码为默认：123456 请第一时间打开后台<a href="user.php">管理员信息修改</a>进行修改！
                		<button type="button" class="close" data-dismiss="alert" aria-label="Close">
                			<span aria-hidden="true">×</span>
                		</button>
                	</div>
                	<?php endif; ?>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="card stat-card">
                                <div class="card-body">
                                    <h5 class="card-title">换钱统计（已付款）</h5>
                                    <h2 class="float-right"><?=$sites?></h2>
                                    <p>现在时间：<?=$date?></p>
                                    <div class="progress" style="height: 10px;">
                                        <div class="progress-bar bg-warning" role="progressbar" style="width: <?=$sites?>%" aria-valuenow="<?=$sites?>" aria-valuemin="0" aria-valuemax="100"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="card stat-card">
                                <div class="card-body">
                                    <h5 class="card-title">换钱统计（未付款）</h5>
                                    <h2 class="float-right"><?=$blocks?></h2>
                                    <p>现在时间：<?=$date?></p>
                                    <div class="progress" style="height: 10px;">
                                        <div class="progress-bar bg-info" role="progressbar" style="width: <?=$sites?>%" aria-valuenow="<?=$sites?>" aria-valuemin="0" aria-valuemax="100"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-7">
                            <div class="card">
                                <div class="card-body">
                                    <h5 class="card-title">站点服务器信息</h5>
                                    <div class="table-responsive">
                                        <table class="table">
                                            <thead>
                                                <tr>
                                                    <th scope="col">函数检测</th>
                                                    <th scope="col">信息详情</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr>
                                                    <td>PHP 版本：</td>
                                                    <td><?php echo phpversion() ?> <?php if(ini_get('safe_mode')) { echo '线程安全'; } else { echo '非线程安全'; } ?></td>
                                                </tr>
                                                <tr>
                                                    <td>服务器通信协议：</td>
                                                    <td><?php echo $_SERVER["REQUEST_SCHEME"] ?></td>
                                                </tr>
                                                <tr>
                                                    <td>服务器系统&软件：</td>
                                                    <td><?php echo PHP_OS." & ".$_SERVER['SERVER_SOFTWARE'] ?></td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>      
                                </div>
                            </div>
                        </div>
                        <div class="col-md-5">
                            <div class="card">
                                <div class="card-body">
                                    <h5 class="card-title">开发者信息</h5>
                                    <div class="social-media-list">
                                        <div class="row">
                                            <div class="col">
                                                <div class="social-media-item">
                                                	<div class="social-icon twitter">
                                                		<i class="fab fa-qq"></i>
                                                	</div>
                                                	<div class="social-text">
                                                		<p>1112561</p>
                                                		<span>开发者QQ</span>
                                                	</div>
                                                </div>
                                            </div>
                                            <div class="col">
                                                <div class="social-media-item">
                                                    <div class="social-icon twitter">
                                                        <i class="fab fa-quora"></i>
                                                    </div>
                                                    <div class="social-text">
                                                    	<p>1112561</p>
                                                    	<span>官方交流群</span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="alert alert-warning">
                                        	本程序由 哆咪付（DMF.CN）提供，汇款接口已对接哆咪付平台，请至哆咪付平台注册获取接口信息配置平台内即可！
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="lime-footer">
                <div class="container">
                    <div class="row">
                        <div class="col-md-12">
                            <span class="footer-text"><?php echo $conf['foot'] ?></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- Javascripts -->
        <script src="../../assets/plugins/jquery/jquery-3.1.0.min.js"></script>
        <script src="../../assets/plugins/bootstrap/popper.min.js"></script>
        <script src="../../assets/plugins/bootstrap/js/bootstrap.min.js"></script>
        <script src="../../assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
        <script src="../../assets/plugins/chartjs/chart.min.js"></script>
        <script src="../../assets/plugins/apexcharts/dist/apexcharts.min.js"></script>
        <script src="../../assets/js/lime.min.js"></script>
        <script src="../../assets/js/pages/dashboard.js"></script>
    </body>
</html>