fuc/storage/framework/smarty/compile/169ae822894ce209f904617f6f1f6e5b4e8253fa_0.file_index.tpl.php
2025-03-13 17:13:42 +08:00

373 lines
15 KiB
PHP
Executable File

<?php
/* Smarty version 5.3.1, created on 2024-12-08 13:13:31
from 'file:admin/index.tpl' */
/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
'version' => '5.3.1',
'unifunc' => 'content_67552afb0f6539_56820018',
'has_nocache_code' => false,
'file_dependency' =>
array (
'169ae822894ce209f904617f6f1f6e5b4e8253fa' =>
array (
0 => 'admin/index.tpl',
1 => 1712762115,
2 => 'file',
),
),
'includes' =>
array (
'file:admin/header.tpl' => 1,
'file:admin/footer.tpl' => 1,
),
))) {
function content_67552afb0f6539_56820018 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/www/wwwroot/xiaofu.cloud/resources/views/tabler/admin';
$_smarty_tpl->renderSubTemplate('file:admin/header.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
?>
<div class="page-wrapper">
<div class="container-xl">
<div class="page-header d-print-none text-white">
<div class="row align-items-center">
<div class="col">
<h2 class="page-title">
<span class="home-title">站点概况</span>
</h2>
<div class="page-pretitle my-3">
<span class="home-subtitle">站点运营状态总览</span>
</div>
</div>
</div>
</div>
</div>
<div class="page-body">
<div class="container-xl">
<div class="row row-deck row-cards">
<div class="col-12">
<div class="row row-cards">
<div class="col-sm-6 col-lg-3">
<div class="card card-sm">
<div class="card-body">
<div class="row align-items-center">
<div class="col-auto">
<span class="bg-info text-white avatar">
<i class="ti ti-calendar-event icon"></i>
</span>
</div>
<div class="col">
<div class="font-weight-medium">
¥<?php echo $_smarty_tpl->getValue('today_income');?>
</div>
<div class="text-secondary">
本日流水
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="card card-sm">
<div class="card-body">
<div class="row align-items-center">
<div class="col-auto">
<span class="bg-blue text-white avatar">
<i class="ti ti-calendar-minus icon"></i>
</span>
</div>
<div class="col">
<div class="font-weight-medium">
¥<?php echo $_smarty_tpl->getValue('yesterday_income');?>
</div>
<div class="text-secondary">
昨日流水
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="card card-sm">
<div class="card-body">
<div class="row align-items-center">
<div class="col-auto">
<span class="bg-warning text-white avatar">
<i class="ti ti-calendar-stats icon"></i>
</span>
</div>
<div class="col">
<div class="font-weight-medium">
¥<?php echo $_smarty_tpl->getValue('this_month_income');?>
</div>
<div class="text-secondary">
本月流水
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="card card-sm">
<div class="card-body">
<div class="row align-items-center">
<div class="col-auto">
<span class="bg-danger text-white avatar">
<i class="ti ti-calendar-plus icon"></i>
</span>
</div>
<div class="col">
<div class="font-weight-medium">
¥<?php echo $_smarty_tpl->getValue('total_income');?>
</div>
<div class="text-secondary">
累计流水
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="card">
<div class="card-header">
<h3 class="card-title"><?php echo $_smarty_tpl->getValue('total_user');?>
位用户的签到情况</h3>
</div>
<div class="card-body">
<div id="check-in"></div>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="card">
<div class="card-header">
<h3 class="card-title"><?php echo $_smarty_tpl->getValue('total_node');?>
个服务器的在线情况</h3>
</div>
<div class="card-body">
<div id="node-online"></div>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="card">
<div class="card-header">
<h3 class="card-title">闲置账户</h3>
</div>
<div class="card-body">
<div id="user-inactive"></div>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="card">
<div class="card-header">
<h3 class="card-title">流量用量</h3>
</div>
<div class="card-body">
<div id="traffic-usage"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo '<script'; ?>
>
document.addEventListener("DOMContentLoaded", function () {
window.ApexCharts && (new ApexCharts(document.getElementById('check-in'), {
chart: {
type: "donut",
fontFamily: 'inherit',
height: 300,
sparkline: {
enabled: true
},
animations: {
enabled: false
},
},
fill: {
opacity: 1,
},
series: [<?php echo $_smarty_tpl->getValue('total_user')-$_smarty_tpl->getValue('checkin_user');?>
, <?php echo $_smarty_tpl->getValue('checkin_user')-$_smarty_tpl->getValue('today_checkin_user');?>
, <?php echo $_smarty_tpl->getValue('today_checkin_user');?>
],
labels: ["没有签到", "曾经签到", "今日签到"],
grid: {
strokeDashArray: 3,
},
colors: [tabler.getColor("azure"), tabler.getColor("cyan"), tabler.getColor("orange")],
legend: {
show: true,
position: 'bottom',
offsetY: 12,
markers: {
width: 10,
height: 10,
radius: 100,
},
itemMargin: {
horizontal: 8,
vertical: 8
},
},
tooltip: {
fillSeriesColor: false
},
})).render();
window.ApexCharts && (new ApexCharts(document.getElementById('node-online'), {
chart: {
type: "donut",
fontFamily: 'inherit',
height: 300,
sparkline: {
enabled: true
},
animations: {
enabled: false
},
},
fill: {
opacity: 1,
},
series: [<?php echo $_smarty_tpl->getValue('alive_node');?>
, <?php echo $_smarty_tpl->getValue('total_node')-$_smarty_tpl->getValue('alive_node');?>
],
labels: ["在线", "离线"],
grid: {
strokeDashArray: 2,
},
colors: [tabler.getColor("lime"), tabler.getColor("red")],
legend: {
show: true,
position: 'bottom',
offsetY: 12,
markers: {
width: 10,
height: 10,
radius: 100,
},
itemMargin: {
horizontal: 8,
vertical: 8
},
},
tooltip: {
fillSeriesColor: false
},
})).render();
window.ApexCharts && (new ApexCharts(document.getElementById('user-inactive'), {
chart: {
type: "donut",
fontFamily: 'inherit',
height: 300,
sparkline: {
enabled: true
},
animations: {
enabled: false
},
},
fill: {
opacity: 1,
},
series: [<?php echo $_smarty_tpl->getValue('inactive_user');?>
, <?php echo $_smarty_tpl->getValue('active_user');?>
],
labels: ["闲置账户", "活动账户"],
grid: {
strokeDashArray: 4,
},
colors: [tabler.getColor("yellow"), tabler.getColor("lime")],
legend: {
show: true,
position: 'bottom',
offsetY: 12,
markers: {
width: 10,
height: 10,
radius: 100,
},
itemMargin: {
horizontal: 8,
vertical: 8
},
},
tooltip: {
fillSeriesColor: false
},
})).render();
window.ApexCharts && (new ApexCharts(document.getElementById('traffic-usage'), {
chart: {
type: "donut",
fontFamily: 'inherit',
height: 300,
sparkline: {
enabled: true
},
animations: {
enabled: false
},
},
fill: {
opacity: 1,
},
series: [<?php echo $_smarty_tpl->getValue('raw_today_traffic');?>
, <?php echo $_smarty_tpl->getValue('raw_last_traffic');?>
, <?php echo $_smarty_tpl->getValue('raw_unused_traffic');?>
],
labels: ["今日已用(<?php echo $_smarty_tpl->getValue('today_traffic');?>
)", "过去已用(<?php echo $_smarty_tpl->getValue('last_traffic');?>
)", "剩余流量(<?php echo $_smarty_tpl->getValue('unused_traffic');?>
)"],
grid: {
strokeDashArray: 3,
},
colors: [tabler.getColor("green"), tabler.getColor("lime"), tabler.getColor("yellow")],
legend: {
show: true,
position: 'bottom',
offsetY: 12,
markers: {
width: 10,
height: 10,
radius: 100,
},
itemMargin: {
horizontal: 8,
vertical: 8
},
},
tooltip: {
fillSeriesColor: false
},
})).render();
});
<?php echo '</script'; ?>
>
<?php echo '<script'; ?>
src="//<?php echo $_smarty_tpl->getValue('config')['jsdelivr_url'];?>
/npm/@tabler/core@latest/dist/libs/apexcharts/dist/apexcharts.min.js"><?php echo '</script'; ?>
>
<?php $_smarty_tpl->renderSubTemplate('file:admin/footer.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
}
}