<?php include '[Link]'; ?
>
<?php include '[Link]'; ?>
<?php
// Directory containing your web application pages
$directory = './'; // Adjust this to the correct folder if necessary
// Fetch all files in the directory
$files = scandir($directory);
// Current script name to exclude
$currentFile = basename(__FILE__);
// Filter files that contain 'result' or 'results' in the file name and exclude the
current file
$resultPages = array_filter($files, function ($file) use ($currentFile) {
return preg_match('/result(s?)/i', $file) && $file !== $currentFile;
});
// Sort the filtered pages (optional, for nicer display)
sort($resultPages);
?>
<section class="py-5">
<div class="container">
<div class="row">
<h3 class="text-center mb-5">Explore Result Pages</h3>
<?php if (!empty($resultPages)): ?>
<?php foreach ($resultPages as $page): ?>
<div class="col-md-4 mb-4">
<div class="card h-100 border-0 shadow-sm rounded
animate__animated animate__fadeInUp shadow shadow-lg">
<div class="card-img-top position-relative"
style="height: 200px; background-image:
url('[Link] background-size: cover;
background-position: center;">
<div class="overlay bg-dark position-absolute w-100
h-100 opacity-50"></div>
<div class="position-absolute top-50 start-50
translate-middle text-center">
<i class="fas fa-file-alt fa-3x
text-white"></i>
</div>
</div>
<div class="card-body text-center">
<h5 class="card-title mb-3 text-dark"><?=
htmlspecialchars(basename($page, '.php')) ?></h5>
<p class="card-text text-muted mb-4">Visit this
page to check
<?= htmlspecialchars(basename($page, '.php')) ?
> </p>
<a href="<?= htmlspecialchars(str_replace('.php',
'', $page)) ?>"
class="btn btn-outline-primary btn-sm">
Check Result <i class="fas fa-arrow-right"></i>
</a>
</div>
</div>
</div>
<?php endforeach; ?>
<?php else: ?>
<div class="col-12">
<div class="alert alert-warning text-center">
No result pages found.
</div>
</div>
<?php endif; ?>
</div>
</div>
</section>
<!-- Optional: Include CSS animation library -->
<link rel="stylesheet"
href="[Link] />
<?php include '[Link]'; ?>