Permalink
Cannot retrieve contributors at this time
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?
7032cem/artists.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
181 lines (145 sloc)
6.2 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include "dbconnection.php"; | |
include "session_check.php"; | |
if(isset($_REQUEST['del_btn'])) | |
{ | |
$d="delete from artist_tbl where aid=$_REQUEST[del_id]"; | |
$de=mysqli_query($conn,$d); | |
if($de) | |
{ | |
echo '<script>alert("Artist 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>Dabce Club - Artists</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 Artists</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="editartist.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 artist_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> | |
<th class="text-center">Name</th> | |
<th class="text-center">Date of Birth</th> | |
<th class="text-center">Email</th> | |
<th class="text-center">Height</th> | |
<th class="text-center">Mobile</th> | |
<th class="text-center">Class</th> | |
<th class="text-center">Action</th> | |
</tr> | |
</thead> | |
<tbody> | |
<?php | |
while($row=mysqli_fetch_array($qe)) | |
{ | |
echo ' | |
<tr class="text-center"> | |
<td>'.$row['aname'].'</td> | |
<td>'.$row['adob'].'</td> | |
<td >'.$row['aemail'].'</td> | |
<td >'.$row['aheight'].'</td> | |
<td >'.$row['amobile'].'</td> | |
<td >'; | |
$q2="select cname from class_tbl where cid=$row[aclass]"; | |
$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="editartist.php?id='.$row['aid'].'"><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['aid'].'"> | |
<button type="submit" name="del_btn" class="btn btn-danger"><i class="fa fa-trash"></i></button> | |
</form> | |
</div> | |
</div> | |
</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 © 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> |