[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: dashboard.php
<?php include("db/db.php");?> <?php include("includes/functions/functions.php");?> <?php if(!isset($_SESSION['name_Xw211qAAsq4'])){ header('Location: index'); exit(); } else{ $username = $_SESSION['name_Xw211qAAsq4']; ?> <div id="layout-wrapper"> <div class="header-border"></div> <header id="page-topbar"> <?php include("includes/template/header.php");?> </header> <div class="vertical-menu"> <?php include("includes/template/sidebar.php");?> <script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/modules/accessibility.js"></script> <style type="text/css"> .highcharts-credits { display: none !important; } </style> </div> <div class="main-content"> <div class="page-content"> <div class="container-fluid"> <!-- start page title --> <div class="row"> <div class="col-12"> <div class="page-title-box d-flex align-items-center justify-content-between"> <h4 class="mb-0 font-size-18">Dashboard</h4> <div class="page-title-right"> <ol class="breadcrumb m-0"> <li class="breadcrumb-item"><a href="javascript: void(0);">thesalonfriend</a></li> <li class="breadcrumb-item active">Dashboard</li> </ol> </div> </div> </div> </div> <!-- end page title --> <div class="row"> <div class="col-md-6 col-xl-3"> <div class="card"> <div class="card-body"> <div class="mb-4"> <span class="badge badge-soft-primary float-right">All time</span> <h5 class="card-title mb-0">Total Users</h5> </div> <div class="row d-flex align-items-center mb-4"> <div class="col-8"> <?php $sel = mysqli_query($new,"SELECT count(admin_id) as id FROM barber_admin"); $row1 = mysqli_fetch_array($sel); $cnt = $row1['id']; ?> <h2 class="d-flex align-items-center mb-0"> <?= $cnt;?> </h2> </div> </div> <div class="progress shadow-sm" style="height: 5px;"> <div class="progress-bar bg-success" role="progressbar" style="width: 57%;"> </div> </div> </div> <!--end card body--> </div><!-- end card--> </div> <!-- end col--> <div class="col-md-6 col-xl-3"> <div class="card"> <div class="card-body"> <div class="mb-4"> <span class="badge badge-soft-primary float-right">All time</span> <h5 class="card-title mb-0">Active Account</h5> </div> <div class="row d-flex align-items-center mb-4"> <div class="col-8"> <?php $sel = mysqli_query($new,"SELECT count(admin_id) as id FROM barber_admin WHERE expired = 'no'"); $row1 = mysqli_fetch_array($sel); $cntt = $row1['id']; ?> <h2 class="d-flex align-items-center mb-0"> <?= $cntt;?> </h2> </div> </div> <div class="progress shadow-sm" style="height: 5px;"> <div class="progress-bar bg-danger" role="progressbar" style="width: 57%;"> </div> </div> </div> <!--end card body--> </div><!-- end card--> </div> <!-- end col--> <div class="col-md-6 col-xl-3"> <div class="card"> <div class="card-body"> <div class="mb-4"> <span class="badge badge-soft-primary float-right">All time</span> <h5 class="card-title mb-0">Expired Account</h5> </div> <div class="row d-flex align-items-center mb-4"> <div class="col-8"> <?php $sel = mysqli_query($new,"SELECT count(admin_id) as id FROM barber_admin WHERE expired = 'yes'"); $row1 = mysqli_fetch_array($sel); $cnttt = $row1['id']; ?> <h2 class="d-flex align-items-center mb-0"> <?= $cnttt;?> </h2> </div> </div> <div class="progress shadow-sm" style="height: 5px;"> <div class="progress-bar bg-warning" role="progressbar" style="width: 57%;"> </div> </div> </div> <!--end card body--> </div> <!--end card--> </div> <!-- end col--> <div class="col-md-6 col-xl-3"> <div class="card"> <div class="card-body"> <div class="mb-4"> <span class="badge badge-soft-primary float-right">All Time</span> <h5 class="card-title mb-0">Income</h5> </div> <div class="row d-flex align-items-center mb-4"> <div class="col-8"> <?php $sel = mysqli_query($new,"SELECT sum(amount) as amount FROM income"); $row14= mysqli_fetch_array($sel); $amount = $row14['amount']; if($amount == ""){ $am = '0.00'; } else { $am = $amount; } ?> <h2 class="d-flex align-items-center mb-0"> <?php echo number_format($am,2) ;?> </h2> </div> </div> <div class="progress shadow-sm" style="height: 5px;"> <div class="progress-bar bg-info" role="progressbar" style="width: 57%;"></div> </div> </div> <!--end card body--> </div><!-- end card--> </div> <!-- end col--> </div> <!-- end row--> <div class="row"> <div class="col-lg-9"> <div class="card"> <div class="card-body"> <div class="row"> <div class="col-lg-12"> <h4 class="card-title">Monthly Income Analytics</h4> <div id="container" style="height:400px;"></div> </div> </div> </div> <!--end card body--> </div> <!-- end card--> </div> <!-- end col --> <div class="col-lg-3"> <div class="card"> <div class="card-body"> <div class="row align-items-center"> <div class="col"> <h4 class="card-title">Total Expenses</h4> <?php $exp = mysqli_query($new,"SELECT sum(item_amount) as total FROM admin_expenses"); $Exp = mysqli_fetch_array($exp); $totalExp = $Exp['total']; ?> <h3><?php echo number_format($totalExp,2);?></h3> </div> </div> <div id="sparkline1" class="mt-3"></div> </div> </div> <!--end card--> </div><!-- end col --> </div> </div> <!--end row--> </div> <!-- container-fluid --> </div> <!-- End Page-content --> <?php include("includes/template/footer.php");?> </div> <!-- end main content--> </div> <div class="menu-overlay"></div> <script type="text/javascript"> Highcharts.setOptions({ colors: Highcharts.map(Highcharts.getOptions().colors, function (color) { return { radialGradient: { cx: 0.5, cy: 0.3, r: 0.7 }, stops: [ [0, color], [1, Highcharts.color(color).brighten(-0.3).get('rgb')] // darken ] }; }) }); Highcharts.chart('container', { chart: { type: 'column' }, title: { text: 'Monthly Income and Expenses' }, xAxis: { categories: [<?php for ($m=1; $m<=12; $m++) { $month = date('F', mktime(0,0,0,$m, 1, date('Y'))); echo "['".$month."'],"; }?>], crosshair: true }, yAxis: { min: 0, title: { text: 'Cash (¢)' } }, tooltip: { headerFormat: '<span style="font-size:10px">{point.key}</span><table>', pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' + '<td style="padding:0"><b>{point.y:.1f}</b></td></tr>', footerFormat: '</table>', shared: true, useHTML: true }, plotOptions: { series: { borderWidth: 0, dataLabels: { enabled: true, format: '{point.y:.1f} ¢' } } }, series: [{ name: 'Income', data: [<?php for ($m=1; $m<=12; $m++) { $month = date('F', mktime(0,0,0,$m, 1, date('Y'))); $year = date('Y'); $stmtServices = $con->prepare("SELECT sum(amount) as amount,MONTHNAME(datepaid) as month FROM income WHERE MONTHNAME(datepaid) = '$month' and YEAR(datepaid) = '$year'"); $stmtServices->execute(); $rowsServices = $stmtServices->fetchAll(); foreach($rowsServices as $rowsService) { $saleamount = $rowsService['amount']; if(empty($saleamount)){ $totalamount = '0'; } else { $totalamount = $saleamount; } echo "".$totalamount.","; } } ?>] }, { type: 'column', name: 'Expenses', color: '#992600', data: [<?php for ($m=1; $m<=12; $m++) { $month = date('F', mktime(0,0,0,$m, 1, date('Y'))); $year = date('Y'); $stmt = $con->prepare("SELECT sum(item_amount) as amount,MONTHNAME(date) as month FROM admin_expenses WHERE MONTHNAME(date) = '$month' and YEAR(date) = '$year'"); $stmt->execute(); $rows_services = $stmt->fetchAll(); foreach($rows_services as $service) { $v = $service['amount']; if(empty($v)){ $gg = '0'; } else { $gg = $v; } } echo "".$gg.","; } ?>] }] }); </script> <?php }?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 60.06 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002