0% found this document useful (0 votes)
26 views

Code Rtbs

This PHP code is for a restaurant table booking system. It includes a form that allows users to enter their name, email, phone number, number of guests, and desired booking date and time. When submitted, the form data is inserted into a database table. It then confirms the booking and displays the booking number. The code also includes a page to view the booking details for a given booking ID from the database.

Uploaded by

Bhanu Royal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Code Rtbs

This PHP code is for a restaurant table booking system. It includes a form that allows users to enter their name, email, phone number, number of guests, and desired booking date and time. When submitted, the form data is inserted into a database table. It then confirms the booking and displays the booking number. The code also includes a page to view the booking details for a given booking ID from the database.

Uploaded by

Bhanu Royal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Index.

php
<?php include_once('admin/includes/config.php');

if(isset($_POST['submit'])){

$fname=$_POST['name'];
$emailid=$_POST['email'];
$phonenumber=$_POST['phonenumber'];
$bookingdate=$_POST['bookingdate'];
$bookingtime=$_POST['bookingtime'];
$noadults=$_POST['noadults'];
$nochildrens=$_POST['nochildrens'];
$bno=mt_rand(100000000,9999999999);
//Code for Insertion
$query=mysqli_query($con,"insert into
tblbookings(bookingNo,fullName,emailId,phoneNumber,bookingDate,bookingTime,noAdults,n
oChildrens)
values('$bno','$fname','$emailid','$phonenumber','$bookingdate','$bookingtime','$noadults','$noc
hildrens')");
if($query){
echo '<script>alert("Your order sent successfully. Booking number is "+"'.$bno.'")</script>';
echo "<script type='text/javascript'> document.location = 'index.php'; </script>";
} else {
echo "<script>alert('Something went wrong. Please try again.');</script>";
}

?>
<!DOCTYPE html>
<html lang="en">

<head>
<title>Restaurent Table Booking System</title>
<!-- Meta tags -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content=""
/>
<script type="application/x-javascript">
addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);
function hideURLbar(){ window.scrollTo(0,1); }
</script>
<!-- Meta tags -->
<!--stylesheets-->
<link href="css/style.css" rel='stylesheet' type='text/css' media="all">
<!--//style sheet end here-->
<!-- Calendar -->
<link rel="stylesheet" href="css/jquery-ui.css" />
<!-- //Calendar -->
<link href="css/wickedpicker.css" rel="stylesheet" type='text/css' media="all" />
<!-- Time-script-CSS -->

<link href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700"
rel="stylesheet">
</head>

<body>
<h1 class="header-w3ls">
Table Booking Form</h1>
<div class="appointment-w3">
<form action="#" method="post">
<div class="personal">

<div class="main">
<div class="form-left-w3l">

<input type="text" class="top-up" name="name"


placeholder="Name" required="">
</div>
<div class="form-left-w3l">

<input type="email" name="email"


placeholder="Email" required="">
</div>
<div class="form-right-w3ls ">

<input class="buttom" type="text"


name="phonenumber" placeholder="Phone Number" required="">
<div class="clearfix"></div>
</div>
</div>

</div>
<div class="information">

<div class="main">
<div class="form-left-w3l">
<input id="datepicker" name="bookingdate"
type="text" placeholder="Booking Date &" required="">
<input type="text" id="timepicker"
name="bookingtime" class="timepicker form-control hasWickedpicker" placeholder="Time"
required=""
onkeypress="return false;">
<div class="clear"></div>
</div>
</div>

<div class="main">

<div class="form-left-w3l">
<select class="form-control" name="noadults"
required>
<option value="">Number of Adults</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
</div>
<div class="form-right-w3ls">
<select class="form-control" name="nochildrens"
required>
<option value="">Number of Children</option>
<option value="1">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
</div>
</div>

</div>

<div class="btnn">
<input type="submit" value="Reserve a Table" name="submit">
</div>
<div class="copy">
<p>Check Booking <a href="check-status.php" target="_blank">Status</a></p>
</div>
<div class="copy">
<p>Admin Panel<a href="admin/" target="_blank"> Login here</a></p>
</div>
</form>
</div>

<!-- js -->
<script type='text/javascript' src='js/jquery-2.2.3.min.js'></script>
<!-- //js -->
<!-- Calendar -->
<script src="js/jquery-ui.js"></script>
<script>
$(function () {
$("#datepicker,#datepicker1,#datepicker2,#datepicker3").datepicker();
});
</script>
<!-- //Calendar -->
<!-- Time -->
<script type="text/javascript" src="js/wickedpicker.js"></script>
<script type="text/javascript">
$('.timepicker,.timepicker1').wickedpicker({ twentyFour: false });
</script>
<!-- //Time -->

</body>

</html>
Booking_Details.php
<?php session_start();
//error_reporting(0);
// Database Connection
include('admin/includes/config.php');

?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Restaurent Table Booking System | Booking Details</title>

<!-- Google Font: Source Sans Pro -->


<link rel="stylesheet" href="https://fonts.googleapis.com/css?
family=Source+Sans+Pro:300,400,400i,700&display=fallback">
<!-- Font Awesome -->
<link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css">
<!-- DataTables -->
<link rel="stylesheet" href="plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
<link rel="stylesheet" href="plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
<link rel="stylesheet" href="plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/adminlte.min.css">
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
<!-- Navbar -->
<!-- Content Wrapper. Contains page content -->
<div>
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Booking Details</h1>
</div>

</div>
</div><!-- /.container-fluid -->
</section>

<!-- Main content -->


<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">

<div class="card">
<div class="card-header">
<h3 class="card-title">Booking Details</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<table id="example1" class="table table-bordered table-striped">

<tbody>
<?php $bid=intval($_GET['bid']);
$query=mysqli_query($con,"select * from tblbookings where id='$bid'");
$cnt=1;
while($result=mysqli_fetch_array($query)){
?>

<tr>
<th>Booking Number</th>
<td colspan="3"><?php echo $result['bookingNo']?></td>
</tr>

<tr>
<th> Name</th>
<td><?php echo $result['fullName']?></td>
<th>Email Id</th>
<td> <?php echo $result['emailId']?></td>
</tr>
<tr>
<th> Mobile No</th>
<td><?php echo $result['phoneNumber']?></td>
<th>No of Adults</th>
<td><?php echo $result['noAdults']?></td>
</tr>
<tr>
<th>No of Childs</th>
<td><?php echo $result['noChildrens']?></td>
<th>Booking Date / Time</th>
<td><?php echo $date=$result['bookingDate']?>/<?php echo
$btime=$result['bookingTime']?></td>
</tr>
<tr>
<th>Posting Date</th>
<td colspan="3"><?php echo $result['postingDate']?></td>
</tr>

<?php if($result['boookingStatus']!=''):?>
<tr>
<th>Booking Status</th>
<td><?php echo $result['boookingStatus']?></td>
<th>Updation Date</th>
<td><?php echo $result['updationDate']?></td>
</tr>

<tr>
<th> Remark</th>
<td colspan="3"><?php echo $result['adminremark']?></td>
</tr>
<?php endif;?>

<?php $cnt++;} ?>


</tbody>

</table>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->

</div>
<!-- ./wrapper -->
<!-- jQuery -->
<script src="plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- DataTables & Plugins -->
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="plugins/jszip/jszip.min.js"></script>
<script src="plugins/pdfmake/pdfmake.min.js"></script>
<script src="plugins/pdfmake/vfs_fonts.js"></script>
<script src="plugins/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="plugins/datatables-buttons/js/buttons.print.min.js"></script>
<script src="plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
<!-- AdminLTE App -->
<script src="../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../dist/js/demo.js"></script>
<!-- Page specific script -->
<script>
$(function () {
$("#example1").DataTable({
"responsive": true, "lengthChange": false, "autoWidth": false,
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
}).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
$('#example2').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false,
"responsive": true,
});
});
</script>
<script type="text/javascript">

