-
Notifications
You must be signed in to change notification settings - Fork 0
/
Login.php
166 lines (142 loc) · 5.7 KB
/
Login.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Theme Made By www.w3schools.com -->
<title>Bootstrap Theme Company Page</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<link href="CSS\Estilo.css" rel="stylesheet">
</head>
<body id="myPage" data-spy="scroll" data-target=".navbar" data-offset="60">
<nav class="navbar navbar-default navbar-fixed-top" id="Navbar">
<script src="Script\LnavBar.js"></script>
</nav>
<div class="jumbotron text-center">
<img src="img/Crowley logo.png" alt="Logo" width="300" height="300">
<p>La mejor manera de aprender Fisica</p>
</div>
<!-- Container (About Section) -->
<div id="about" class="container-fluid">
<div class="row">
<h2>Inicia Seción</h2>
<form action="includes/login.inc.php" method="post">
<div class="form-floating md-form">
<input type="text" name="uid" class="form-control mb-4" placeholder="ID de usuario">
<label for="floatingInput">ID de usuario</label>
</div>
<div class="form-floating md-form">
<input type="password" name="pwd" class="form-control mb-4" placeholder="Contraseña">
<label for="floatingInput">Contraseña</label>
</div>
<button type="submit" name="submit" class="btn btn-dark btn-block">Entrar</button><br><br>
</form>
</div>
</div>
<div class="error-handler">
<?php
//Manejo de errores
if (isset($_GET["error"])) {
if ($_GET["error"] == "emptyinput") {
echo '
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>Error:</strong> Los campos no deben estar en blanco.
</div>
';
} else if ($_GET["error"] == "wronglogin") {
echo '
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>Error:</strong> Datos de acceso incorrecto.
</div>
';
} else if ($_GET["error"] == "stmtfailed") {
echo '
<div class="alert alert-danger">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>Error:</strong> Algo salió mal, vuelve a intentarlo.
</div>
';
}
}
?>
</div>
<!-- Container (Contact Section) -->
<div id="contact" class="container-fluid bg-grey">
<h2 class="text-center">CONTACTANOS</h2>
<div class="row">
<div class="col-sm-5">
<p>Contactanos y te responderemos en las proximas 24hrs</p>
<p><span class="glyphicon glyphicon-map-marker"></span> AGS. Mexico</p>
<p><span class="glyphicon glyphicon-phone"></span> +52 1 449 5574342</p>
<p><span class="glyphicon glyphicon-envelope"></span> [email protected]</p>
</div>
<div class="col-sm-7 slideanim">
<div class="row">
<div class="col-sm-6 form-group">
<input class="form-control" id="nombre" name="nombre" placeholder="Nombre" type="text" required>
</div>
<div class="col-sm-6 form-group">
<input class="form-control" id="email" name="email" placeholder="Email" type="email" required>
</div>
</div>
<textarea class="form-control" id="comentario" name="comentario" placeholder="Comentario" rows="5"></textarea><br>
<div class="row">
<div class="col-sm-12 form-group">
<button class="btn btn-default pull-right" type="submit">Enviar</button>
</div>
</div>
</div>
</div>
</div>
<footer class="container-fluid text-center">
<br>
<br>
<br>
<br>
<br>
<br>
<a href="#myPage" title="To Top">
<span class="glyphicon glyphicon-chevron-up"></span>
</a>
<p>Bootstrap Tema hecho por <a href="https://www.w3schools.com" title="Visit w3schools">www.w3schools.com</a> y adaptado para fines educativos</p>
<p>Crowley una subdivision de Ghost Corp </p>
</footer>
<script>
$(document).ready(function() {
// Add smooth scrolling to all links in navbar + footer link
$(".navbar a, footer a[href='#myPage']").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (900) specifies the number of milliseconds it takes to scroll to the specified area
$('php, body').animate({
scrollTop: $(hash).offset().top
}, 900, function() {
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
$(window).scroll(function() {
$(".slideanim").each(function() {
var pos = $(this).offset().top;
var winTop = $(window).scrollTop();
if (pos < winTop + 600) {
$(this).addClass("slide");
}
});
});
})
</script>
</body>
</html>