-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.php
21 lines (20 loc) · 972 Bytes
/
project.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php require_once("includes/header.php"); ?>
<?php
if (isset($_GET['project_id'])) {
$project = Project::get_item_by_id('projects', $_GET['project_id']);
if (!$project) {
$message->set_message("No project exists at the given id {$_GET['project_id']}.");
redirect("/blog/projects");
}
} else {
$message->set_message("Improper parameters given.");
redirect("/blog/projects");
}
?>
<div class="container__content">
<h1 class="project__headline"><?php echo $project->title; ?></h1>
<a href="<?php echo $project->link; ?>" target="_blank"><img src="/blog/admin/images/<?php echo $project->picture; ?>" class="project__image" alt="<?php echo $project->alt_text; ?>"></a>
<p class="project__description"><?php echo $project->description; ?></p>
<p class="project__link">Click <a href="<?php echo $project->link; ?>" target="_blank" class="cta-link">here</a> to check it out!</p>
</div>
<?php require_once("includes/footer.php"); ?>