//For report file


$('#rtable').hide();
$(document).ready(function(){
$('#status').change(function(){
if($('#status').val()=='Accepted')
{
$('#rtable').show();
jQuery("#table").prop('required',true);
}
else{
$('#rtable').hide();
}
})})
</script>
</body>
</html>
Check_status.php
<?php include_once('admin/includes/config.php');

if(isset($_POST['submit'])){

$fname=$_POST['name'];
$emailid=$_POST['email'];
$phonenumber=$_POST['phonenumber'];
$bookingdate=$_POST['bookingdate'];
$bookingtime=$_POST['bookingtime'];
$noadults=$_POST['noadults'];
$nochildrens=$_POST['nochildrens'];
$bno=mt_rand(100000000,9999999999);
//Code for Insertion
$query=mysqli_query($con,"insert into
tblbookings(bookingNo,fullName,emailId,phoneNumber,bookingDate,bookingTime,noAdults,n
oChildrens)
values('$bno','$fname','$emailid','$phonenumber','$bookingdate','$bookingtime','$noadults','$noc
hildrens')");
if($query){
echo '<script>alert("Your order sent successfully. Booking number is "+"'.$bno.'")</script>';
echo "<script type='text/javascript'> document.location = 'index.php'; </script>";
} else {
echo "<script>alert('Something went wrong. Please try again.');</script>";
}
}

?>
<!DOCTYPE html>
<html lang="en">

<head>
<title>Restaurent Table Booking System</title>
<!-- Meta tags -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content=""
/>
<script type="application/x-javascript">
addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);
function hideURLbar(){ window.scrollTo(0,1); }
</script>
<!-- Meta tags -->
<!--stylesheets-->
<link href="css/style.css" rel='stylesheet' type='text/css' media="all">
<!--//style sheet end here-->
<!-- Calendar -->
<link rel="stylesheet" href="css/jquery-ui.css" />
<!-- //Calendar -->
<link href="css/wickedpicker.css" rel="stylesheet" type='text/css' media="all" />
<!-- Time-script-CSS -->
<link href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700"
rel="stylesheet">
</head>

<body>
<h1 class="header-w3ls">
RTBS | Check Status</h1>
<div class="appointment-w3">
<form action="search-result.php" method="post">
<div class="personal">

<div class="main">
<div class="form-left-w3l">

<input type="text" class="top-up"


name="searchdata" placeholder="Search by booking no or contact no" required="">
</div>

</div>

<div class="btnn">
<input type="submit" value="Search" name="submit">
</div>
<div class="copy">
<p>Check Booking <a href="check-status.php" target="_blank">Status</a></p>
</div>
<div class="copy">
<p>Admin Panel<a href="admin/" target="_blank"> Login here</a></p>
</div>
</form>
</div>

<!-- js -->
<script type='text/javascript' src='js/jquery-2.2.3.min.js'></script>
<!-- //js -->
<!-- Calendar -->
<script src="js/jquery-ui.js"></script>
<script>
$(function () {
$("#datepicker,#datepicker1,#datepicker2,#datepicker3").datepicker();
});
</script>
<!-- //Calendar -->
<!-- Time -->
<script type="text/javascript" src="js/wickedpicker.js"></script>
<script type="text/javascript">
$('.timepicker,.timepicker1').wickedpicker({ twentyFour: false });
</script>
<!-- //Time -->

</body>
</html>
Add_table.php
<?php session_start();
// Database Connection
include('includes/config.php');
//Validating Session
if(strlen($_SESSION['aid'])==0)
{
header('location:index.php');
}
else{
// Code for Add New Teacher
if(isset($_POST['submit'])){
//Getting Post Values
$tno=$_POST['tableno'];
$addedby=$_SESSION['aid'];
$query=mysqli_query($con,"insert into tblrestables(tableNumber,AddedBy)
values('$tno','$addedby')");
if($query){
echo "<script>alert('Table added successfully.');</script>";
echo "<script type='text/javascript'> document.location = 'add-table.php'; </script>";
} else {
echo "<script>alert('Something went wrong. Please try again.');</script>";
}
}

?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Restaurent Table Booking System | Add Table</title>

<link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css">

<link rel="stylesheet" href="../plugins/tempusdominus-bootstrap-4/css/tempusdominus-


bootstrap-4.min.css">
<!-- Select2 -->
<link rel="stylesheet" href="../plugins/select2/css/select2.min.css">
<link rel="stylesheet" href="../plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">
<!-- Bootstrap4 Duallistbox -->
<link rel="stylesheet" href="../plugins/bootstrap4-duallistbox/bootstrap-duallistbox.min.css">
<!-- BS Stepper -->
<link rel="stylesheet" href="../plugins/bs-stepper/css/bs-stepper.min.css">
<!-- dropzonejs -->
<link rel="stylesheet" href="../plugins/dropzone/min/dropzone.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="../dist/css/adminlte.min.css">
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
<!-- Navbar -->
<?php include_once("includes/navbar.php");?>
<!-- /.navbar -->

<!-- Main Sidebar Container -->


<?php include_once("includes/sidebar.php");?>

<!-- Content Wrapper. Contains page content -->


<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Add Table</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="dashboard.php">Dashboard</a></li>
<li class="breadcrumb-item active">Add Table</li>
</ol>
</div>
</div>
</div><!-- /.container-fluid -->
</section>

<!-- Main content -->


<section class="content">
<div class="container-fluid">
<div class="row">
<!-- left column -->
<div class="col-md-8">
<!-- general form elements -->
<div class="card card-primary">
<div class="card-header">
<h3 class="card-title">Table Details</h3>
</div>
<!-- /.card-header -->
<!-- form start -->
<form name="addlawyer" method="post" enctype="multipart/form-data">
<div class="card-body">

<!-- Table No--->


<div class="form-group">
<label for="exampleInputFullname">Table No</label>
<input type="text" class="form-control" id="tableno" name="tableno"
placeholder="Enter Table Number" required>
</div>

<div class="card-footer">
<button type="submit" class="btn btn-primary" name="submit"
id="submit">Submit</button>
</div>

</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!--/.col (left) -->

</form>

</div>
<!-- /.row -->
</div><!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php include_once('includes/footer.php');?>

</div>
<!-- ./wrapper -->
<!-- jQuery -->
<script src="../plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- bs-custom-file-input -->
<script src="../plugins/bs-custom-file-input/bs-custom-file-input.min.js"></script>
<!-- AdminLTE App -->
<script src="../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../dist/js/demo.js"></script>
<!-- Page specific script -->
<script src="../plugins/select2/js/select2.full.min.js"></script>
<script>
$(function () {
bsCustomFileInput.init();
});
$(function () {
//Initialize Select2 Elements
$('.select2').select2()

//Initialize Select2 Elements


$('.select2bs4').select2({
theme: 'bootstrap4'
})
});
</script>
</body>
</html>
<?php } ?>
All_bookings.php
<?php session_start();
error_reporting(0);
// Database Connection
include('includes/config.php');
//Validating Session
if(strlen($_SESSION['aid'])==0)
{
header('location:index.php');
}
else{

?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Restaurent Table Booking System | All Bookings</title>

<!-- Google Font: Source Sans Pro -->


<link rel="stylesheet" href="https://fonts.googleapis.com/css?
family=Source+Sans+Pro:300,400,400i,700&display=fallback">
<!-- Font Awesome -->
<link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css">
<!-- DataTables -->
<link rel="stylesheet" href="../plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
<link rel="stylesheet"
href="../plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
<link rel="stylesheet" href="../plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="../dist/css/adminlte.min.css">
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
<!-- Navbar -->
<?php include_once("includes/navbar.php");?>
<!-- /.navbar -->

<?php include_once("includes/sidebar.php");?>

<!-- Content Wrapper. Contains page content -->


<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>All Bookings</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="dashboard.php">Home</a></li>
<li class="breadcrumb-item active">All Bookings</li>
</ol>
</div>
</div>
</div><!-- /.container-fluid -->
</section>

<!-- Main content -->


<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">

<div class="card">
<div class="card-header">
<h3 class="card-title">Bookings Details</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>#</th>
<th>Bookings No</th>
<th>Name</th>
<th>Email Id</th>
<th>Mobile No</th>
<th>No. Adults</th>
<th>No of Childrens</th>
<th>Boking Date/Time</th>
<th>Posting Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $query=mysqli_query($con,"select * from tblbookings ");
$cnt=1;
while($result=mysqli_fetch_array($query)){
?>

<tr>
<td><?php echo $cnt;?></td>
<td><?php echo $result['bookingNo']?></td>
<td><?php echo $result['fullName']?></td>
<td><?php echo $result['emailId']?></td>
<td><?php echo $result['phoneNumber']?></td>
<td><?php echo $result['noAdults']?></td>
<td><?php echo $result['noChildrens']?></td>
<td><?php echo $result['bookingDate']?>/<?php echo
$result['bookingTime']?></td>
<td><?php echo $result['postingDate']?></td>
<th>
<a href="booking-details.php?bid=<?php echo $result['id'];?>" title="View Details"
class="btn btn-primary btn-xm"> View Details</a>
</th>
</tr>
<?php $cnt++;} ?>
</tbody>
<tfoot>
<tr>
<th>#</th>
<th>Bookings No</th>
<th>Name</th>
<th>Email Id</th>
<th>Mobile No</th>
<th>No. Adults</th>
<th>No of Childrens</th>
<th>Boking Date/Time</th>
<th>Posting Date</th>
<th>Action</th>
</tr>
</tfoot>
</table>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php include_once('includes/footer.php');?>

<!-- Control Sidebar -->


<aside class="control-sidebar control-sidebar-dark">
<!-- Control sidebar content goes here -->
</aside>
<!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->

<!-- jQuery -->


<script src="../plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- DataTables & Plugins -->
<script src="../plugins/datatables/jquery.dataTables.min.js"></script>
<script src="../plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="../plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="../plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="../plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="../plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="../plugins/jszip/jszip.min.js"></script>
<script src="../plugins/pdfmake/pdfmake.min.js"></script>
<script src="../plugins/pdfmake/vfs_fonts.js"></script>
<script src="../plugins/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="../plugins/datatables-buttons/js/buttons.print.min.js"></script>
<script src="../plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
<!-- AdminLTE App -->
<script src="../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../dist/js/demo.js"></script>
<!-- Page specific script -->
<script>
$(function () {
$("#example1").DataTable({
"responsive": true, "lengthChange": false, "autoWidth": false,
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
}).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
$('#example2').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false,
"responsive": true,
});
});
</script>
</body>
</html>
<?php } ?>

You might also like