? GR0V Shell

GR0V shell

Linux in-mum-web921.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64

Path : /home/u949514618/domains/karmaasrconsultants.com/public_html/admin/
File Upload :
Current File : /home/u949514618/domains/karmaasrconsultants.com/public_html/admin/fetch.php

<?php
include('database_connection.php');
$query = "SELECT * FROM gallery ORDER BY image_id DESC";
$statement = $connect->prepare($query);
$statement->execute();
$result = $statement->fetchAll();
$number_of_rows = $statement->rowCount();
$output = '';
$output .= '
 <table id="example1" class="table table-bordered table-striped">
 <thead>
  <tr>
   <th>Sr. No</th>
   <th>Image</th>
   <th>Name</th>
   <th>Image Path</th>
   <th>Gallery Type</th>
   <th>Edit</th>
   <th>Delete</th>
  </tr>
  </thead>
';
if($number_of_rows > 0)
{
 $count = 0;
 foreach($result as $row)
 {
  $count ++; 
  $output .= '
  <tbody>
  <tr>
   <td>'.$count.'</td>
   <td><img src="files/'.$row["image_name"].'" class="img-thumbnail" width="100" height="100" /></td>
   <td>'.$row["image_name"].'</td>
   <td>admin/files/'.$row["image_name"].'</td>
   <td>'.$row["image_description"].'</td>
   <td><button type="button" class="btn btn-warning btn-xs edit" id="'.$row["image_id"].'">Edit</button></td>
   <td><button type="button" class="btn btn-danger btn-xs delete" id="'.$row["image_id"].'" data-image_name="'.$row["image_name"].'">Delete</button></td>
  </tr>
  </tbody>
  ';
 }
}
else
{
 $output .= '
 <tbody>
  <tr>
   <td colspan="6" align="center">No Data Found</td>
  </tr>
  </tbody>
 ';
}
$output .= '
<tfoot>
  <tr>
   <th>Sr. No</th>
   <th>Image</th>
   <th>Name</th>
   <th>Image Path</th>
   <th>Gallery Type</th>
   <th>Edit</th>
   <th>Delete</th>
  </tr>
  </tfoot>
</table>
';
echo $output;
?>

T1KUS90T
  root-grov@89.117.188.241:~$