PHP Classes

File: protected_page.php

Recommend this page to a friend!
  Classes of Juan Camacho   Nano PHP Framework   protected_page.php   Download  
File: protected_page.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Nano PHP Framework
Build applications with the minimum amount of code
Author: By
Last change:
Date: 6 months ago
Size: 850 bytes
 

Contents

Class file image Download
<?php
include 'middleware.php';

?>

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Protected Page</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
</head>

<body>
    <div class="container">
        <h1>Protected Page</h1>
        <p>Welcome, <?php echo $user->getUsername(); ?>!</p>
        <p>This is a protected page that can only be accessed by authenticated users.</p>
    </div>

    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
</body>

</html>