CODE
<?php
session_start();
error_reporting(E_ALL);
include("configure.php");
if(strlen($_SESSION['uuid']==0))
{
header('location:signout.php');
}
else
{
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="newstyle.css">
<link rel="stylesheet" href="fontawesome-free-6.4.2-web/css/font-awesome.min.css">
<link rel="stylesheet" href="plugin.css">
<link rel="stylesheet" href="../jquery-jvectormap-2.0.5.css">
<link rel="stylesheet" href="../themify-icons/assets/themify-icons/themify-icons.css">
<title>User dashboard</title>
</head>
<body class="theme-indigo">
<?php
include_once("header.php");
?>
<div class="main_content" id="main-content">
<?php include_once("sidebar.php"); ?>
<div class="page">
<nav class="navbar nav-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="dashboard.php">Dashboard</a>
</nav>
<div class="container-fluid">
<div class="row clearfix">
<div class="col-lg-12 col-md-6 col-sm-12">
<div class="card widget_2 big_icon traffic">
<div class="body">
<?php
$uid=$_SESSION['uuid'];
$sql="SELECT Full_Name,Gmail from user where user_id=:uid";
$query = $con -> prepare($sql);
$query->bindParam(':uid',$uid,PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
foreach($results as $row)
{
$gmail=$row->Gmail;
$name=$row->Full_Name;
}
?>
<h4 style="color:red">Welcome <?php echo $name; ?></h4>
<a href="profile.php" class="btn btn-primary"><small>View Profile</small></a>
<?php
$sql="select user.user_id as uid from user join complain on user.user_id=complain.user_id where complain.user_id=:uid and (complain.Status is null || complain.Status='')";
$query=$con->prepare($sql);
$query->bindParam(':uid',$uid,PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$totalcomplain=$query->rowCount();
?>
<div class="row clearfix" style="margin-top:2%">
<div class="col-lg-4 col-md-6 col-sm-12">
<div class="card widget_2 big_icon traffic">
<div class="body" style="border:solid #000 1px">
<h6>Total Lodged compalin</h6>
<h2> <?php echo $totalcomplain; ?> </h2>
<a href="complainhistory.php"><small>View Detail</small></a>
</div>
</div>
</div>
<?php
$sql="select user.user_id as uid from complain join user on user.user_id=complain.user_id where complain.user_id=:uid and (complain.Status is null || complain.Status='')";
$query = $con -> prepare($sql);
$query-> bindParam(':uid', $uid, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$newlodgedcomplain=$query->rowCount();
?>
<div class="col-lg-4 col-md-6 col-sm-12">
<div class="card widget_2 big_icon sales">
<div class="body" style="border:solid #ff0000 1px">
<h6>New Lodged Complain</h6>
<h2><?php echo $newlodgedcomplain;?></h2>
<a href="complainhistory.php"><small> View Detail</small></a>
</div>
</div>
</div>
<?php
$sql="SELECT user.user_id as uid from complain join user on user.user_id=complain.user_id where complain.user_id=:uid and (complain.Status='Completed')";
$query = $dbh -> prepare($sql);
$query-> bindParam(':uid', $uid, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$completedcomplain=$query->rowCount();
?>
<div class="col-lg-4 col-md-6 col-sm-12">
<div class="card widget_2 big_icon email">
<div class="body" style="border:solid #009900 1px">
<h6>Completed Lodge compalin</h6>
<h2> <?php echo $completedcomplain; ?> </h2>
<a href="complainhistory.php"><small>View Detail</small></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="../assets/bundles/vendorscripts.bundle.js"></script>
<script src="../assets/bundles/libscripts.bundle.js"></script>
<script src="../assets/bundles/c3.bundle.js"></script>
<script src="../assets/bundles/jvectormap.bundle.js"></script>
<script src="../assets/js/theme.js"></script>
<script src="../assets/js/pages/index.js"></script>
<script src="../assets/js/pages/todo-js.js"></script>
</body>
</html>
<?php } ?>
newstyle.css
body{
margin:0px;
padding:0px;
background-color: #1b203d;
overflow: hidden;
font-family: system-ui;
}
.clearfix{
clear:both;
}
.logo{
margin:0px;
margin-left: 28px;
font-weight: bold;
color: white;
margin-bottom: 30px;
font-size: 25px;
}
.logo span{
color:#f7403b;
}
.sidenav{
height: 100%;
width: 300px;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #272c4a;
overflow: hidden;
transition: 0.5s;
padding-top: 30px;
}
.sidenav a{
padding: 15px 8px 15px 32px;
text-decoration: none;
font-size: 20px;
color: #818181;
display: block;
transition: 0.3s;
}
.sidenav a:hover{
color:#f1f1f1;
background-color: #1b203d;
}
#main{
transition: margin-left .5s;
padding: 16px;
margin-Left: 300px;
}
.head{
padding: 20px;
}
.col-div-6{
width: 50%;
float: left;
}
.profile{
display: inline-block;
float: right;
width:160px;
}
.pro-img{
float: left;
width: 40px;
margin-top: 5px;
}
.pro-img p{
color: white;
font-weight: 500;
margin-left: 55px;
margin-top: 10px;
font-size: 13.5px;
}
.profile p span{
font-weight: 400;
font-size: 12px;
display: block;
color: #8e8b8b;
}
.nav2{
display: none;
}
.col-div-3{
width: 25%;
float: left;
}
.box{
width: 85%;
height: 100px;
background-color: #272c4a;
margin-left: 10px;
padding: 10px;
}
.box p{
font-size: 35px;
color: white;
font-weight: bold;
line-height: 30px;
padding-left: 10px;
margin-top: 20px;
display: inline-block;
}
.box p span{
font-size: 20px;
font-weight: 400;
color: #818181;
}
.box-icon{
font-size: 40px!important;
float: right;
margin-top: 35px!important;
color: #818181;
padding-right: 10px;
}
.col-div-8{
width:70px;
float: left;
}
.col-div-4{
width: 30%;
float: left;
}
.content-box{
padding: 20px;
}
.content-box p{
margin: 0px;
font-size: 20px;
color: #f7403b;
}
::-webkit-scrollbar{
width: 10px;
}
::-webkit-scrollbar-track{
background:#f1f1f1;
}
::-webkit-scrollbar-thumb{
background: #888;
}
::-webkit-scrollbar-thumb:hover{
background:#555;
}
.scrollbar{
background-color: #f5f5f5;
float: right;
height: 300px;
margin-bottom: 25px;
margin-right: 22px;
margin-top: 40px;
width: 65px;
overflow-y: scroll;
}
OUTPUT