����JFIF���������
1#@!#!123s
D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
esachqig
/
public_html
/
test
/
admin
/
Filename :
gallery.php
back
Copy
<?php include_once("security.php"); include_once("meta/header.php"); ?> <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">New Gallery Image</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <form action="div-gallery.php" method="POST" enctype="multipart/form-data"> <div class="modal-body"> <div class="form-group"> <label> Title </label> <textarea name="ec_title_nm" class="form-control" placeholder="Heading / Title" required></textarea> </div> <div class="form-group"> <label>Upload image</label> <input type="file" name="news_p_mnbimg1" id="news_p_mnbimg1" class="form-control" required> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-black" data-dismiss="modal">Close</button> <button type="submit" name="news_up_btn" class="btn btn-success">Save</button> </div> </form> </div> </div> </div> <!----Modal End--> <div class="container-fluid"> <!-- Page Heading --> <h1 class="h3 mb-2 text-gray-800">Gallery Images</h1> <button type="button" class="btn btn-dark" data-toggle="modal" data-target="#exampleModal" data-whatever="@getbootstrap">Add image</button> <!-- DataTales Example --> <div class="card shadow mb-4"> <div class="card-header py-3"> <h6 class="m-0 font-weight-bold text-primary">Gallery Images</h6> </div> <div class="card-body"> <div class="table-responsive"> <?php $query = "SELECT * FROM ec_gallery_img ORDER BY id_ec_sl DESC"; $query_run = mysqli_query($connection, $query); ?> <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0"> <thead> <tr> <th>Image ID</th> <th>Title</th> <th>Main Image</th> <th>Delete</th> </tr> </thead> <tfoot> <tr> <th>Image ID</th> <th>Title</th> <th>Main Image</th> <th>Delete</th> </tr> </tfoot> <tbody> <?php if(mysqli_num_rows($query_run) > 0) { while($row = mysqli_fetch_assoc($query_run)) { ?> <tr> <td><?php echo $row['id_ec_sl']; ?></td> <td><?php echo $row['ec_title_nm']; ?></td> <td><?php echo '<img src="upload/main/'.$row['images'].'" width="100px;" height="100px;" >' ?> </td> <td> <form action="div-gallery.php" method="post"> <input type="hidden" name="delete_id" value="<?php echo $row['id_ec_sl']; ?>"> <button type="submit" name="delete_mn_nws" data-bs-toggle="modal" data-bs-target="#exampleModal" class="btn btn-danger">DELETE</button> </form> </td> </tr> <?php } } else { //echo "No record found"; } ?> </tbody> </table> </div> </div> </div> </div> <!-- /.container-fluid --> </div> <!-- End of Main Content --> <?php include_once("meta/footer.php"); ?>