����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 162.0.232.25 / Your IP : 3.135.185.78 Web Server : LiteSpeed System : Linux premium276.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : kwacuqig ( 988) PHP Version : 8.2.26 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/kwacuqig/bm1holdings-ltd.com/ |
Upload File : |
<?php include './header.php'; include './assets/php/connect.php'; if (!loggedin()) { header('location:./login'); } ?> <div class="breadcrumbs"> <div class="container"> <div class="row"> <div class="col-12"> <div class="bread-inner"> <ul class="bread-list"> <li><a href="home">Home<i class="ti-arrow-right"></i></a></li> <li class="active"><a href="team-list">Team List</a></li> </ul> </div> </div> </div> </div> </div> <?php if (isset($_POST['submit'])) { $tid = mysqli_real_escape_string($conn, $_POST['tid']); $name = mysqli_real_escape_string($conn, $_POST['name']); $role = mysqli_real_escape_string($conn, $_POST['role']); $sql = "UPDATE `team` SET `name`='$name', `role`='$role' WHERE `tid`=$tid"; //checking if the query has run successfully if (mysqli_query($conn, $sql)) { ?> <script type="text/javascript"> swal("SUCCESS", "<?php echo $name; ?> was successfully updated", "success"); </script> <?php } else { die(mysqli_error($conn)); } } ?> <section class="shop section"> <div class="container"> <div class="row"> <div class="col-lg-3 mb-4"> <div class="account-sidebar"> <div class="sidebar-list"> <a href="team-list" class="active"><i class="far fa-users"></i> Team</a> <a href="add-team"><i class="far fa-upload"></i> Add New Team</a> <a href="logout"><i class="far fa-lock"></i> Logout</a> </div> </div> </div> <div class="col-lg-9"> <div class="account-content"> <h4 class="account-content-title"><i class="far fa-users"></i> Team</h4> <div class="account-content-table"> <div class="table-responsive"> <table class="table table-borderless"> <tr> <th>Image</th> <th>Name</th> <th>Role</th> <th>Action</th> </tr> <?php $query = "SELECT * FROM `team` ORDER BY `tid` DESC"; $run = mysqli_query($conn, $query) or die(mysqli_error($conn)); while ($row = mysqli_fetch_array($run)) { ?> <tr class="account-order-list"> <td class="product-img"><img src="assets/team/<?php echo $row['image']; ?>" alt=""></td> <td> <div class="product-info"><?php echo $row['name']; ?></div> </td> <td> <div class="product-info"><?php echo $row['role']; ?></div> </td> <td> <div class="product-info"> <a href="#" class="content-action content-action-mr" data-bs-toggle="modal" data-bs-target="#modal-<?php echo $row['tid']; ?>"><i class="far fa-pen"></i></a> <a href="remove-team.php?tid=<?php echo $row['tid']; ?>" class="content-action" onclick="return confirm('Delete <?php echo $row['name']; ?>?')"><i class="far fa-trash"></i></a> </div> </td> </tr> <!-- The Modal --> <div class="modal fade" id="modal-<?php echo $row['tid']; ?>"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <!-- Modal Header --> <div class="modal-header"> <button type="button" class="btn-close" data-bs-dismiss="modal"></button> </div> <!-- Modal body --> <div class="modal-body"> <div class="account-content bg-white pt-0"> <div class="edit-profile"> <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>" method="POST" enctype="multipart/form-data"> <div class="row"> <div class="col-12"> <div class="mb-3"> <label for="name" class="form-label">Name</label> <input type="text" name="name" class="form-control" id="name" value="<?php echo $row['name'] ?>" required> </div> </div> <div class="col-12"> <div class="mb-3"> <label for="price" class="form-label">Role</label> <input type="text" name="role" class="form-control" id="price" value="<?php echo $row['role'] ?>" required> </div> </div> <input type="hidden" name="tid" value="<?php echo $row['tid']; ?>"> </div> <button type="submit" name="submit" class="btn">Update Team</button> </form> </div> </div> </div> </div> </div> </div> <?php } ?> </table> </div> <div class="col-12"> <div class="pagination center mt-2"> <ul class="pagination-list"> <li><a href="#"><i class="ti-arrow-left"></i></a></li> <li><a href="#">1</a></li> <li class="active"><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#"><i class="ti-arrow-right"></i></a></li> </ul> </div> </div> </div> </div> </div> </div> </div> </section> <?php include './footer.php'; include './scripts.php'; ?> <script> document.querySelector("title").innerText="BM 1 HOLDINGS LTD - TEAM LIST"; document.querySelectorAll(".menu-area ul li")[7].classList.add("active"); document.querySelectorAll(".slicknav_nav li a")[8].style.color="blue"; </script>