���� JFIF adgknasdgsa
Server IP : 191.101.104.88 / Your IP : 3.147.44.195 Web Server : LiteSpeed System : Linux us-imm-web537.main-hosting.eu 4.18.0-513.11.1.lve.el7h.x86_64 #1 SMP Thu Jan 18 15:21:24 UTC 2024 x86_64 User : u547896322 ( 547896322) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/u547896322/domains/amrutimba.com/public_html/admin/ |
Upload File : |
<?php include_once '../config/config.php'; include_once '../controller/ctrlgallerylist.php'; $gallery=getgallery(); ?> <?php session_start(); if($_SESSION['id']=="" && $_SESSION['type'] != "admin"){ header('location: login.php'); } ?> <!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 Gallery Photos</h3> </div> <form action="../controller/ctrladdgallery.php" method="POST" enctype="multipart/form-data"> <input type="hidden" name="galid" id="galid" value=""> <div class="row"> <div class="col-md-4"> <label for="" style="font-weight:bold; color:#000;">Upload Image</label> <img width="80px" id="photo" src="" alt=""> <input class="form-control" type="file" name="photo"> </div> <div class="col-md-4"> <input type="hidden" id="photoname" value="" name="photoname"> <label for="">Image Name</label> <input class="form-control" type="text" value="" name="name" id="name"> </div> <div class="col-md-4"> <label for="">Image Type</label> <select class="form-control" name="types" id=""> <option value="">Select</option> <option value="Photos">Photos</option> <option value="Flyers">Flyers</option> <option value="Placements">Placements</option> <option value="news">News</option> </select> </div> <div class="row"> <div class="col-md-3"> <input class="btn btn-primary form-control " type="submit" value="submit" name="submit" style="margin-top:20px;"> </div> </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>Image</th> <th>Name</th> <th>Action</th> </tr> <?php $sn=1; foreach($gallery as $gall){ ?> <tr> <td><?php echo $sn++; ?></td> <td><img width="80px" src="img/gallery/<?php echo $gall['photo']; ?>" alt=""> </td> <td><?php echo $gall['name']; ?></td> <td><a class="btn btn-success" onclick="updategallery('<?php echo $gall['galid']; ?>','<?php echo $gall['photo']; ?>','<?php echo $gall['name']; ?>')">Edit <i class="fas fa-edit"></i> </a> <a class="btn btn-danger" onclick="deletegallerybyid(<?php echo $gall['galid'] ?>)"> Del <i class="fas fa-trash"></i> </a></td> </tr> <?php } ?> </thead> </table> </div> </div> </section> </div> </div> <script type="text/javascript"> function deletegallerybyid(id) { if (confirm("are u sure to delete Gallery ")) { window.location = "../controller/ctrldelgallery.php?id=" + id; } else { return false; } } function updategallery(id,photo,name){ galid=document.getElementById("galid"); photo1=document.getElementById("photo"); name1=document.getElementById("name"); photoname=document.getElementById("photoname"); galid.value=id; name1.value=name; photoname.value=photo; photo1.setAttribute('src','img/gallery/'+photo) } </script> <script src="js/app.js"></script> </body> </html>