Skip to content

Commit

Permalink
0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMoreira committed Jun 6, 2024
1 parent 7e1c64e commit 6f7690a
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 13 deletions.
10 changes: 5 additions & 5 deletions mrm/includes/navbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
<ul> <?php if ($isLoggedIn): ?>
<li><a href="/mrm/pages/ranking.php">Ranking</a></li>
<li><a href="/mrm/pages/criar_att.php">Criar ATT</a></li>
<li ><a href="#">Outros</a></li>
<li ><a href="/mrm/pages/fnd.php">Outros</a></li>
<?php else: ?>
<li><a href="/mrm/">Home</a></li>
<li><a href="/mrm/pages/ranking.php">Ranking</a></li>
<li><a href="#">Others</a></li>
<li><a href="/mrm/pages/fnd.php">Home</a></li>
<li><a href="/mrm/pages/fnd.php">vamos logar?</a></li>
<li><a href="/mrm/pages/fnd.php">Others</a></li>
<?php endif; ?>
</ul>
</div>
Expand All @@ -26,7 +26,7 @@
<?php echo "Olá " .$_SESSION['nome']; ?>
<a href="/mrm/pages/login.php" hidden></a>
</li>
<li><a href="#">Perfil</a></li>
<li><a href="/mrm/pages/fnd.php">Perfil</a></li>
<?php else: ?>
<!-- Navbar para visitantes -->
<li><a href="/mrm/pages/login.php">Login</a></li>
Expand Down
14 changes: 9 additions & 5 deletions mrm/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,25 @@
<?php include './includes/navbar.php' ?>

<?php
if ($isLoggedIn) {
echo '<form action="" method="post">';
echo '<button type="submit" name="deslogar">Deslogar script</button>';
echo '</form>';
echo session_id();
echo $_SESSION['nome'];
echo $_SESSION['email'];


// Verifica se o botão foi clicado e chama a função

if (isset($_POST['deslogar'])) {
unset($_SESSION['email'],$_SESSION['senha'] );
session_destroy();
echo "Deslogado com sucesso!";


};
header('Location: /mrm/');
exit;
}
} else {
echo "<p>Você não está logado!</p>";
}

?>
</body>
Expand Down
28 changes: 28 additions & 0 deletions mrm/pages/fnd.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./css/register.css">
<link rel="stylesheet" href="../includes/css/colors.css">
<link rel="stylesheet" href="../includes/css/navbar.css">
<link rel="stylesheet" href="../includes/css/register.css">
</head>
<body>
<?php include '../includes/navbar.php' ?>
<div class="center">
<div class="wrapper">
<h1>Função não disponível</h1>
<p style="
text-align: center;
display: block;
margin: 5% auto;
">
função ou página não disponível no momento.
Será implementada em breve. Por favor, aguarde.
</p>
</div>
</div>
</body>
</html>
6 changes: 3 additions & 3 deletions mrm/processer/dbconnect.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
class Database {
private $host = '144.22.176.81';
private $host = 'XXXXX';
private $db_name = 'mrm';
private $username = 'MrMoreira';
private $password = 'Caique100.';
private $username = 'XXXX';
private $password = 'XXXXX';
//private $username = 'mrmoreira';
//private $password = 'Morrice123';
private $conn;
Expand Down

0 comments on commit 6f7690a

Please sign in to comment.