-
Notifications
You must be signed in to change notification settings - Fork 0
/
chat.php
90 lines (82 loc) · 2.91 KB
/
chat.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html>
<head lang="pt-br">
<title>App</title>
<!--METAS-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="web, developer, design, layout, UI, UX">
<meta name="language" content="PT-BR">
<meta name="author" content="Nome">
<meta name="robots" ontent="noindex">
<meta name="googlebot" content="noindex">
<!--LINKS-->
<link rel="stylesheet" href="CSS/GERAL/GERAL.css">
<link rel="stylesheet" href="CSS/NORMALIZE/NORMALIZE.css">
<link rel="stylesheet" href="CSS/STYLES/INDEX/HEADER/header.css">
<link rel="stylesheet" href="CSS/STYLES/CHAT/chat.css">
<link rel="stylesheet" href="CSS/STYLES/CHAT/mensagens.css">
<script type="text/javascript" src="JS/functions.js">
</script>
<!--FONTES-->
<link href="https://fonts.googleapis.com/css?family=Nunito&display=swap" rel="stylesheet">
<!--FAV ICON-->
<link rel="shortcut icon" href="IMG/fav.png" />
</head>
<?php
session_start();
require "PHP/funcoes.php";
require "PHP/conecta.php";
?>
<body>
<header>
<nav>
<div class="container">
<?php ?>
<?php if (isLoggedIn()): ?>
<div class="top">Olá
<?php echo $_SESSION['nome']; ?>
<a id="logout" href="PHP/deslogar.php"><img src="IMG/HEADER/NAV/deslogar.png"></a>
</div>
<?php else: ?>
<div class="top"></div>
<?php endif; ?>
<div id="chat-voltar" class="avatar" onclick="voltar()">
<a href="../index.php"></a>
</div>
</div>
</nav>
<div class="news">
<div class="container">
<div class="title">D-Chat</div>
<div class="sub">Is the chat to D-Mountain users.</div>
</div>
</div>
</header>
<div class="form-chat">
<form action="PHP/mensagens.php" method="post">
<div class="input-msg">
<div class="img"><img src="IMG/MAIN/chat.png"></div>
<input type="text" name="mensagem" id="mensagem">
</div>
<div class="submit">
<?php if (isLoggedIn()): ?>
<input type="submit" value="Enviar" name="enviar-mensagem">
<?php else: ?>
<div id="erro">Usuário Não Encontrado</div>
<?php endif; ?>
</div>
</form>
</div>
</body>
<div class="mensagens">
<?php
include("PHP/mostrar-mensagens.php");
?>
</div>
<script>
window.onload = function() {
pegarDia();
};
</script>
</html>