📁 File Manager
Editing:
/home/u547896322/domains/amrutimba.com/public_html/admin/addbanner.php
<?php include_once '../config/config.php'; include_once '../controller/ctrlbannerlist.php'; $banner=getbanner(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content="Responsive Admin & Dashboard Template based on Bootstrap 5"> <meta name="author" content="AdminKit"> <meta name="keywords" content="adminkit, bootstrap, bootstrap 5, admin, dashboard, template, responsive, css, sass, html, theme, front-end, ui kit, web"> <link rel="preconnect" href="https://fonts.gstatic.com"> <link rel="shortcut icon" href="img/icons/icon-48x48.png" /> <link rel="canonical" href="https://demo-basic.adminkit.io/pages-blank.html" /> <title>Amrut</title> <link href="css/app.css" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap" rel="stylesheet"> </head> <body> <div class="wrapper"> <?php include_once 'sidebar.php'; ?> <div class="main"> <?php include_once 'header.php'; ?> <section> <div class="container col-md-11 m-auto "> <div class="text-center" > <h3 style="font-weight:bold; color:#000;">Add Banner Photos</h3> </div> <form action="../controller/ctrladdbanner.php" method="POST" enctype="multipart/form-data"> <input type="hidden" name="galid" id="galid" value=""> <div class="row"> <div class="col-md-3"> <label for="" style="font-weight:bold; color:#000;">Upload Banner Image</label> <img width="80px" id="banners" src="" alt=""> <input class="form-control" type="file" name="banners"> </div> <div class="col-md-3"> <input type="hidden" id="bname" value="" name="bname"> <label for="">Banner Name</label> <input class="form-control" type="text" value="" name="name" id="name"> </div> <div class="col-md-3"> <input class="btn btn-primary form-control " type="submit" value="submit" name="submit" style="margin-top:20px;"> </div> </div> </form> <div class="" style="margin-top:40px"> <div class="text-center"><h2 class="fw fw-bold" style="font-weight:bold; color:#000;">Gallery List</h2></div> <table class="table table-bordered"> <thead> <tr> <th>Sr.No</th> <th>Banner Image</th> <th>Name</th> <th>Action</th> </tr> <?php $sn=1; foreach($banner as $ban){ ?> <tr> <td><?php echo $sn++; ?></td> <td><img width="80px" src="img/gallery/<?php echo $ban['banners']; ?>" alt=""> </td> <td><?php echo $ban['name']; ?></td> <td><a class="btn btn-success" onclick="updatebanner('<?php echo $ban['bid']; ?>','<?php echo $ban['banners']; ?>','<?php echo $ban['name']; ?>')">Edit <i class="fas fa-edit"></i> </a> <a class="btn btn-danger" onclick="deletebannerbyid(<?php echo $ban['bid'] ?>)"> Del <i class="fas fa-trash"></i> </a></td> </tr> <?php } ?> </thead> </table> </div> </div> </section> </div> </div> <script type="text/javascript"> function deletebannerbyid(id) { if (confirm("are u sure to delete Gallery ")) { window.location = "../controller/ctrldelbanner.php?id=" + id; } else { return false; } } function updatebanner(id,banners,name){ bid=document.getElementById("bid"); photo1=document.getElementById("banners"); b1=document.getElementById("name"); bname1=document.getElementById("bname"); bid.value=id; name1.value=name; bname.value=photo; b1.setAttribute('src','img/gallery/'+photo) } </script> <script src="js/app.js"></script> </body> </html>
Save
Cancel