PNG IHDR x sBIT|d pHYs + tEXtSoftware www.inkscape.org< ,tEXtComment
<?php
require "inc/session.php";
require "include/header.php";
require "inc/process.php";
require "inc/process2.php";
?>
<style>
# About Me --------------------------------------------------------------*/ .content h3 {
font-weight: 700;
font-size: 26px;
color: #3b434a;
text-transform: uppercase;
}
ul {
list-style: none;
padding: 0;
}
ul li {
margin-bottom: 20px;
display: flex;
align-items: center;
}
ul strong {
margin-right: 10px;
}
ul i {
font-size: 16px;
margin-right: 5px;
color: #ffb727;
line-height: 0;
}
p:last-child {
margin-bottom: 0;
}
.count-box {
width: 100%;
}
.count-box i {
display: block;
font-size: 36px;
color: #ffb727;
float: left;
line-height: 0;
}
.count-box span {
font-size: 36px;
line-height: 30px;
display: block;
font-weight: 700;
color: #3b434a;
margin-left: 50px;
}
.count-box p {
padding: 15px 0 0 0;
margin: 0 0 0 50px;
font-family: "Raleway", sans-serif;
font-size: 14px;
color: #5d6a75;
}
.count-box a {
font-weight: 600;
display: block;
margin-top: 20px;
color: #5d6a75;
font-size: 15px;
font-family: "Satisfy", serif;
transition: ease-in-out 0.3s;
}
.count-box a:hover {
color: #82909c;
}
.image {
background: url("../img/me.jpg") center center no-repeat;
background-size: cover;
min-height: 500px;
}
.skills-content {
margin-top: 30px;
}
.skills-content .progress {
height: 60px;
display: block;
background: none;
border-radius: 0;
}
.skills-content .progress .skill {
padding: 10px 0;
margin: 0 0 6px 0;
text-transform: uppercase;
display: block;
font-weight: 700;
font-family: "Raleway", sans-serif;
color: #3b434a;
}
.skills-content .progress .skill .val {
float: right;
font-style: normal;
}
.skills-content .progress-bar-wrap {
background: #e6e8eb;
}
.skills-content .progress-bar {
width: 1px;
height: 10px;
transition: 0.9s;
background-color: #ffb727;
}
</style>
</style>
<body>
<?php
require "include/sidebar.php";
?>
<!-- End Sidebar-->
<main id="main" class="main">
<div class="pagetitle">
<h1>Cpanel</h1>
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="index.php">Home</a></li>
<li class="breadcrumb-item active">Admin Cpanel</li>
</ol>
</nav>
</div><!-- End Page Title -->
<section class="section dashboard">
<div class="row">
<!-- Left side columns -->
<div class="col-lg-8">
<div class="row">
<!-- Sales Card -->
<div class="col-xxl col-md">
<div class="card info-card sales-card">
<div class="card-body">
<?php
$SQL= "SELECT * FROM booking ORDER BY id DESC";
$query = mysqli_query($connection, $SQL);
$num_rows = mysqli_num_rows($query);
?>
<h5 class="card-title">Total Bookings <span>| </span></h5>
<div class="d-flex align-items-center">
<div
class="card-icon rounded-circle d-flex align-items-center justify-content-center">
<i class="fa fa-user"></i>
</div>
<div class="ps-3">
<h6><?php echo "$num_rows \n";?></h6>
</div>
</div>
</div>
</div>
</div><!-- End Sales Card -->
<!-- Sales Card -->
<div class="col-xxl col-md">
<div class="card info-card sales-card">
<div class="card-body">
<?php
$SQL= "SELECT * FROM celeb ORDER BY id DESC";
$query = mysqli_query($connection, $SQL);
$num_rows = mysqli_num_rows($query);
?>
<h5 class="card-title">All Celerities <span>| </span></h5>
<div class="d-flex align-items-center">
<div
class="card-icon rounded-circle d-flex align-items-center justify-content-center">
<i class="fa fa-user"></i>
</div>
<div class="ps-3">
<h6><?php echo "$num_rows \n";?></h6>
</div>
</div>
</div>
</div>
</div><!-- End Sales Card -->
<!-- Revenue Card -->
<div class="col-xxl col-md">
<div class="card info-card sales-card p-3 bg-white">
<?php
// Select total amount from booking
$sql_booking = "SELECT SUM(amount_paid) AS total_amount FROM booking";
$query_booking = mysqli_query($connection, $sql_booking);
$row_booking = mysqli_fetch_assoc($query_booking);
$totalBookingAmount = $row_booking['total_amount'];
// Select total amount from donation
$sql_donation = "SELECT SUM(amount) AS total_amount FROM donate";
$query_donation = mysqli_query($connection, $sql_donation);
$row_donation = mysqli_fetch_assoc($query_donation);
$totalDonationAmount = $row_donation['total_amount'];
// Select total amount from ticket
$sql_ticket = "SELECT SUM(amount_paid) AS total_amount FROM buy_ticket";
$query_ticket = mysqli_query($connection, $sql_ticket);
$row_ticket = mysqli_fetch_assoc($query_ticket);
$totalTicketAmount = $row_donation['total_amount'];
// Calculate total amount by adding amounts from booking and donation
$totalAmount = $totalBookingAmount + $totalDonationAmount + $totalTicketAmount;
?>
<h5 class="card-title">Total Revenue <span>| </span></h5>
<div class="d-flex align-items-center">
<div
class="card-icon rounded-circle d-flex align-items-center justify-content-center">
<i class="fa fa-dollar"></i>
</div>
<div class="ps-3">
<h6><?php echo number_format($totalAmount) ;?></h6>
</div>
</div>
</div>
</div><!-- End Revenue Card -->
<!-- alert start -->
<?php
if(isset($success)){
?>
<div class="alert alert-success" role="alert">
<?php echo $success;?>
</div>
<?php
}else{
if(isset($error)){
?>
<div class="alert alert-danger" role="alert">
<?php echo $error;?>
</div>
<?php
}
}
?>
<!-- Top design -->
<div class="col-12">
<div class="card top-selling overflow-auto">
<div class="card-body pb-0">
<div id="celeb">
<h5 class="card-title">All <span>Celebrity </span></h5>
<!-- Button trigger modal -->
<a href="add_celeb.php" class="btn btn-primary">
Add New Celebrity
</a>
<table class="table datatable">
<thead class="thead-light">
<th>image</th>
<th>Name</th>
<th>Category</th>
<th>Action</th>
</thead>
<tbody>
<?php
$sql_celeb ="SELECT * FROM celeb";
$count=0;
$query_celeb= mysqli_query($connection, $sql_celeb);
while ($celeb=mysqli_fetch_assoc($query_celeb)){
?>
<tr>
<td><img src="<?php echo $celeb["image"];?>" class="img-thumbnail"
alt=""></td>
<td><?php echo $celeb["name"];?></td>
<td><?php
$cid= $celeb["category_id"];
$sql_cat="SELECT * FROM category WHERE id= $cid";
$quary_cat= mysqli_query($connection, $sql_cat);
$result_cat = mysqli_fetch_assoc($quary_cat);
echo $result_cat["name"];
?></td>
<td>
<a href="?delete_celeb=<?php echo $celeb["id"];?>">Delete</a>
<a href="Edit_celeb?id=<?php echo $celeb["id"];?>">Edit</a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<div id="orphanage">
<br><br>
<hr>
<h5 class="card-title">All <span>Orphanage </span></h5>
<!-- Button trigger modal -->
<a href="add-orphange.php" class="btn btn-primary">
Add New Orphanage
</a>
<table class="table datatable">
<thead class="thead-light">
<th>image</th>
<th>Name</th>
<th>Action</th>
</thead>
<tbody>
<?php
$sql_orphan ="SELECT * FROM orphanage";
$count=0;
$query_orphan= mysqli_query($connection, $sql_orphan);
while ($orphan=mysqli_fetch_assoc($query_orphan)){
?>
<tr>
<td><img src="<?php echo $orphan["thumbnail"];?>" class="img-thumbnail"
alt=""></td>
<td><?php echo $orphan["name"];?></td>
<td>
<a href="?delete_orphan=<?php echo $orphan["id"];?>">Delete</a>
<a href="">Edit</a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<!-- fan card -->
<div id="fan">
<h5 class="card-title">All <span>Fan card </span></h5>
<!-- Button trigger modal -->
<a href="add_fancard.php" class="btn btn-primary">
Add New Orphanage
</a>
<table class="table datatable">
<thead class="thead-light">
<th>image</th>
<th>Name</th>
<th>Price</th>
<th>Action</th>
</thead>
<tbody>
<?php
$sql_fan ="SELECT * FROM fan_card";
$count=0;
$query_fan= mysqli_query($connection, $sql_fan);
while ($fan=mysqli_fetch_assoc($query_fan)){
?>
<tr>
<td><img src="<?php echo $fan["thumbnail"];?>" class="img-thumbnail"
alt=""></td>
<td><?php echo $fan["name"];?></td>
<td><?php echo $fan["price"];?></td>
<td>
<a href="?delete_fan=<?php echo $fan["id"];?>">Delete</a>
<!-- <a href="Edit_fan?id=<?php echo $fan["id"];?>">Edit</a> -->
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<div id="booking">
<br>
<br>
<h5 class="card-title" id="">All Booking <span>table </span></h5>
<table class="table datatable" id="">
<thead class="thead-light">
<tr>
<th scope="col">S/N</th>
<th scope="col">Name</th>
<th scope="col">Celeb.</th>
<th scope="col">Type</th>
<th scope="col">Amount Paid</th>
<th scope="col">date of booking</th>
<th scope="col">action</th>
</tr>
</thead>
<tbody>
<?php
$sql ="SELECT * FROM booking";
$count=0;
$query= mysqli_query($connection, $sql);
while ($booking=mysqli_fetch_assoc($query)){
?>
<tr>
<th scope="row"><?php echo ++$count;?></th>
<td><?php echo $booking["name"];
?> </td>
<td><?php $celeb_id= $booking["celeb_id"];
$sql_type ="SELECT * FROM celeb WHERE id= $celeb_id";
$query_celeb= mysqli_query($connection, $sql_celeb);
$result_celeb= mysqli_fetch_assoc($query_celeb);
echo $result_celeb["name"];
?></td>
<td><?php $type= $booking["type_id"];
$sql_type ="SELECT * FROM type WHERE id= $type";
$query_type= mysqli_query($connection, $sql_type);
$result_type= mysqli_fetch_assoc($query_type);
echo $result_type["name"];
?></td>
<td><?php echo $booking["amount_paid"]; ?></td>
<td><?php
$booking["timestamp"]; // Example Unix timestamp
$dateString = $booking["timestamp"];
$timestamp = strtotime($dateString);
$dateOnly = date("Y-M-d", $timestamp);
echo $dateOnly;
?>
<td>
<a class="btn btn-success btn-sm"
href="veiw.php?veiw_booking=<?php echo $booking["id"];?>">Veiw</a>
<a href="?delete_booking=<?php echo $booking["id"];?>"
class="btn btn-danger btn-sm">Delete</a>
</td>
</td>
</tr>
<?php
}
?>
</tbody>
<!-- Button trigger modal -->
</table>
</div>
<div id="donate">
<br>
<br>
<h5 class="card-title">Donation table <span> </span></h5>
<!-- Button trigger modal -->
<table class="table datatable">
<thead class="thead-light">
<tr>
<th scope="col">S/N</th>
<th scope="col">name</th>
<th scope="col">email</th>
<th scope="col">Donated to </th>
<th scope="col">Amount</th>
<th scope="col">date </th>
<th scope="col">action</th>
</tr>
</thead>
<tbody>
<?php
$sql ="SELECT * FROM donate";
$count=0;
$query= mysqli_query($connection, $sql);
while ($achieve=mysqli_fetch_assoc($query)){
?>
<tr>
<th scope="row"><?php echo ++$count;?></th>
<td><?php echo $achieve["name"]; ?> </td>
<td><?php echo $achieve["email"]; ?> </td>
<td><?php $cel_id= $achieve["celeb_id"];
$sql1 ="SELECT * FROM celeb WHERE id =$cel_id";
$query1= mysqli_query($connection, $sql1);
$cel=mysqli_fetch_assoc($query1);
echo $cel["name"];
?></td>
<td>
<?php echo $achieve["amount"]; ?>
</td>
<td><?php echo $achieve["timestamp"]; ?></td>
<td> <a href="?delete_donation=<?php echo $achieve["id"];?>"
class="btn btn-danger btn-sm">Delete</a></td>
</tr>
<?php
}
?>
</tbody>
<!-- Button trigger modal -->
</table>
</div>
<div class="modal fade" id="achModal" tabindex="-1" role="dialog"
aria-labelledby="achModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="achModalLabel">Add new Achivement</h5>
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form action="" method="POST">
<input type="text" class="form-control" required id=""
name="name" placeholder="Enter your Achivemrnt">
<br>
<input type="text" class="form-control" required id=""
name="amount" placeholder="How many of this have you got?">
<br>
<input type="text" class="form-control" required id=""
name="detail" placeholder="short description">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary"
data-dismiss="modal">Close</button>
<button type="submit" name="ach" class="btn btn-primary">Add
skill</button>
</form>
</div>
</div>
</div>
</div>
</div>
<div id="ticket">
<br>
<br>
<h5 class="card-title">Ticket Purchase <span> </span></h5>
<!-- Button trigger modal -->
<table class="table datatable">
<thead class="thead-light">
<tr>
<th scope="col">S/N</th>
<th scope="col">name</th>
<th scope="col">email</th>
<th scope="col">Event </th>
<th scope="col">Amount Paid</th>
<th scope="col">action</th>
</tr>
</thead>
<tbody>
<?php
$sql ="SELECT * FROM buy_ticket";
$count=0;
$query= mysqli_query($connection, $sql);
while ($ticket=mysqli_fetch_assoc($query)){
?>
<tr>
<th scope="row"><?php echo ++$count;?></th>
<td><?php echo $ticket["name"]; ?> </td>
<td><?php echo $ticket["email"]; ?> </td>
<td><?php $ticket_id= $ticket["ticket_id"];
$sql1 ="SELECT * FROM ticket WHERE id =$ticket_id";
$query1= mysqli_query($connection, $sql1);
$cel=mysqli_fetch_assoc($query1);
echo $cel["name"];
?></td>
<td>
<?php echo $ticket["amount_paid"]; ?>
</td>
<td> <a href="?delete_purchase=<?php echo $ticket["id"];?>"
class="btn btn-danger btn-sm">Delete</a>
<a href="veiw.php?ticket=<?php echo $ticket["id"];?>"
class="btn btn-success btn-sm">Veiw</a>
</td>
</tr>
<?php
}
?>
</tbody>
<!-- Button trigger modal -->
</table>
</div>
<div class="modal fade" id="achModal" tabindex="-1" role="dialog"
aria-labelledby="achModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="achModalLabel">Add new Achivement</h5>
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form action="" method="POST">
<input type="text" class="form-control" required id="" name="name"
placeholder="Enter your Achivemrnt">
<br>
<input type="text" class="form-control" required id="" name="amount"
placeholder="How many of this have you got?">
<br>
<input type="text" class="form-control" required id="" name="detail"
placeholder="short description">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary"
data-dismiss="modal">Close</button>
<button type="submit" name="ach" class="btn btn-primary">Add
skill</button>
</form>
</div>
</div>
</div>
</div>
</div>
<br>
<!-- Modal -->
<div class="modal fade" id="skillModal" tabindex="-1" role="dialog"
aria-labelledby="skillModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="skillModalLabel">Add new Skill</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form action="" method="POST">
<input type="text" class="form-control" required id="" name="name"
placeholder="Enter your skill">
<br>
<input type="text" class="form-control" required id="" name="progress"
placeholder="on A scale of 1- 100, enter how good you are with the skill">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary"
data-dismiss="modal">Close</button>
<button type="submit" name="skill" class="btn btn-primary">Add
skill</button>
</form>
</div>
</div>
</div>
<!-- Modal for acheivement -->
</div>
</div>
</div>
<!-- Right side columns -->
<!-- End Right side columns -->
</div><!-- End Top Selling -->
<div class="col-lg-4">
<!-- Category/category-->
<div class="card mt-2">
<div class="card-body">
<br>
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal"
data-target="#exampleModal">
Add Category
</button>
</div>
<!-- Button trigger modal -->
<h3> Celebrity Category</h3>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Title</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody>
<?php
$SQL= "SELECT * FROM category ";
$query = mysqli_query($connection, $SQL);
$counter=0;
while ($result=mysqli_fetch_assoc($query))
{
?>
<tr>
<td><?php echo ++$counter;?></td>
<td><?php echo $result["name"];?></td>
<td>
<div class="d-block">
<a href="?delete_cat=<?php echo $result["id"];?>">Delete</a>
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal"
data-target="#edit">
Edit
</button>
<!-- Modal -->
<div class="modal fade" id="edit" tabindex="-1" role="dialog"
aria-labelledby="editLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="editLabel">Edit Category
</h5>
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form action="" method="post">
<input type="text" name="cat"
value="<?php echo $result["name"];?>"
class="form-control">
<input type="text" name="id"
value="<?php echo $result["id"];?>" hidden
class="form-control">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary"
data-bs-dismiss="modal">Close</button>
<button type="sumbit" name="Edit_cat"
class="btn btn-primary">Update category</button>
</div>
</div>
</form>
</div>
</div>
</div>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<!-- Booking type -->
<div class="card">
<div class="card-body pb-0">
<h5 class="card-title">Booking types</h5>
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#typeModal">
Add Booking Types
</button>
<table class="table">
<thead>
<th>SN</th>
<th>Type</th>
<th>Price ($)</th>
<th>Action</th>
</thead>
<tbody>
<?php
$SQL_type= "SELECT * FROM type ";
$query_type = mysqli_query($connection, $SQL_type);
$counter=0;
while ($result_type=mysqli_fetch_assoc($query_type))
{
?>
<tr>
<td><?php echo ++$counter; ?></td>
<td><?php echo $result_type["name"];?> </td>
<td><?php echo $result_type["price"];?> </td>
<td>
<td>
<div class="d-block">
<a href="?delete_type=<?php echo $result_type["id"];?>">Delete</a>
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal"
data-target="#type">
Edit
</button>
<!-- Modal -->
<div class="modal fade" id="type" tabindex="-1" role="dialog"
aria-labelledby="typeLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="typeLabel">Edit Booking Type
</h5>
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form action="" method="post">
<input type="text" name="type"
value="<?php echo $result_type["name"];?>"
class="form-control">
<br>
<input type="text" name="price"
value="<?php echo $result_type["price"];?>"
class="form-control">
<input type="text" name="id"
value="<?php echo $result_type["id"];?>" hidden
class="form-control">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary"
data-bs-dismiss="modal">Close</button>
<button type="sumbit" name="Edit_cat"
class="btn btn-primary">Update Booking Type</button>
</div>
</div>
</form>
</div>
</div>
</div>
</td>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div><!-- End Website Traffic -->
</div>
<!-- End Left side columns -->
<!-- boking type Modal -->
<div class="modal fade" id="typeModal" tabindex="-1" role="dialog" aria-labelledby="typeModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="typeModalLabel">Add Booking Type</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form action="" method="post">
<input type="text" name="type" class="form-control"
placeholder="Enter Booking Type">
<br>
<input type="number" name="price" class="form-control"
placeholder="Enter the price ">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" name="add_type" class="btn btn-primary">Save</button>
</form>
</div>
</div>
</div>
</div>
<!-- category Modal -->
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">New Category</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form action="" method="post">
<input type="text" class="form-control" name="name" id="">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="submit" name="add-cat" class="btn btn-primary">Add
Category</button>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
</main><!-- End #main -->
<!-- ======= Footer ======= -->
<?php
require "include/footer.php";
?>
</body>
</html>
b IDATxytVսϓ22 A@IR:hCiZ[v*E:WũZA ^dQeQ @ !jZ'>gsV仿$|?g)&x-E