File Manager V1.5

[SYSTEM@ROOT]: /home/ketechno/dakotaoilug.com/
INJECT_FILE:
NEW_ENTRY:

FILE_CONTENT: feature_detail.php

<?php
require_once 'header.php';
require_once 'admin/link_db_process.php';

// Get feature id from URL
$feature_id = isset($_GET['id']) ? (int)$_GET['id'] : 0;

// Get feature details
$query = "SELECT * FROM homepage_features WHERE id = ?";
$stmt = $conn->prepare($query);
$stmt->bind_param("i", $feature_id);
$stmt->execute();
$result = $stmt->get_result();
$feature = $result->fetch_assoc();

// If feature not found, redirect to index page
if (!$feature) {
    header("Location: index.php");
    exit();
}
?>

<!-- Page Title -->
<section class="page-title" style="background-image:url(images/background/22.jpg);">
    <div class="auto-container">
        <h1><?php echo htmlspecialchars($feature['title']); ?></h1>
    </div>
</section>
<!-- End Page Title -->

<!-- Feature Detail Section -->
<section class="service-detail-section">
    <div class="auto-container">
        <div class="row clearfix">
            <!-- Content Column -->
            <div class="content-column col-lg-8 col-md-12 col-sm-12">
                <div class="inner-column">
                    <div class="feature-content">
</br></br>
                        <div class="icon-box">
                            <span class="<?php echo htmlspecialchars($feature['icon']); ?>"></span>
                        </div>
                        <h2><?php echo htmlspecialchars($feature['title']); ?></h2>
                        <div class="text">
                            <?php echo nl2br(htmlspecialchars($feature['description'])); ?>
                        </div>
                        
                        <?php if (!empty($feature['image'])): ?>
                        <div class="feature-image">
                            <img src="<?php echo htmlspecialchars($feature['image']); ?>" 
                                 alt="<?php echo htmlspecialchars($feature['title']); ?>" 
                                 class="img-fluid rounded shadow-lg">
                        </div>
                        <?php endif; ?>

                        <?php if ($feature['link_url']): ?>
                        
                        <?php endif; ?>
                    </div>
                </div>
            </div>
            
            <!-- Sidebar Column -->
            <div class="sidebar-column col-lg-4 col-md-12 col-sm-12">
                <div class="inner-column">
                    <!-- Other Features -->
                    <div class="sidebar-widget">
                        <h3>Other Features</h3>
                        <ul class="service-list">
                            <?php
                            $query = "SELECT id, title FROM homepage_features WHERE id != ? ORDER BY display_order ASC";
                            $stmt = $conn->prepare($query);
                            $stmt->bind_param("i", $feature_id);
                            $stmt->execute();
                            $result = $stmt->get_result();
                            
                            while ($other_feature = $result->fetch_assoc()) {
                                echo '<li><a href="feature_detail.php?id=' . $other_feature['id'] . '">' . 
                                     htmlspecialchars($other_feature['title']) . '</a></li>';
                            }
                            ?>
                        </ul>
                    </div>
                    
                    <!-- Book Appointment -->
                    <div class="sidebar-widget">
                        <div class="appointment-box">
                            <h3>Book an Appointment</h3>
                            <p>Interested in our services? Book an appointment now!</p>
                            <a href="appointment.php" class="theme-btn btn-style-one">Book Appointment</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<style>
.feature-content .icon-box {
    font-size: 48px;
    color: #007bff;
    margin-bottom: 20px;
}

.feature-content h2 {
    color: #333;
    margin-bottom: 20px;
}

.feature-content .text {
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
}

.feature-image {
    margin: 30px 0;
    text-align: center;
}

.feature-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-image img:hover {
    transform: scale(1.02);
}

.feature-link {
    margin-top: 30px;
    text-align: center;
}

.sidebar-widget {
    background: #f8f9fa;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.sidebar-widget h3 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-list li {
    margin-bottom: 10px;
}

.service-list li a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 8px 15px;
    background: #fff;
    border-radius: 4px;
}

.service-list li a:hover {
    color: #007bff;
    background: #e9ecef;
}

.appointment-box {
    text-align: center;
    background: linear-gradient( rgba(20, 20, 31, 0.7), #fe9601);
    color: #fff;
    padding: 30px 20px;
    border-radius: 8px;
}

.appointment-box h3 {
    color: #fff !important;
    border-bottom: 2px solid rgba(255,255,255,0.2) !important;
}

.appointment-box p {
    margin: 20px 0;
}

.appointment-box .btn-style-one {
    background: #fff;
    color: #007bff;
}

.appointment-box .btn-style-one:hover {
    background: #0056b3;
    color: #fff;
}

@media (max-width: 991px) {
    .sidebar-column {
        margin-top: 40px;
    }
}
</style>

<?php require_once 'footer.php'; ?>
[ KEMBALI ]