MMCT TEAM
Server IP : 2a02:4780:11:767:0:2c41:85d9:6  /  Your IP : 216.73.217.91
Web Server : LiteSpeed
System : Linux in-mum-web667.main-hosting.eu 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64
User : u742491609 ( 742491609)
PHP Version : 8.1.34
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u742491609/domains/apca.org.in/public_html/admin/inaugration/uploads/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u742491609/domains/apca.org.in/public_html/admin/inaugration/uploads/../admin_panel.php
<?php
// Database connection
require '../connection.php'; // Update this path if necessary

try {
    // Fetch the records from the inaugration table
    $stmt = $pdo->query("SELECT * FROM inaugration");
    $inaugration = $stmt->fetchAll(PDO::FETCH_ASSOC); // Fetch as an associative array

    // Check if data exists
    if (!$inaugration) {
        echo "No records found!";
    }
} catch (PDOException $e) {
    echo "Error fetching data: " . $e->getMessage();
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Inaugration</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
    <link rel="shortcut icon" href="../assets/img/favicon.png">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,500;0,600;0,700;1,400&amp;display=swap">
    <link rel="stylesheet" href="../assets/plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../assets/plugins/fontawesome/css/fontawesome.min.css">
    <link rel="stylesheet" href="../assets/plugins/fontawesome/css/all.min.css">
    <link rel="stylesheet" href="../assets/plugins/datatables/datatables.min.css">
    <link rel="stylesheet" href="../assets/css/style.css">
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-light bg-light">
        <a class="navbar-brand" href="#">Admin Panel</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
             <?php include 'sidebar.php'; ?>
        </div>
    </nav>

    <div class="d-flex">
        <div class="container mt-5" style="width:50%; float: right;">
            <h1>Inaugration Admin Panel</h1>
            <form action="upload.php" method="POST" enctype="multipart/form-data">
                <div class="form-group">
                    <label for="title">Title:</label>
                    <input type="text" name="title" class="form-control" required>
                </div>
                <!-- <div class="form-group">
                    <label for="category">Category:</label>
                    <input type="text" name="category" class="form-control" required>
                </div> -->
                <div class="form-group">
                    <label for="description">Description:</label>
                    <textarea name="description" class="form-control" required></textarea>
                </div>
                <div class="form-group">
                    <label for="images">Images:</label>
                    <input type="file" name="images[]" class="form-control" multiple required>
                </div>
                <button type="submit" class="btn btn-primary">Upload</button>
            </form>

            
            <h2 class="mt-5">Manage Sections and Images</h2>
            <?php if ($inaugration): ?>
                <?php foreach ($inaugration as $section): ?>
                    <div class="card mt-3">
                        <div class="card-header">
                            <h3><?php echo html_entity_decode($section['title'], ENT_QUOTES, 'UTF-8'); ?></h3>
                            <p><?php echo html_entity_decode($section['description'], ENT_QUOTES, 'UTF-8'); ?></p>
                            <a href="edit_section.php?id=<?php echo $section['id']; ?>" class="btn btn-warning">Edit</a>
                            <a href="delete_section.php?id=<?php echo $section['id']; ?>" class="btn btn-danger" onclick="return confirm('Are you sure you want to delete this section?');">Delete</a>
                        </div>
                        <div class="card-body">
                            <!-- Display all images for the section -->
                            <?php 
                            // Split the image paths and display them
                            $images = explode(',', $section['image_path']);
                            foreach ($images as $image): ?>
                                <div class="img-thumbnail d-inline-block mr-2">
                                    <img src="<?php echo htmlspecialchars($image); ?>" alt="Image" class="img-fluid">
                                </div>
                            <?php endforeach; ?>
                        </div>
                    </div>
                <?php endforeach; ?>
            <?php endif; ?>

        </div>
    </div>

    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

MMCT - 2023