-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
150 lines (134 loc) · 6.86 KB
/
index.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<?php
session_start();
$valueSession = checkSession($_SESSION['USER_INFO']);
require("./db_requests.php");
function checkSession($USER_INFO)
{
if ($USER_INFO) {
echo ('SESSÂO EXISTENTE');
header("Location: feed.php");
return true;
} else {
return false;
}
}
?>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Alecrim</title>
<link rel="stylesheet" href="lib/css/bootstrap.min.css">
<link rel="stylesheet" href="lib/css/mdb.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<style>
@import url("https://fonts.googleapis.com/css?family=Montserrat:400,500,600,700,800,900");
@import url("https://cdn.linearicons.com/free/1.0.0/icon-font.min.css");
body {
font-family: 'Montserrat', sans-serif;
background: #112233;
}
#loginButton {
background-color: white;
}
.custom-control-label {
color: white;
}
</style>
<body>
<div class="container d-flex justify-content-center h-100">
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="pills-home-tab" data-toggle="pill" href="#pills-home" role="tab" aria-controls="pills-home" aria-selected="true">Login</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-profile-tab" data-toggle="pill" href="#pills-profile" role="tab" aria-controls="pills-profile" aria-selected="false">Register</a>
</li>
</ul>
</div>
<div class="tab-content" id="pills-tabContent">
<div class="tab-pane fade show active" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">
<div class="container h-100">
<div class="d-flex justify-content-center h-100">
<div class="user_card">
<div class="d-flex justify-content-center">
</div>
<div class="d-flex justify-content-center form_container">
<form action="login.php" method="POST">
<div class="input-group mb-3">
<div class="input-group-append">
<span class="input-group-text"><i class="fa fa-user"></i></span>
</div>
<input type="text" name="username" class="form-control input_user" value="" placeholder="username">
</div>
<div class="input-group mb-2">
<div class="input-group-append">
<span class="input-group-text"><i class="fa fa-key"></i></span>
</div>
<input type="password" name="password" class="form-control input_pass" value="" placeholder="password">
</div>
<div class="form-group">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customControlInline">
<label class="custom-control-label" for="customControlInline">Remember
me</label>
</div>
</div>
<div class="d-flex justify-content-center mt-3 login_container">
<button type="submit" id="loginButton" name="loginButton" class="btn login_btn">Login</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="pills-profile" role="tabpanel" aria-labelledby="pills-profile-tab">
<div class="container h-100">
<div class="d-flex justify-content-center h-100">
<div class="user_card">
<div class="d-flex justify-content-center">
</div>
<div class="d-flex justify-content-center form_container">
<form action="register.php" method="POST">
<div class="input-group mb-3">
<input type="text" name="nameRegister" class="form-control input_user" value="" placeholder="name">
</div>
<div class="input-group mb-3">
<div class="input-group-append">
<span class="input-group-text"><i class="fa fa-user"></i></span>
</div>
<input type="text" name="usernameRegister" class="form-control input_user" value="" placeholder="username">
</div>
<div class="input-group mb-2">
<div class="input-group-append">
<span class="input-group-text"><i class="fa fa-key"></i></span>
</div>
<input type="password" name="passwordRegister" class="form-control input_pass" value="" placeholder="password">
</div>
<div class="form-group">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customControlInline">
<label class="custom-control-label" for="customControlInline">Remember
me</label>
</div>
</div>
<div class="d-flex justify-content-center mt-3 login_container">
<button type="submit" id="loginButton" name="button" class="btn login_btn">Login</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="lib/js/jquery-3.4.1.min.js"></script>
<script src="lib/js/bootstrap.min.js"></script>
<script src="lib/js/popper.min.js"></script>
<script src="lib/js/mdb.min.js"></script>
</body>
</html>