Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<?php
include "dbconnection.php";
include "session_check.php";
if(isset($_REQUEST['del_btn']))
{
$d="delete from class_tbl where cid=$_REQUEST[del_id]";
$de=mysqli_query($conn,$d);
if($de)
{
echo '<script>alert("Class record deleted Successfully");</script>';
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>SB Admin 2 - Dashboard</title>
<!-- Custom fonts for this template-->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
<!-- Custom styles for this template-->
<link href="css/sb-admin-2.min.css" rel="stylesheet">
</head>
<body id="page-top">
<!-- Page Wrapper -->
<div id="wrapper">
<?php include "sidenavbar.php"; ?>
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<?php include "header.php"; ?>
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800">All Classes</h1>
<!-- <p class="mb-4">DataTables is a third party plugin that is used to generate the demo table below. For more information about DataTables, please visit the <a target="_blank" href="https://datatables.net">official DataTables documentation</a>.</p> -->
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 style="display:inline-block;" class="m-0 font-weight-bold text-primary">Available Records</h6>
<a style="float:right;" href="editclass.php"><button class="btn btn-primary"><i class="fa fa-plus"></i> Add New</button></a>
</div>
<div class="card-body">
<div class="table-responsive">
<?php
$q="Select * from class_tbl";
$qe=mysqli_query($conn,$q);
if(mysqli_num_rows($qe)>0)
{ ?>
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr class="text-center">
<th>Class #</th>
<th>Name</th>
<th>Allowed Strength</th>
<th>Class Dance</th>
<th>Current Strength</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
while($row=mysqli_fetch_array($qe))
{
echo '
<tr class="text-center">
<td>'.$row['cid'].'</td>
<td>'.$row['cname'].'</td>
<td >'.$row['cartist_allowed'].'</td>
<td >'.$row['cdance_type'].'</td>
<td>';
$q2="select count(*) as total from artist_tbl where aclass=$row[cid]";
$q2e=mysqli_query($conn,$q2);
if(mysqli_num_rows($q2e)>0)
{
$q2r=mysqli_fetch_array($q2e);
echo $q2r['total'];
}
else
{
echo '0';
}
echo '</td>
<td class="text-center">
<a style="display:block;" href="editclass.php?id='.$row['cid'].'"><button class="btn btn-warning"><i class="fa fa-wrench"></i></button></a>
<form method="POST" style="display:block;margin-top:10px;">
<input type="hidden" name="del_id" value="'.$row['cid'].'">
<button type="submit" name="del_btn" class="btn btn-danger"><i class="fa fa-trash"></i></button>
</form>
</td>
</tr>';
}
?>
</tbody>
</table>
<?php
}
else
{
echo "No record Found.";
}
?>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
<!-- Footer -->
<footer class="sticky-footer bg-white">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>Copyright &copy; Dance Club - <?php echo date("Y"); ?></span>
</div>
</div>
</footer>
<!-- End of Footer -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin-2.min.js"></script>
<!-- Page level plugins -->
<script src="vendor/chart.js/Chart.min.js"></script>
<!-- Page level custom scripts -->
<script src="js/demo/chart-area-demo.js"></script>
<script src="js/demo/chart-pie-demo.js"></script>
</body>
</html>