-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathservice.php
More file actions
74 lines (70 loc) · 3.48 KB
/
service.php
File metadata and controls
74 lines (70 loc) · 3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
$page_title = 'Service Details - CodeMateRwa';
$page_description = 'Service details and request form.';
require_once 'includes/header.php';
$id = isset($_GET['id']) ? (int)$_GET['id'] : 0;
$service = null;
if ($id) {
try {
$items = getServices(0);
foreach ($items as $it) {
if ((int)$it['id'] === $id) { $service = $it; break; }
}
} catch (Exception $e) {
$service = null;
}
}
if (!$service) {
// fallback sample when not found
$service = ['id'=>0,'name'=>'Custom Service','description'=>'Contact us for a custom quote.','base_price'=>0,'category'=>'general','category_icon'=>'⚙️'];
}
?>
<section class="py-12 px-6">
<div class="container mx-auto">
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<div class="lg:col-span-2">
<div class="service-detail-hero mb-6">
<img src="/assets/images/hero/2.jpg" alt="<?= htmlspecialchars($service['name']) ?>" class="hero-image">
</div>
<h1 class="text-3xl font-bold mb-3"><?= htmlspecialchars($service['name']) ?></h1>
<p class="text-gray-600 mb-4"><?= nl2br(htmlspecialchars($service['description'] ?? '')) ?></p>
<div class="mb-6">
<h3 class="font-semibold mb-2">What we deliver</h3>
<ul class="list-disc ml-5 text-gray-700">
<li>Scoping & discovery</li>
<li>Design & prototyping</li>
<li>Development & testing</li>
<li>Deployment & support</li>
</ul>
</div>
</div>
<aside>
<div class="bg-[#DFD7C5] rounded-lg p-6 shadow">
<div class="flex items-center justify-between mb-4">
<div class="flex items-center gap-3">
<div class="w-12 h-12 bg-gradient-to-br from-blue-400 to-teal-400 rounded-lg flex items-center justify-center text-white text-2xl"><?= $service['category_icon'] ?? '⚙️' ?></div>
<div>
<div class="text-sm text-gray-500">Category</div>
<div class="font-semibold"><?= htmlspecialchars(ucwords(str_replace('_',' ',$service['category'] ?? 'General'))) ?></div>
</div>
</div>
<div class="text-right">
<div class="text-sm text-gray-500">Starting at</div>
<div class="price-tag text-2xl"><?= formatPrice($service['base_price'] ?? 0) ?></div>
</div>
</div>
<a href="contact.php?service_id=<?= (int)$service['id'] ?>" class="btn w-full text-center">Request a Quote</a>
</div>
<div class="mt-6 bg-[#DFD7C5] rounded-lg p-4 shadow">
<h4 class="font-semibold mb-2">Why work with us</h4>
<ul class="text-sm text-gray-600 list-disc ml-5">
<li>Local team, international standards</li>
<li>Fixed milestones and transparent pricing</li>
<li>Post-launch support and training</li>
</ul>
</div>
</aside>
</div>
</div>
</section>
<?php require_once 'includes/footer.php'; ?>