Shell File Manager
<?php $page = 'home' ?>
<?php
session_start();
//if (isset($_SESSION['ID'])) {
// header("Location:index.php");
// exit();
//}
// Include database connectivity
include_once('../../include/config.php');
$admin_id = $_GET['admin_id'];
$role = $_GET['role'];
$url_session = $_GET['session'];
// print_r($url_session);
if ($url_session == $_SESSION['session']) {
include_once('nav.php');
?>
<!-- End Sidebar -->
<div class="main-panel">
<div class="content">
<div class="panel-header bg-primary-gradient">
<div class="page-inner py-5">
<div class="d-flex align-items-left align-items-md-center flex-column flex-md-row">
<div>
<h2 class="text-white pb-2 fw-bold">Dashboard</h2>
<h5 class="text-white op-7 mb-2">Camsacn Admin Dashboard</h5>
</div>
<div class="ml-md-auto py-2 py-md-0">
<!-- <a href="#" class="btn btn-white btn-border btn-round mr-2">Manage</a> -->
<?php
if ($role == 'Data Entery') { ?>
<a href="#admins" onclick="return alert('You Not Authorized To Do This Action ')" class="btn btn-secondary btn-round"> Add New Admin</a>
<?php } else {
?>
<a href="admins.php?admin_id=<?php echo $admin_id; ?>&role=<?php echo $role; ?>&session=<?php echo $url_session; ?>" class="btn btn-secondary btn-round">Add New Admin</a>
<?php } ?>
</div>
</div>
</div>
</div>
<div class="page-inner mt--5">
<div class="row mt--2">
<div class="col-md-6">
<div class="card full-height">
<div class="card-body">
<div class="card-title">Overall Products Statistics</div>
<div class="card-category">Daily information about statistics in system</div>
<div class="d-flex flex-wrap justify-content-around pb-2 pt-4">
<div class="px-2 pb-2 pb-md-0 text-center">
<div id="circles-1"></div>
<h6 class="fw-bold mt-3 mb-0">Cameras</h6>
</div>
<div class="px-2 pb-2 pb-md-0 text-center">
<div id="circles-2"></div>
<h6 class="fw-bold mt-3 mb-0">Recorders</h6>
</div>
<div class="px-2 pb-2 pb-md-0 text-center">
<div id="circles-3"></div>
<h6 class="fw-bold mt-3 mb-0">Other Products</h6>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card full-height">
<div class="card-body">
<div class="card-title">Overall CamScan FZCO App Process Statistics</div>
<br>
<div class="row">
<div class="col">
<h6 class="fw-bold text-uppercase text-success op-8">All Products </h6>
<?php
$all = "SELECT Count(id) from tb1 where trash=0 ";
$all_run = mysqli_query($connection, $all);
if (mysqli_num_rows($all_run) > 0) {
foreach ($all_run as $all) {
$all = $all['Count(id)'];
// print_r($type);
}
}
?>
<h3 class="fw-bold"><?php print_r($all); ?> </h3>
</div>
<div class="col">
<h6 class="fw-bold text-uppercase text-danger op-8">All Users </h6>
<?php
$users = "SELECT Count(id) from usertable ";
$users_run = mysqli_query($connection, $users);
if (mysqli_num_rows($users_run) > 0) {
foreach ($users_run as $users) {
$users = $users['Count(id)'];
// print_r($type);
}
}
?>
<h3 class="fw-bold"><?php print_r($users) ?></h3>
</div>
</div>
<br>
<div class="row">
<div class="col">
<h6 class="fw-bold text-uppercase text-success op-8">Archived Products</h6>
<?php
$all = "SELECT Count(product_category) from tb1 where trash=0 and product_category='Archive Product' ";
$all_run = mysqli_query($connection, $all);
if (mysqli_num_rows($all_run) > 0) {
foreach ($all_run as $all) {
$Archive_Product = $all['Count(product_category)'];
// print_r($type);
}
}
?>
<h3 class="fw-bold"><?php print_r($Archive_Product) ?> </h3>
</div>
<div class="col">
<h6 class="fw-bold text-uppercase text-danger op-8">Miscellaneous Products</h6>
<?php
$all = "SELECT Count(product_category) from tb1 where trash=0 and product_category='Miscellaneous Products' ";
$all_run = mysqli_query($connection, $all);
if (mysqli_num_rows($all_run) > 0) {
foreach ($all_run as $all) {
$Miscellaneous = $all['Count(product_category)'];
// print_r($type);
}
}
?>
<h3 class="fw-bold"><?php print_r($Miscellaneous) ?></h3>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="card card-primary bg-primary-gradient ">
<div class="card-body">
<h4 class="mb-1 fw-bold">Special Products</h4>
<div id="task-complete" class="chart-circle mt-4 mb-3"></div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card card-primary bg-primary-gradient ">
<div class="card-body">
<h4 class="mb-1 fw-bold">Best Selling Products</h4>
<div id="task-complete1" class="chart-circle mt-4 mb-3"></div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card card-primary bg-primary-gradient ">
<div class="card-body">
<h4 class="mb-1 fw-bold">Discontinued Products</h4>
<div id="task-complete2" class="chart-circle mt-4 mb-3"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include_once('footer.php'); ?>
<?php
$camera = "SELECT Count(type) , type FROM tb1 where type='Cameras' and trash=0 ";
$camera_run = mysqli_query($connection, $camera);
if (mysqli_num_rows($camera_run) > 0) {
foreach ($camera_run as $pritems1) {
$type1 = $pritems1['Count(type)'];
// print_r($type);
}
}
?>
<?php
$record = "SELECT Count(type) , type FROM tb1 where type='Recorders ' and trash=0 ";
$record_run = mysqli_query($connection, $record);
if (mysqli_num_rows($camera_run) > 0) {
foreach ($record_run as $pritems2) {
$type2 = $pritems2['Count(type)'];
// print_r($type);
}
}
?>
<?php
$other = "SELECT Count(type) , type FROM tb1 where type!='Recorders' and type!='Cameras' and trash=0 ";
$other_run = mysqli_query($connection, $other);
if (mysqli_num_rows($other_run) > 0) {
foreach ($other_run as $pritems3) {
$type3 = $pritems3['Count(type)'];
// print_r($type);
}
}
?>
<script>
Circles.create({
id: 'circles-1',
radius: 45,
value: 70,
maxValue: 100,
width: 7,
text: <?php print_r($type1); ?>,
colors: ['#f1f1f1', '#FF9E27'],
duration: 400,
wrpClass: 'circles-wrp',
textClass: 'circles-text',
styleWrapper: true,
styleText: true
})
Circles.create({
id: 'circles-2',
radius: 45,
value: 30,
maxValue: 100,
width: 7,
text: <?php print_r($type2); ?>,
colors: ['#f1f1f1', '#2BB930'],
duration: 400,
wrpClass: 'circles-wrp',
textClass: 'circles-text',
styleWrapper: true,
styleText: true
})
Circles.create({
id: 'circles-3',
radius: 45,
value: 40,
maxValue: 100,
width: 7,
text: <?php print_r($type3); ?>,
colors: ['#f1f1f1', '#F25961'],
duration: 400,
wrpClass: 'circles-wrp',
textClass: 'circles-text',
styleWrapper: true,
styleText: true
})
var totalIncomeChart = document.getElementById('totalIncomeChart').getContext('2d');
var mytotalIncomeChart = new Chart(totalIncomeChart, {
type: 'bar',
data: {
labels: ["S", "M", "T", "W", "T", "F", "S", "S", "M", "T"],
datasets: [{
label: "Total Income",
backgroundColor: '#ff9e27',
borderColor: 'rgb(23, 125, 255)',
data: [6, 4, 9, 5, 4, 6, 4, 3, 8, 10],
}],
},
options: {
responsive: true,
maintainAspectRatio: false,
legend: {
display: false,
},
scales: {
yAxes: [{
ticks: {
display: false //this will remove only the label
},
gridLines: {
drawBorder: false,
display: false
}
}],
xAxes: [{
gridLines: {
drawBorder: false,
display: false
}
}]
},
}
});
$('#lineChart').sparkline([105, 103, 123, 100, 95, 105, 115], {
type: 'line',
height: '70',
width: '100%',
lineWidth: '2',
lineColor: '#ffa534',
fillColor: 'rgba(255, 165, 52, .14)'
});
</script>
<?php
?>
<?php
$discontinued = "SELECT Count(discontinued) from tb1 where discontinued=1 and trash=0 ";
$discontinued_run = mysqli_query($connection, $discontinued);
if (mysqli_num_rows($discontinued_run) > 0) {
foreach ($discontinued_run as $discontinued) {
$discontinued = $discontinued['Count(discontinued)'];
// print_r($type);
}
}
?>
<?php
$special = "SELECT Count(special) from tb1 where special=1 and trash=0 ";
$special_run = mysqli_query($connection, $special);
if (mysqli_num_rows($special_run) > 0) {
foreach ($special_run as $special) {
$special = $special['Count(special)'];
// print_r($type);
}
}
?>
<?php
$best = "SELECT Count(best) from tb1 where best=1 and trash=0 ";
$best_run = mysqli_query($connection, $best);
if (mysqli_num_rows($best_run) > 0) {
foreach ($best_run as $best) {
$best = $best['Count(best)'];
// print_r($type);
}
}
?>
<script>
"use strict";
// Cicle Chart
Circles.create({
id: 'task-complete',
radius: 50,
value: <?php print_r($special) ?>,
maxValue: 100,
width: 5,
text: function(value) {
return value + '%';
},
colors: ['#36a3f7', '#fff'],
duration: 400,
wrpClass: 'circles-wrp',
textClass: 'circles-text',
styleWrapper: true,
styleText: true
})
Circles.create({
id: 'task-complete1',
radius: 50,
value: <?php print_r($best) ?>,
maxValue: 100,
width: 5,
text: function(value) {
return value + '%';
},
colors: ['#36a3f7', '#fff'],
duration: 400,
wrpClass: 'circles-wrp',
textClass: 'circles-text',
styleWrapper: true,
styleText: true
})
Circles.create({
id: 'task-complete2',
radius: 50,
value: <?php print_r($discontinued) ?>,
maxValue: 100,
width: 5,
text: function(value) {
return value + '%';
},
colors: ['#36a3f7', '#fff'],
duration: 400,
wrpClass: 'circles-wrp',
textClass: 'circles-text',
styleWrapper: true,
styleText: true
})
</script>
</body>
</html>
<?php
} else {
include 'login_error.php';
}
?>
Shell File Manager Version 1.1, Coded By Shell
Email: [email protected]