lylme_spage/admin/index.php

181 lines
6.0 KiB
PHP
Raw Normal View History

2022-02-19 23:38:30 +08:00
<?php
$title = '后台管理';
include './head.php';
$mysqlversion = mysqli_fetch_array(mysqli_query($con,"select VERSION()"))[0];
2022-02-22 03:04:20 +08:00
function tjsj($tjname){if($tjname==''){echo '0';}else{echo $tjname;}}
2022-02-19 23:38:30 +08:00
?>
<!--页面主要内容-->
<main class="lyear-layout-content">
<div class="container-fluid">
<div class="row">
<div class="col-sm-6 col-lg-3">
<div class="card bg-primary">
<div class="card-body clearfix">
<div class="pull-right">
2022-02-22 03:04:20 +08:00
<p class="h6 text-white m-t-0">链接数量</p>
<p class="h3 text-white m-b-0 fa-1-5x"><?php tjsj($linksrows);?></p>
2022-02-19 23:38:30 +08:00
</div>
<div class="pull-left"> <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-currency-cny fa-1-5x"></i></span> </div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="card bg-danger">
<div class="card-body clearfix">
<div class="pull-right">
<p class="h6 text-white m-t-0">今日访客量</p>
2022-02-22 03:04:20 +08:00
<p class="h3 text-white m-b-0 fa-1-5x"><?php tjsj($tjtoday);?></p>
2022-02-19 23:38:30 +08:00
</div>
<div class="pull-left"> <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-account fa-1-5x"></i></span> </div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="card bg-success">
<div class="card-body clearfix">
<div class="pull-right">
<p class="h6 text-white m-t-0">昨日访客量</p>
2022-02-22 03:04:20 +08:00
<p class="h3 text-white m-b-0 fa-1-5x"><?php tjsj($tjyesterday); ?></p>
2022-02-19 23:38:30 +08:00
</div>
<div class="pull-left"> <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-arrow-down-bold fa-1-5x"></i></span> </div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="card bg-purple">
<div class="card-body clearfix">
<div class="pull-right">
<p class="h6 text-white m-t-0">累计访客量</p>
2022-02-22 03:04:20 +08:00
<p class="h3 text-white m-b-0 fa-1-5x"><?php tjsj($tjtotal); ?></p>
2022-02-19 23:38:30 +08:00
</div>
<div class="pull-left"> <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-comment-outline fa-1-5x"></i></span> </div>
</div>
</div>
</div>
</div>
2022-02-22 03:04:20 +08:00
<div class="row">
2022-02-19 23:38:30 +08:00
2022-02-22 03:04:20 +08:00
<div class="col-lg-6">
<div class="card">
<div class="card-header">
<h4>仪表盘柱状统计图</h4>
</div>
<div class="card-body">
<canvas class="js-chartjs-bars"></canvas>
</div>
</div>
</div>
2022-02-19 23:38:30 +08:00
2022-02-22 03:04:20 +08:00
<div class="col-lg-6">
<div class="card">
<div class="card-header">
<h4>仪表盘折线统计图</h4>
</div>
<div class="card-body">
<canvas class="js-chartjs-lines"></canvas>
</div>
</div>
</div>
2022-02-19 23:38:30 +08:00
2022-02-22 03:04:20 +08:00
</div>
2022-02-19 23:38:30 +08:00
<div class="card">
<div class="card-header">
<h4>服务器信息</h4>
</div>
<ul class="list-group">
<li class="list-group-item">
<b>PHP 版本:</b><?php echo phpversion() ?>
<?php if(ini_get('safe_mode')) { echo '线程安全'; } else { echo '非线程安全'; } ?>
</li>
<li class="list-group-item">
<b>MySQL 版本:</b><?php echo $mysqlversion ?>
</li>
<li class="list-group-item">
<b>服务器软件:</b><?php echo $_SERVER['SERVER_SOFTWARE'] ?>
</li>
<li class="list-group-item">
2022-02-22 03:04:20 +08:00
<b>程序名称:</b>六零导航页(LyLme Spage)
2022-02-19 23:38:30 +08:00
</li>
<li class="list-group-item">
<b>当前版本:</b><?php echo $conf['version']?>
</li>
<li class="list-group-item">
2022-02-22 03:04:20 +08:00
<b>最新版本:</b> <a href="https://gitee.com/LyLme/lylme_spage/releases" target="_blant">检查更新</a>
2022-02-19 23:38:30 +08:00
</li>
<li class="list-group-item">
<b>项目作者:</b>六零
</li>
<li class="list-group-item">
<b>项目地址:</b>https://github.com/LyLme/lylme_spage
</li>
</ul>
</div>
2022-01-20 15:35:11 +08:00
2022-02-19 23:38:30 +08:00
</div>
</main>
<!--End 页面主要内容-->
</div>
2022-01-20 15:35:11 +08:00
</div>
2022-02-22 03:04:20 +08:00
<?php
include './footer.php';
2022-01-20 15:35:11 +08:00
2022-02-22 03:04:20 +08:00
?>
2022-02-19 23:38:30 +08:00
<!--图表插件-->
2022-02-22 03:04:20 +08:00
<script type="text/javascript" src="js/Chart.js"></script>
<script type="text/javascript">
$(document).ready(function(e) {
var $dashChartBarsCnt = jQuery( '.js-chartjs-bars' )[0].getContext( '2d' ),
$dashChartLinesCnt = jQuery( '.js-chartjs-lines' )[0].getContext( '2d' );
2022-02-19 23:38:30 +08:00
2022-02-22 03:04:20 +08:00
var $dashChartBarsData = {
labels: ['今日访客', '昨日访客', '本月访客', '总访客', '链接数', '分组数'],
datasets: [
{
label: '数量',
borderWidth: 1,
borderColor: 'rgba(0,0,0,0)',
backgroundColor: 'rgba(51,202,185,0.5)',
hoverBackgroundColor: "rgba(51,202,185,0.7)",
hoverBorderColor: "rgba(0,0,0,0)",
data: [<?php echo $tjtoday;?>, <?php echo $tjyesterday;?>, <?php echo $tjmonth;?>, <?php echo $tjtotal;?>, <?php echo $linksrows;?>, <?php echo $groupsrows;?>]
}
]
};
var $dashChartLinesData = {
labels: ['今日访客', '昨日访客', '本月访客', '总访客', '链接数', '分组数'],
datasets: [
{
label: '数量',
data: [<?php echo $tjtoday;?>, <?php echo $tjyesterday;?>, <?php echo $tjmonth;?>, <?php echo $tjtotal;?>,<?php echo $linksrows;?>, <?php echo $groupsrows;?>],
borderColor: '#358ed7',
backgroundColor: 'rgba(53, 142, 215, 0.175)',
borderWidth: 1,
fill: false,
lineTension: 0
}
]
};
2022-02-19 23:38:30 +08:00
2022-02-22 03:04:20 +08:00
new Chart($dashChartBarsCnt, {
type: 'bar',
data: $dashChartBarsData
});
2022-02-19 23:38:30 +08:00
2022-02-22 03:04:20 +08:00
var myLineChart = new Chart($dashChartLinesCnt, {
type: 'line',
data: $dashChartLinesData,
});
});
</script>