D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home3
/
encodto1
/
universalhomedecor.in
/
admin
/
Filename :
testimonial.php
back
Copy
<?php session_start(); include 'config.php'; if (!isset($_SESSION['admin_name'])) { echo '<script>window.location.href = "login.php";</script>'; exit; } // Function to get the current page name function getCurrentPage() { return basename($_SERVER['PHP_SELF']); } // Variable to hold the current page name $current_page = getCurrentPage(); ?> <!DOCTYPE html> <html lang="en"> <head> <?php include('style.php'); ?> </head> <body onload="startTime()"> <!-- loader starts--> <!-- loader ends--> <!-- tap on top starts--> <!-- tap on tap ends--> <!-- page-wrapper Start--> <div class="page-wrapper compact-wrapper" id="pageWrapper"> <!-- Page Header Start--> <div class="page-header"> <div class="header-wrapper row m-0"> <div class="header-logo-wrapper col-auto p-0"> <div class="logo-wrapper"><a href="index.php"><img class="img-fluid for-light" src="assets/images/logo.png" alt=""><img class="img-fluid for-dark" src="assets/images/logo.png" alt=""></a></div> </div> <div class="left-header col-xxl-5 col-xl-6 col-md-4 col-auto box-col-6 horizontal-wrapper p-0"> <div class="left-menu-header"> <ul class="header-left"> <li> <div class="form-group w-100"> <div class="Typeahead Typeahead--twitterUsers"> <div class="u-posRelative d-flex"> <svg class="search-bg svg-color me-2"> <use href="https://admin.pixelstrap.net/crocs/assets/svg/icon-sprite.svg#fill-search"></use> </svg> <input class="demo-input py-0 Typeahead-input form-control-plaintext w-100" type="text" placeholder="Search anything..." name="q" title=""> </div> </div> </div> </li> </ul> </div> </div> <div class="nav-right col-xxl-7 col-xl-6 col-auto box-col-6 pull-right right-header p-0 ms-auto"> <ul class="nav-menus"> <li class="serchinput"> <div class="serchbox"> <svg> <use href="https://admin.pixelstrap.net/crocs/assets/svg/icon-sprite.svg#fill-search"></use> </svg> </div> <div class="form-group search-form"> <input type="text" placeholder="Search here..."> </div> </li> <li> <div class="mode"> <svg> <use href="https://admin.pixelstrap.net/crocs/assets/svg/icon-sprite.svg#fill-dark"></use> </svg> </div> </li> <li class="profile-nav onhover-dropdown p-0"> <div class="d-flex align-items-center profile-media"><img class="b-r-10 img-40" src="assets/images/dashboard/profile.png" alt=""> <div class="flex-grow-1"><span>Universal</span> <p class="mb-0">Home Decor </p> </div> </div> </li> </ul> </div> <script class="result-template" type="text/x-handlebars-template"> <div class="ProfileCard u-cf"> <div class="ProfileCard-avatar"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-airplay m-0"><path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon></svg></div> <div class="ProfileCard-details"> <div class="ProfileCard-realName">{{name}}</div> </div> </div> </script> <script class="empty-template" type="text/x-handlebars-template"><div class="EmptyMessage">Your search turned up 0 results. This most likely means the backend is down, yikes!</div></script> </div> </div> <!-- Page Header Ends --> <!-- Page Body Start--> <div class="page-body-wrapper"> <!-- Page Sidebar Start--> <?php include('sidebar.php') ?> <!-- Page Sidebar Ends--> <div class="page-body"> <div class="container-fluid"> <div class="page-title"> <div class="row"> <div class="col-sm-6 p-0"> <h3> Dashboard </h3> </div> </div> </div> </div> <!-- Container-fluid starts--> <div class="container-fluid default-dashboard"> <div class="row"> <div class="col-sm-12"> <div class="card"> <div class="card-body"> <div class="list-product"> <table class="table" id="project-status"> <thead> <tr> <th> <span class="f-dark f-w-600">ID</span></th> <th> <span class="f-dark f-w-600">Image</span></th> <th> <span class="f-dark f-w-600">Name</span></th> <th> <span class="f-dark f-w-600">Designation</span></th> <th> <span class="f-dark f-w-600">Review</span></th> <th> <span class="f-dark f-w-600">Action</span></th> </tr> </thead> <tbody class="text-dark"> <?php $query = "SELECT * FROM `testimonials`"; $result = mysqli_query($conn, $query); $i = 1; while ($item = mysqli_fetch_assoc($result)) { $imageSrc = htmlspecialchars($item['image'], ENT_QUOTES, 'UTF-8'); $id = $item['id']; ?> <tr> <th scope="row"><?php echo $i; ?></th> <td><img src="uploads/<?php echo $imageSrc; ?>" alt="Product Image" width="150px" style="border-radius: 50%;"></td> <td><?php echo $item['name']; ?></td> <td><?php echo $item['designation']; ?></td> <td><?php echo $item['review']; ?></td> <td> <a href="edit_testimonial.php?id=<?php echo $id; ?>" class="btn btn-success text-decoration-none"><i class='btn_con bx bx-edit'></i></a> <form action="crud.php" method="POST" style="display:inline;"> <input type="hidden" name="id" value="<?php echo $id; ?>"> <button type="submit" name="delete_testimonial" class="btn btn-danger m-2"><i class='btn_con bx bxs-trash'></i></button> </form> </td> </tr> <?php $i++; } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> <!-- Container-fluid Ends--> </div> <!-- footer start--> <footer class="footer"> <div class="container-fluid"> <div class="row"> <div class="d-flex justify-content-center"> <p class="mb-0">Copyright 2024 © Universal designed with love by Encoders Unlimited.</p> </div> </div> </div> </footer> </div> </div> <?php include('footer.php') ?> <!-- Plugin used--> </body> </html>