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 injury_tbl where injid=$_REQUEST[del_id]";
$de=mysqli_query($conn,$d);
if($de)
{
echo '<script>alert("Injury 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 Attendence</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="width:fit-content;float:left;" class="m-0 font-weight-bold text-primary">Available Records</h6>
<form action="editattendence.php" style="float:right;width:fit-content;display:flex;">
<select name="cid" class="form-control" style="" required>
<option value="">Select Class</option>
<?php
$q="select cid,cname from class_tbl where cstatus=1";
$qe=mysqli_query($conn,$q);
if(mysqli_num_rows($qe)>0)
{
while($row=mysqli_fetch_array($qe))
{
echo '<option value="'.$row['cid'].'">'.$row['cname'].'</option>';
}
}
?>
</select>
<button type="submit" style="width:220px;margin-left:20px;" class="btn btn-primary"><i class="fa fa-plus"></i> Add New</button>
</form>
</div>
<div class="card-body">
<div class="table-responsive">
<?php
$q="Select count(*) as artist,attdate,attclassid from attendence_tbl group by attdate";
$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>Total Artist</th>
<th>Attendence Date</th>
<th>Class</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
while($row=mysqli_fetch_array($qe))
{
echo '
<tr class="text-center">
<td>'.$row['artist'].'</td>
<td>'.$row['attdate'].'</td>
<td>';
$q2="select cname from class_tbl where cid=$row[attclassid]";
$q2e=mysqli_query($conn,$q2);
if(mysqli_num_rows($q2e)>0)
{
$q2r=mysqli_fetch_array($q2e);
echo $q2r['cname'];
}
echo '</td>
<td class="text-center">
<a style="display:block;" href="editattendence.php?id='.$row['attclassid'].'&date='.$row['attdate'].'"><button class="btn btn-warning"><i class="fa fa-info"></i> View Detail</button></a>
</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>