36 lines
627 B
PHP
36 lines
627 B
PHP
<?php
|
|
include('includes/security.php');
|
|
global $users;
|
|
|
|
if (!isset($_SESSION["loggedIn"])) {
|
|
$_SESSION["error"] = true;
|
|
header("Location: index.php");
|
|
exit();
|
|
}
|
|
?>
|
|
|
|
<!DOCTYPE HTML>
|
|
<html lang="it">
|
|
|
|
<head>
|
|
<title>Login</title>
|
|
<?php require "includes/head.php" ?>
|
|
</head>
|
|
|
|
<body>
|
|
<?php require "includes/navbar.php" ?>
|
|
|
|
<div class="container">
|
|
<h1>Lista Amici</h1>
|
|
<h2>Ecco i tuoi amici</h2>
|
|
|
|
<?php foreach ($users as $user => $x) { ?>
|
|
<p><?php if (strcmp($user, $_SESSION["nome"]) !== 0) echo $user ?></p>
|
|
<?php } ?>
|
|
|
|
</div>
|
|
|
|
<?php require "includes/footer.php" ?>
|
|
|
|
</body>
|
|
</html>
|