Domain: amberpublishers.in
Server Adress: 86.38.243.169

privdayz.com

/home/u866425823/domains/amberpublishers.in/public_html/
Dosya Yükle :
Current File : //home/u866425823/domains/amberpublishers.in/public_html/allbooks.php

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

<?php include 'common/head.php'; ?>
<?php include 'common/helper.php';?>

<body>
<?php include 'common/header.php'; ?>
<?php require './admin/include/db.php'; ?>
<main id="main" >

<!-- ======= Breadcrumbs Section ======= -->
<section class="breadcrumbs">
  <div class="container">

    <div class="d-flex justify-content-between align-items-center">
      <h2 class="fw-bold">All Books</h2>
      <ol>
        <li><a href="./">Home</a></li>
        <li>All Books</li>
      </ol>
    </div>

  </div>
</section><!-- End Breadcrumbs Section -->
          <div class="container">
             <div class="row">
                <div class="col-lg-12">
                   <div class="table-responsive">
                      <table class="table table-bordered table-striped table-hover mt-3">
                         <thead>
                            <tr>
                               <th>Book Name</th>
                               <th>Author</th>
                               <th>ISBN</th>
                               <th>Price</th>
                               <!-- <th>Pages</th> -->
                               <th>Language</th>
                               <!-- <th>Published</th> -->
                               <th>Category</th>
                               <!-- <th>Available</th> -->
                               <th>Preview</th>
                               <!-- <th>Contents</th> -->
                            </tr>
                         </thead>
                         <tbody>
                            <?php
                               $sql = "SELECT * FROM book_details";
                               $result = mysqli_query($conn, $sql);
                               if (mysqli_num_rows($result) > 0) {
                                   while($row = mysqli_fetch_assoc($result)) {
                                       echo "<tr>";
                                       echo "<td>" . $row['title'] . "</td>";
                                       echo "<td>" . $row['author'] . "</td>";
                                       echo "<td>" . $row['ISBN'] . "</td>";
                                       echo "<td>" . $row['Price'] . "</td>";
                                      //  echo "<td>" . $row['Number_of_Pages'] . "</td>";
                                       echo "<td>" . $row['language'] . "</td>";
                                      //  echo "<td>" . $row['publishedyear'] . "</td>";
                                       echo "<td>" . $row['category'] . "</td>";
                                      //  echo "<td>" . $row['available'] . "</td>";
                                       echo "<td><a href='bookdetails.php?id=" . $row['id'] . "'><button class='btn btn-outline-dark'><i class='fa fa-eye'></i> Preview</button></a></td>";
                                      //  echo "<td><a href='bookdetails.php?id=" . $row['id'] ."><button class='btn btn-outline-dark'><i class='fa fa-download'></i> Download</button></a></td>";
                                       echo "</tr>";
                                      
                                

                                      //Creating a row in which have 2 columns one for Left that is showing Catoegory and Right that is showing Book Details
                                      // echo "<div class='row'>";
                                      // echo "<div class='col-6 col-xl-2 col-lg-2 col-md-3 col-sm-3 col-xs-2 mt-3'>";
                                      // echo "<div class='portfolio-wrap'>";
                                      // echo "<img src='assets/img/portfolio/1.jpeg' class='img-fluid' alt=''>";
                                      // echo "<div class='portfolio-info'>";
                                      // echo "<h5><strong>Book:" . substr($row['title'], 0, 23) . "...</strong></h5>";
          

                                      // echo "<p><strong>Author: " . substr($row['author'], 0, 25). "...</strong></p>";
                                      // echo "<a href='bookdetails.php?id=" . $row['id'] . "'><button class='btn btn-outline-dark mb-3'><i class='fa fa-eye'></i> Preview</button></a>";
                                      // echo "</div>";
                                      // echo "<div class='portfolio-links'>";
                                      




                                   }  
                               } else {
                                   echo "0 results";
                               }

                               //on click of image it will redirect to book details page
                               
                                
                               ?>
                         </tbody>
                      </table>
                   </div>
                </div>
            
          </div>
</main>
<!-- End #main -->

 <!-- ======= Footer ======= -->
 <?php include 'common/footer.php'; ?>
<!-- End Footer -->
</body>

</html>

coded by Privdayz.com - Visit https://privdayz.com/ for more php shells.