Skip to content

Commit b11a3dd

Browse files
committed
completed login and registration
1 parent 3be7482 commit b11a3dd

File tree

4 files changed

+705
-32
lines changed

4 files changed

+705
-32
lines changed

errors.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php if (count($errors) > 0) : ?>
2+
<div class="error">
3+
<?php foreach ($errors as $error) : ?>
4+
<p><?php echo $error ?></p>
5+
<?php endforeach ?>
6+
</div>
7+
<?php endif ?>

login.php

Lines changed: 315 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,315 @@
1+
<? include("./server/user_server.php"); ?>
2+
3+
<!DOCTYPE html>
4+
<html lang="en">
5+
6+
<head>
7+
<meta charset="utf-8" />
8+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
9+
<title>
10+
Login | DevelopHowTo
11+
</title>
12+
<!-- Fonts and icons -->
13+
<link href="https://fonts.googleapis.com/css?family=Poppins:200,300,400,600,700,800" rel="stylesheet" />
14+
<link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet">
15+
<!-- Nucleo Icons -->
16+
<link href="./assets/css/nucleo-icons.css" rel="stylesheet" />
17+
<!-- CSS Files -->
18+
<link href="./assets/css/black-dashboard.min.css" rel="stylesheet" />
19+
<!-- CSS Just for demo purpose, don't include it in your project -->
20+
<link href="./assets/demo/demo.css" rel="stylesheet" />
21+
</head>
22+
23+
<body class="login-page">
24+
<!-- Navbar -->
25+
<nav class="navbar navbar-expand-lg navbar-absolute navbar-transparent fixed-top">
26+
<div class="container-fluid">
27+
<div class="navbar-wrapper">
28+
<div class="navbar-toggle d-inline">
29+
<button type="button" class="navbar-toggler">
30+
<span class="navbar-toggler-bar bar1"></span>
31+
<span class="navbar-toggler-bar bar2"></span>
32+
<span class="navbar-toggler-bar bar3"></span>
33+
</button>
34+
</div>
35+
<a class="navbar-brand" href="javascript:void(0)">Login Page</a>
36+
</div>
37+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation" aria-expanded="false" aria-label="Toggle navigation">
38+
<span class="navbar-toggler-bar navbar-kebab"></span>
39+
<span class="navbar-toggler-bar navbar-kebab"></span>
40+
<span class="navbar-toggler-bar navbar-kebab"></span>
41+
</button>
42+
<div class="collapse navbar-collapse" id="navigation">
43+
<ul class="navbar-nav ml-auto">
44+
<li class="nav-item">
45+
<a href="./" class="nav-link text-primary">
46+
<i class="tim-icons icon-minimal-left"></i> Back to Website
47+
</a>
48+
</li>
49+
<li class="nav-item ">
50+
<a href="./user_reg.php" class="nav-link">
51+
<i class="tim-icons icon-laptop"></i> Register
52+
</a>
53+
</li>
54+
</ul>
55+
</div>
56+
</div>
57+
</nav>
58+
<div class="modal modal-search fade" id="searchModal" tabindex="-1" role="dialog" aria-labelledby="searchModal" aria-hidden="true">
59+
<div class="modal-dialog" role="document">
60+
<div class="modal-content">
61+
<div class="modal-header">
62+
<input type="text" class="form-control" id="inlineFormInputGroup" placeholder="SEARCH">
63+
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
64+
<i class="tim-icons icon-simple-remove"></i>
65+
</button>
66+
</div>
67+
</div>
68+
</div>
69+
</div>
70+
<!-- End Navbar -->
71+
<div class="wrapper wrapper-full-page ">
72+
<div class="full-page login-page ">
73+
<!-- you can change the color of the filter page using: data-color="blue | purple | green | orange | red | rose " -->
74+
<div class="content">
75+
<div class="container">
76+
<div class="col-lg-4 col-md-6 ml-auto mr-auto">
77+
<form class="form" method="post" action="login.php">
78+
<div class="card card-login card-white">
79+
<div class="card-header">
80+
<img src="./assets/img/card-primary.png" alt="">
81+
<h1 class="card-title">Log in</h1>
82+
</div>
83+
<div class="card-body">
84+
<div class="input-group">
85+
<div class="input-group-prepend">
86+
<div class="input-group-text">
87+
<i class="tim-icons icon-email-85"></i>
88+
</div>
89+
</div>
90+
<input type="text" class="form-control" name="username" placeholder="User Name">
91+
</div>
92+
<div class="input-group">
93+
<div class="input-group-prepend">
94+
<div class="input-group-text">
95+
<i class="tim-icons icon-lock-circle"></i>
96+
</div>
97+
</div>
98+
<input type="password" name="password" placeholder="Password" class="form-control">
99+
</div>
100+
</div>
101+
<div class="card-footer">
102+
<button name="login_user" class="btn btn-primary btn-lg btn-block mb-3">Get Started</button>
103+
<div class="pull-left">
104+
<h6>
105+
<a href="javascript:void(0)" class="link footer-link">Create Account</a>
106+
</h6>
107+
</div>
108+
<div class="pull-right">
109+
<h6>
110+
<a href="javascript:void(0)" class="link footer-link">Need Help?</a>
111+
</h6>
112+
</div>
113+
</div>
114+
</div>
115+
</form>
116+
</div>
117+
</div>
118+
</div>
119+
<footer class="footer">
120+
<div class="container-fluid">
121+
<ul class="nav">
122+
<li class="nav-item">
123+
<a href="javascript:void(0)" class="nav-link">
124+
DevelopHowTo
125+
</a>
126+
</li>
127+
<li class="nav-item">
128+
<a href="javascript:void(0)" class="nav-link">
129+
About Us
130+
</a>
131+
</li>
132+
<li class="nav-item">
133+
<a href="javascript:void(0)" class="nav-link">
134+
Blog
135+
</a>
136+
</li>
137+
</ul>
138+
<div class="copyright">
139+
©
140+
<script>
141+
document.write(new Date().getFullYear())
142+
</script> made with <i class="tim-icons icon-heart-2"></i> by
143+
<a href="javascript:void(0)" target="_blank">DevelopHowTo</a> for a better Future.
144+
</div>
145+
</div>
146+
</footer>
147+
</div>
148+
</div>
149+
<!-- Core JS Files -->
150+
<script src="./assets/js/core/jquery.min.js"></script>
151+
<script src="./assets/js/core/popper.min.js"></script>
152+
<script src="./assets/js/core/bootstrap.min.js"></script>
153+
<script src="./assets/js/plugins/perfect-scrollbar.jquery.min.js"></script>
154+
<script src="./assets/js/plugins/moment.min.js"></script>
155+
<!-- Plugin for Switches, full documentation here: http://www.jque.re/plugins/version3/bootstrap.switch/ -->
156+
<script src="./assets/js/plugins/bootstrap-switch.js"></script>
157+
<!-- Plugin for Sweet Alert -->
158+
<script src="./assets/js/plugins/sweetalert2.min.js"></script>
159+
<!-- Plugin for Sorting Tables -->
160+
<script src="./assets/js/plugins/jquery.tablesorter.js"></script>
161+
<!-- Forms Validations Plugin -->
162+
<script src="./assets/js/plugins/jquery.validate.min.js"></script>
163+
<!-- Plugin for the Wizard, full documentation here: https://github.com/VinceG/twitter-bootstrap-wizard -->
164+
<script src="./assets/js/plugins/jquery.bootstrap-wizard.js"></script>
165+
<!-- Plugin for Select, full documentation here: http://silviomoreto.github.io/bootstrap-select -->
166+
<script src="./assets/js/plugins/bootstrap-selectpicker.js"></script>
167+
<!-- Plugin for the DateTimePicker, full documentation here: https://eonasdan.github.io/bootstrap-datetimepicker/ -->
168+
<script src="./assets/js/plugins/bootstrap-datetimepicker.js"></script>
169+
<!-- DataTables.net Plugin, full documentation here: https://datatables.net/ -->
170+
<script src="./assets/js/plugins/jquery.dataTables.min.js"></script>
171+
<!-- Plugin for Tags, full documentation here: https://github.com/bootstrap-tagsinput/bootstrap-tagsinputs -->
172+
<script src="./assets/js/plugins/bootstrap-tagsinput.js"></script>
173+
<!-- Plugin for Fileupload, full documentation here: http://www.jasny.net/bootstrap/javascript/#fileinput -->
174+
<script src="./assets/js/plugins/jasny-bootstrap.min.js"></script>
175+
<!-- Full Calendar Plugin, full documentation here: https://github.com/fullcalendar/fullcalendar -->
176+
<script src="./assets/js/plugins/fullcalendar.min.js"></script>
177+
<!-- Vector Map plugin, full documentation here: http://jvectormap.com/documentation/ -->
178+
<script src="./assets/js/plugins/jquery-jvectormap.js"></script>
179+
<!-- Plugin for the Sliders, full documentation here: http://refreshless.com/nouislider/ -->
180+
<script src="./assets/js/plugins/nouislider.min.js"></script>
181+
<!-- Google Maps Plugin -->
182+
<!-- Place this tag in your head or just before your close body tag. -->
183+
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDGat1sgDZ-3y6fFe6HD7QUziVC6jlJNog"></script>
184+
<!-- Chart JS -->
185+
<script src="./assets/js/plugins/chartjs.min.js"></script>
186+
<!-- Notifications Plugin -->
187+
<script src="./assets/js/plugins/bootstrap-notify.js"></script>
188+
<!-- Control Center for Black Dashboard: parallax effects, scripts for the example pages etc -->
189+
<script src="./assets/js/black-dashboard.min.js%3Fv=1.0.0"></script>
190+
<!-- Black Dashboard DEMO methods, don't include it in your project! -->
191+
<script src="./assets/demo/demo.js"></script>
192+
<!-- Sharrre libray -->
193+
<script src="./assets/demo/jquery.sharrre.js"></script>
194+
<noscript>
195+
<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=111649226022273&ev=PageView&noscript=1" />
196+
</noscript>
197+
<script>
198+
$(document).ready(function() {
199+
$().ready(function() {
200+
$sidebar = $('.sidebar');
201+
$navbar = $('.navbar');
202+
$main_panel = $('.main-panel');
203+
204+
$full_page = $('.full-page');
205+
206+
$sidebar_responsive = $('body > .navbar-collapse');
207+
sidebar_mini_active = true;
208+
white_color = false;
209+
210+
window_width = $(window).width();
211+
212+
fixed_plugin_open = $('.sidebar .sidebar-wrapper .nav li.active a p').html();
213+
214+
215+
216+
$('.fixed-plugin a').click(function(event) {
217+
if ($(this).hasClass('switch-trigger')) {
218+
if (event.stopPropagation) {
219+
event.stopPropagation();
220+
} else if (window.event) {
221+
window.event.cancelBubble = true;
222+
}
223+
}
224+
});
225+
226+
$('.fixed-plugin .background-color span').click(function() {
227+
$(this).siblings().removeClass('active');
228+
$(this).addClass('active');
229+
230+
var new_color = $(this).data('color');
231+
232+
if ($sidebar.length != 0) {
233+
$sidebar.attr('data', new_color);
234+
}
235+
236+
if ($main_panel.length != 0) {
237+
$main_panel.attr('data', new_color);
238+
}
239+
240+
if ($full_page.length != 0) {
241+
$full_page.attr('filter-color', new_color);
242+
}
243+
244+
if ($sidebar_responsive.length != 0) {
245+
$sidebar_responsive.attr('data', new_color);
246+
}
247+
});
248+
249+
$('.switch-sidebar-mini input').on("switchChange.bootstrapSwitch", function() {
250+
var $btn = $(this);
251+
252+
if (sidebar_mini_active == true) {
253+
$('body').removeClass('sidebar-mini');
254+
sidebar_mini_active = false;
255+
blackDashboard.showSidebarMessage('Sidebar mini deactivated...');
256+
} else {
257+
$('body').addClass('sidebar-mini');
258+
sidebar_mini_active = true;
259+
blackDashboard.showSidebarMessage('Sidebar mini activated...');
260+
}
261+
262+
// we simulate the window Resize so the charts will get updated in realtime.
263+
var simulateWindowResize = setInterval(function() {
264+
window.dispatchEvent(new Event('resize'));
265+
}, 180);
266+
267+
// we stop the simulation of Window Resize after the animations are completed
268+
setTimeout(function() {
269+
clearInterval(simulateWindowResize);
270+
}, 1000);
271+
});
272+
273+
$('.switch-change-color input').on("switchChange.bootstrapSwitch", function() {
274+
var $btn = $(this);
275+
276+
if (white_color == true) {
277+
278+
$('body').addClass('change-background');
279+
setTimeout(function() {
280+
$('body').removeClass('change-background');
281+
$('body').removeClass('white-content');
282+
}, 900);
283+
white_color = false;
284+
} else {
285+
286+
$('body').addClass('change-background');
287+
setTimeout(function() {
288+
$('body').removeClass('change-background');
289+
$('body').addClass('white-content');
290+
}, 900);
291+
292+
white_color = true;
293+
}
294+
295+
296+
});
297+
298+
$('.light-badge').click(function() {
299+
$('body').addClass('white-content');
300+
});
301+
302+
$('.dark-badge').click(function() {
303+
$('body').removeClass('white-content');
304+
});
305+
});
306+
});
307+
</script>
308+
<script>
309+
$(document).ready(function() {
310+
demo.checkFullPageBackgroundImage();
311+
});
312+
</script>
313+
</body>
314+
315+
</html>

0 commit comments

Comments
 (0)