<?php require './src/Entry.php'; $local_id = ""; if (isset($_GET['l']) && $_GET['l'] != "") { $local_id = $_GET['l']; } else { // Go to 404 header("Location: 404.html"); } $entries = portfolio\Entry::getAllEntries(); if ($entries == NULL) { header("Location: 503.html"); } $entry = portfolio\Entry::getEntryById($entries, $local_id); if ($entry == NULL) { header("Location: 404.html"); } ?> <!doctype html> <html class="no-js" lang="en"> <head> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title><?php echo $entry->title; ?> | Raed's Lab</title> <link rel="stylesheet" href="http://dhbhdrzi4tiry.cloudfront.net/cdn/sites/foundation.min.css"> <link href="http://cdnjs.cloudflare.com/ajax/libs/foundicons/3.0.0/foundation-icons.css" rel="stylesheet"> <link rel="stylesheet" href="css/item.css">
<?php require './src/Entry.php'; $entries = portfolio\Entry::getAllEntries(); if ($entries == NULL) { // Go to 503 } else { // Display Page } $entry = portfolio\Entry::getEntryById($entries, "iconify"); if ($entry == NULL) { /// Go to 404 } else { // Display page } var_dump($entries);