File Manager V1.5
FILE_CONTENT: service_section_two_detail.php
<?php
require_once 'header.php';
require_once 'admin/link_db_process.php';
// Get service id from URL
$service_id = isset($_GET['id']) ? (int)$_GET['id'] : 0;
// Get service details
$query = "SELECT * FROM services_section_two WHERE id = ?";
$stmt = $conn->prepare($query);
$stmt->bind_param("i", $service_id);
$stmt->execute();
$result = $stmt->get_result();
$service = $result->fetch_assoc();
// If service not found, redirect to services page
if (!$service) {
header("Location: services.php");
exit();
}
?>
<!-- Page Title -->
<section class="page-title" style="background-image:url(images/background/8.jpg);">
<div class="auto-container">
<h1><?php echo htmlspecialchars($service['title']); ?></h1>
</div>
</section>
<!-- End Page Title -->
<!-- Service 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="service-content">
</br></br>
<div class="icon-box" >
<span class="<?php echo htmlspecialchars($service['icon']); ?>" style="height:100px;"></span>
</div>
<h2><?php echo htmlspecialchars($service['title']); ?></h2>
<div class="text">
<?php echo nl2br(htmlspecialchars($service['description'])); ?>
</div>
<?php if (!empty($service['image'])): ?>
<div class="service-image">
<img src="<?php echo htmlspecialchars($service['image']); ?>" alt="<?php echo htmlspecialchars($service['title']); ?>" class="img-fluid">
</div>
<?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 Services -->
<div class="sidebar-widget">
<h3>Other Services</h3>
<ul class="service-list">
<?php
$query = "SELECT id, title FROM services_section_two WHERE id != ? ORDER BY display_order ASC";
$stmt = $conn->prepare($query);
$stmt->bind_param("i", $service_id);
$stmt->execute();
$result = $stmt->get_result();
while ($other_service = $result->fetch_assoc()) {
echo '<li><a href="service_section_two_detail.php?id=' . $other_service['id'] . '">' .
htmlspecialchars($other_service['title']) . '</a></li>';
}
?>
</ul>
</div>
<!-- Book Appointment -->
<div class="sidebar-widget">
<div class="appointment-box">
<h3>Book an Appointment</h3>
<p>Need this service? 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>
.service-content .icon-box {
font-size: 48px;
color: #007bff;
margin-bottom: 20px;
}
.service-content h2 {
color: #333;
margin-bottom: 20px;
}
.service-content .text {
color: #666;
line-height: 1.8;
margin-bottom: 30px;
}
.service-image {
margin: 30px 0;
}
.service-image img {
width: 100%;
border-radius: 8px;
box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}
.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;
}
</style>
<?php require_once 'footer.php'; ?>
[ KEMBALI ]